public Security(Guid securityId, SecurityType securityType, string name, string symbol, CurrencyFormat format, int fractionTraded) { if (securityId == Guid.Empty) { throw new ArgumentNullException("securityId"); } if (string.IsNullOrEmpty(name)) { throw new ArgumentNullException("name"); } if (string.IsNullOrEmpty(symbol)) { throw new ArgumentNullException("symbol"); } if (format == null) { throw new ArgumentNullException("signFormat"); } if (fractionTraded <= 0) { throw new ArgumentOutOfRangeException("fractionTraded", "The fraction traded must be greater than or equal to one."); } this.SecurityId = securityId; this.SecurityType = securityType; this.Name = name; this.Symbol = symbol; this.Format = format; this.FractionTraded = fractionTraded; }
public Security(Guid securityId, SecurityType securityType, string name, string symbol, CurrencyFormat format, int fractionTraded) { if (securityId == Guid.Empty) { throw new ArgumentNullException(nameof(securityId)); } if (string.IsNullOrEmpty(name)) { throw new ArgumentNullException(nameof(name)); } if (string.IsNullOrEmpty(symbol)) { throw new ArgumentNullException(nameof(symbol)); } if (fractionTraded <= 0) { throw new ArgumentOutOfRangeException(nameof(fractionTraded), Localization.Localization.SECURITY_FRACTION_TRADED_MUST_BE_POSITIVE); } this.SecurityId = securityId; this.SecurityType = securityType; this.Name = name; this.Symbol = symbol; this.Format = format ?? throw new ArgumentNullException(nameof(format)); this.FractionTraded = fractionTraded; }