public DataGettedEventArgs(string name, ICondition condition, string scope, Paging paging, Sorting[] sortings, object result)
		{
			if(string.IsNullOrWhiteSpace(name))
				throw new ArgumentNullException("name");

			_name = name.Trim();
			_condition = condition;
			_scope = scope;
			_paging = paging;
			_sortings = sortings;
			_result = result;
		}
		public DataSelectedEventArgs(string name, Type entityType, ICondition condition, Grouping grouping, string scope, Paging paging, Sorting[] sortings, IEnumerable result)
		{
			if(string.IsNullOrWhiteSpace(name))
				throw new ArgumentNullException("name");

			if(entityType == null)
				throw new ArgumentNullException("entityType");

			_name = name.Trim();
			_entityType = entityType;
			_condition = condition;
			_grouping = grouping;
			_scope = scope;
			_paging = paging;
			_sortings = sortings;
			_result = result;
		}
Exemplo n.º 3
0
		public static Sorting[] operator +(Sorting[] values, Sorting value)
		{
			if((values == null || values.Length == 0) && value == null)
				return new Sorting[0];

			if(values == null || values.Length == 0)
				return new Sorting[] { value };

			if(value == null)
				return values;

			var result = new Sorting[values.Length + 1];
			Array.Copy(values, 0, result, 0, values.Length);
			result[result.Length - 1] = value;

			return result;
		}
		public DataSelectingEventArgs(string name, Type entityType, ICondition condition, Grouping grouping, string scope, Paging paging, Sorting[] sortings) : base(name, entityType, condition, grouping, scope, paging, sortings, null)
		{
			_cancel = false;
		}
		public DataGettingEventArgs(string name, ICondition condition, string scope, Paging paging, Sorting[] sortings) : base(name, condition, scope, paging, sortings, null)
		{
			_cancel = false;
		}