public DataListUpdate(DataListUpdateAction action, int index, int count) { // Validate Parameters if (action != DataListUpdateAction.Add && action != DataListUpdateAction.Remove) { throw new InvalidOperationException(string.Format(ResourceHelper.GetErrorResource("Exception_InvalidOperation_ConstructorNotSupportedForAction"), action)); } if (index < 0) { throw new ArgumentOutOfRangeException("count", ResourceHelper.GetErrorResource("Exception_ArgumentOutOfRange_ParameterMustBeZeroOrPositive")); } if (count <= 0) { throw new ArgumentOutOfRangeException("count", ResourceHelper.GetErrorResource("Exception_ArgumentOutOfRange_ParameterMustBePositive")); } // Set Fields this.action = action; this.index = index; this.count = count; }
// *** Constructors *** public DataListUpdate(DataListUpdateAction action) { // Validate Parameters if (action != DataListUpdateAction.Reset) throw new InvalidOperationException(string.Format(ResourceHelper.GetErrorResource("Exception_InvalidOperation_ConstructorNotSupportedForAction"), action)); // Set Fields this.action = action; this.index = 0; this.count = 0; }
// *** Constructors *** public DataListUpdate(DataListUpdateAction action) { // Validate Parameters if (action != DataListUpdateAction.Reset) throw new InvalidOperationException();//string.Format(ResourceHelper.GetErrorResource("Exception_InvalidOperation_ConstructorNotSupportedForAction"), action)); // Set Fields this.action = action; this.index = 0; this.count = 0; }
// *** Constructors *** public DataListUpdate(DataListUpdateAction action) { // Validate Parameters if (action != DataListUpdateAction.Reset) throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, "The called constructor is not supported for the action '{0}'.", action)); // Set Fields _action = action; _index = 0; _count = 0; }
public DataListUpdate(DataListUpdateAction action, int index, int count) { // Validate Parameters if (action != DataListUpdateAction.Add && action != DataListUpdateAction.Remove) throw new InvalidOperationException(string.Format(ResourceHelper.GetErrorResource("Exception_InvalidOperation_ConstructorNotSupportedForAction"), action)); if (index < 0) throw new ArgumentOutOfRangeException("count", ResourceHelper.GetErrorResource("Exception_ArgumentOutOfRange_ParameterMustBeZeroOrPositive")); if (count <= 0) throw new ArgumentOutOfRangeException("count", ResourceHelper.GetErrorResource("Exception_ArgumentOutOfRange_ParameterMustBePositive")); // Set Fields this.action = action; this.index = index; this.count = count; }
public DataListUpdate(DataListUpdateAction action, int index, int count) { // Validate Parameters if (action != DataListUpdateAction.Add && action != DataListUpdateAction.Remove) throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, "The called constructor is not supported for the action '{0}'.", action)); if (index < 0) throw new ArgumentOutOfRangeException("count", string.Format(CultureInfo.InvariantCulture, "The parameter must be greater than or equal to zero.")); if (count <= 0) throw new ArgumentOutOfRangeException("count", string.Format(CultureInfo.InvariantCulture, "The parameter must be greater than zero.")); // Set Fields _action = action; _index = index; _count = count; }