public AssetPairSettings([NotNull] string assetPairId, [NotNull] string legalEntity, [NotNull] string basePairId, MatchingEngineMode matchingEngineMode, decimal multiplierMarkupBid, decimal multiplierMarkupAsk) { AssetPairId = assetPairId.RequiredNotNullOrWhiteSpace(nameof(assetPairId)); LegalEntity = legalEntity.RequiredNotNullOrWhiteSpace(nameof(legalEntity)); BasePairId = basePairId.RequiredNotNullOrWhiteSpace(nameof(basePairId)); MatchingEngineMode = matchingEngineMode.RequiredEnum(nameof(matchingEngineMode)); MultiplierMarkupBid = multiplierMarkupBid.RequiredGreaterThan(0, nameof(multiplierMarkupBid)); MultiplierMarkupAsk = multiplierMarkupAsk.RequiredGreaterThan(0, nameof(multiplierMarkupAsk)); //todo: Check AssetPairId suffix? Ex: .vu means LegalEntity should be LYKKEVU //todo: Check AssetPairId without suffix equals BasePairId? }
public AssetPair(string id, string name, string baseAssetId, string quoteAssetId, int accuracy, string legalEntity, [CanBeNull] string basePairId, MatchingEngineMode matchingEngineMode, decimal stpMultiplierMarkupBid, decimal stpMultiplierMarkupAsk) { Id = id ?? throw new ArgumentNullException(nameof(id)); Name = name ?? throw new ArgumentNullException(nameof(name)); BaseAssetId = baseAssetId ?? throw new ArgumentNullException(nameof(baseAssetId)); QuoteAssetId = quoteAssetId ?? throw new ArgumentNullException(nameof(quoteAssetId)); Accuracy = accuracy; LegalEntity = legalEntity.RequiredNotNullOrWhiteSpace(nameof(legalEntity)); BasePairId = basePairId; MatchingEngineMode = matchingEngineMode.RequiredEnum(nameof(matchingEngineMode)); StpMultiplierMarkupBid = stpMultiplierMarkupBid.RequiredGreaterThan(0, nameof(stpMultiplierMarkupBid)); StpMultiplierMarkupAsk = stpMultiplierMarkupAsk.RequiredGreaterThan(0, nameof(stpMultiplierMarkupAsk)); }
public AssetPair(string id, string name, string baseAssetId, string quoteAssetId, int accuracy, string marketId, string legalEntity, [CanBeNull] string basePairId, MatchingEngineMode matchingEngineMode, decimal stpMultiplierMarkupBid, decimal stpMultiplierMarkupAsk, bool isSuspended, bool isFrozen, bool isDiscontinued, string assetType) { Id = id ?? throw new ArgumentNullException(nameof(id)); Name = name ?? throw new ArgumentNullException(nameof(name)); BaseAssetId = baseAssetId ?? throw new ArgumentNullException(nameof(baseAssetId)); QuoteAssetId = quoteAssetId ?? throw new ArgumentNullException(nameof(quoteAssetId)); Accuracy = accuracy; MarketId = marketId; LegalEntity = legalEntity.RequiredNotNullOrWhiteSpace(nameof(legalEntity)); BasePairId = basePairId; MatchingEngineMode = matchingEngineMode.RequiredEnum(nameof(matchingEngineMode)); StpMultiplierMarkupBid = stpMultiplierMarkupBid.RequiredGreaterThan(0, nameof(stpMultiplierMarkupBid)); StpMultiplierMarkupAsk = stpMultiplierMarkupAsk.RequiredGreaterThan(0, nameof(stpMultiplierMarkupAsk)); IsSuspended = isSuspended; IsFrozen = isFrozen; IsDiscontinued = isDiscontinued; AssetType = assetType; }