using System;
using System.Collections.Generic;
using System.Data;

namespace QTMDataFormat;

public class MultipleValuesOccuredEventArgs
{
	private List<DataRow> sourceRows;

	private string valueField = "";

	private object result;

	public List<DataRow> SourceRows => sourceRows;

	public string ValueField => valueField;

	public object Result
	{
		get
		{
			return result;
		}
		set
		{
			result = value;
		}
	}

	public MultipleValuesOccuredEventArgs(List<DataRow> selectedDataRows, string fieldName)
	{
		if (selectedDataRows != null)
		{
			sourceRows = selectedDataRows;
			if (string.IsNullOrEmpty(fieldName))
			{
				throw new ArgumentException("Value Field name cannot be null or empty.", fieldName);
			}
			valueField = fieldName;
			return;
		}
		throw new ArgumentNullException("selectedDataRows", "List of Data Rows cannot be null.");
	}
}
