/// <summary> /// Initializes a new instance of the <see cref="CommandParameterInfo" /> class. /// </summary> /// <param name="name">The name.</param> /// <param name="commandParameterType">Type of the command parameter.</param> /// <param name="isOptional">if set to <c>true</c> the parameter is optional.</param> /// <param name="defaultValue">The default value.</param> /// <param name="isNullable">A value indicating whether the parameter is allowed to be null.</param> /// <exception cref="ArgumentNullException">Thrown if name or commandParameterType is null</exception> public CommandParameterInfo(string name, ICommandParameterType commandParameterType, bool isOptional, object defaultValue, bool isNullable) { CommandParameterType = commandParameterType ?? throw new ArgumentNullException(nameof(commandParameterType)); IsOptional = isOptional; Name = name ?? throw new ArgumentNullException(nameof(name)); DefaultValue = defaultValue; IsNullable = isNullable; }
/// <summary> /// Initializes a new instance of the <see cref="CommandParameterInfo" /> class. /// </summary> /// <param name="name">The name.</param> /// <param name="commandParameterType">Type of the command parameter.</param> /// <param name="isOptional">if set to <c>true</c> the parameter is optional.</param> /// <param name="defaultValue">The default value.</param> /// <exception cref="ArgumentNullException">Thrown if name or commandParameterType is null</exception> public CommandParameterInfo(string name, ICommandParameterType commandParameterType, bool isOptional, object defaultValue) { if (name == null) throw new ArgumentNullException(nameof(name)); if (commandParameterType == null) throw new ArgumentNullException(nameof(commandParameterType)); CommandParameterType = commandParameterType; IsOptional = isOptional; Name = name; DefaultValue = defaultValue; }
/// <summary> /// Initializes a new instance of the <see cref="CommandParameterInfo" /> class. /// </summary> /// <param name="name">The name.</param> /// <param name="commandParameterType">Type of the command parameter.</param> /// <param name="isOptional">if set to <c>true</c> the parameter is optional.</param> /// <param name="defaultValue">The default value.</param> /// <exception cref="ArgumentNullException">Thrown if name or commandParameterType is null</exception> public CommandParameterInfo(string name, ICommandParameterType commandParameterType, bool isOptional, object defaultValue) { if (name == null) { throw new ArgumentNullException(nameof(name)); } if (commandParameterType == null) { throw new ArgumentNullException(nameof(commandParameterType)); } CommandParameterType = commandParameterType; IsOptional = isOptional; Name = name; DefaultValue = defaultValue; }