• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# ICurrency类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ICurrency的典型用法代码示例。如果您正苦于以下问题:C# ICurrency类的具体用法?C# ICurrency怎么用?C# ICurrency使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ICurrency类属于命名空间,在下文中一共展示了ICurrency类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Journal

 public Journal(JournalTypes journalType, string journalNumber, IManagementCompany managementCompany, ICurrency currency)
 {
     this.JournalType = journalType;
     this.JournalNumber = journalNumber;
     this.ManagementCompany = managementCompany;
     this.currency = Currency;
 }
开发者ID:kiquenet,项目名称:B4F,代码行数:7,代码来源:Journal.cs


示例2: CurrencyExchangeResult

 public CurrencyExchangeResult(ICurrency exchangedCurrency, double exchangedAmount, DateTime timestamp, object state)
 {
     ExchangedCurrency = exchangedCurrency;
     ExchangedAmount = exchangedAmount;
     Timestamp = timestamp;
     State = state;
 }
开发者ID:gibratim,项目名称:converter,代码行数:7,代码来源:CurrencyExchangeResult.cs


示例3: Add

        public Change Add(ICurrency currencyType, int count = 1)
        {
            if (_currency.ContainsKey(currencyType)) count += _currency[currencyType];
            _currency[currencyType] = count;

            return this;
        }
开发者ID:larrymccutchan,项目名称:CashRegister,代码行数:7,代码来源:Change.cs


示例4: Price

 /// <summary>
 /// Initializes a new instance of the <see cref="T:B4F.TotalGiro.Instruments.Price">Price</see> class.
 /// </summary>
 /// <param name="quantity">The quantity (just a number) of the price</param>
 /// <param name="underlying">The currency the price is in</param>
 /// <param name="instrument">The instrument to which the price belongs</param>
 /// <param name="xRate">The xRate involved</param>
 public Price(Decimal quantity, ICurrency underlying, IInstrument instrument, decimal xRate)
 {
     this.quantity = quantity;
     this.underlying = underlying;
     this.instrument = instrument;
     this.xRate = xRate;
 }
开发者ID:kiquenet,项目名称:B4F,代码行数:14,代码来源:Price.cs


示例5: CommClient

        /// <summary>
        /// Constructor for creating a test FeeClient object
        /// </summary>
        /// <param name="account"></param>
        /// <param name="instrument"></param>
        /// <param name="side"></param>
        /// <param name="actiontype"></param>
        /// <param name="transactionDate"></param>
        /// <param name="issizebased"></param>
        /// <param name="orderValue"></param>
        /// <param name="amount"></param>
        /// <param name="price"></param>
        /// <param name="ordercurrency"></param>
        /// <param name="isValueInclComm"></param>
        public CommClient(IAccountTypeInternal account,IInstrument instrument, Side side, OrderActionTypes actiontype, 
                         DateTime transactionDate, bool issizebased, InstrumentSize orderValue, Money amount, Price price,
                         ICurrency ordercurrency, bool isValueInclComm)
        {
            if (account == null)
                throw new ApplicationException("It is not possible to calculate the commission when the account is unknown.");

            if (instrument == null)
                throw new ApplicationException("It is not possible to calculate the commission when the instrument value is unknown.");

            this.account = account;
            this.instrument = instrument;
            this.Side = side;
            this.ActionType = actiontype;
            this.TransactionDate = transactionDate;
            this.IsSizeBased = issizebased;
            this.OriginalOrderType = issizebased ? BaseOrderTypes.SizeBased : BaseOrderTypes.AmountBased;
            this.Value = orderValue;
            this.amount = amount;
            this.Price = price;
            this.OrderCurrency = ordercurrency;
            this.IsValueInclComm = isValueInclComm;

            type = CommClientType.Test;
        }
开发者ID:kiquenet,项目名称:B4F,代码行数:39,代码来源:CommClient.cs


示例6: Exchange

 /// <summary>
 /// Initializes Exchange object
 /// </summary>
 /// <param name="ExchangeName">Name</param>
 /// <param name="defaultCurrency">Default currency</param>
 /// <param name="defaultCountry">Default country</param>
 /// <param name="defaultSettlementPeriod">Default settlement period</param>
 public Exchange(string ExchangeName, ICurrency defaultCurrency, ICountry defaultCountry, short defaultSettlementPeriod)
 {
     this.exchangeName = ExchangeName;
     this.defaultCountry = defaultCountry;
     this.DefaultCurrency = defaultCurrency;
     this.defaultSettlementPeriod = defaultSettlementPeriod;
 }
开发者ID:kiquenet,项目名称:B4F,代码行数:14,代码来源:Exchange.cs


示例7: MonetaryOrder

 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="account">User account</param>
 /// <param name="value">Initial value for this order</param>
 /// <param name="requestedCurrency">Currency that is requested</param>
 /// <param name="feeFactory">Fee factory to use for calculating transaction costs</param>
 public MonetaryOrder(IAccountTypeInternal account, Money value, ICurrency requestedCurrency, IFeeFactory feeFactory)
     : base(account, value)
 {
     this.requestedCurrency = requestedCurrency;
     checkInitialValues();
     setCommission(feeFactory);
 }
开发者ID:kiquenet,项目名称:B4F,代码行数:14,代码来源:MonetaryOrder.cs


示例8: SalePreparationSummaryFactory

        /// <summary>
        /// Initializes a new instance of the <see cref="SalePreparationSummaryFactory"/> class.
        /// </summary>
        /// <param name="currency">
        /// The <see cref="ICurrency"/>.
        /// </param>
        /// <param name="basketLineItemFactory">
        /// The basket Line Item Factory.
        /// </param>
        public SalePreparationSummaryFactory(ICurrency currency, BasketLineItemFactory basketLineItemFactory)
        {
            Mandate.ParameterNotNull(currency, "currency");
            Mandate.ParameterNotNull(basketLineItemFactory, "basketLineItemFactory");

            _currency = currency;
            _basketLineItemFactory = basketLineItemFactory;
        }
开发者ID:ProNotion,项目名称:Merchello,代码行数:17,代码来源:SalePreparationSummaryFactory.cs


示例9: TryParse

 /// <summary>
 /// Return currency from number code
 /// </summary>
 /// <param name="numCode">
 /// number code
 /// </param>
 /// <param name="currency">
 /// currency
 /// </param>
 /// <returns>
 /// true if ISO 4217 contain this currency
 /// </returns>
 public static bool TryParse(int numCode, out ICurrency currency)
 {
     currency = Parse(numCode);
     if(currency != null)
         return true;
     currency = new UnknownCurrency(numCode);
     return false;
 }
开发者ID:haf,项目名称:Money,代码行数:20,代码来源:Iso4217.cs


示例10: CheckoutManagerSummaryFactory

        /// <summary>
        /// Initializes a new instance of the <see cref="CheckoutManagerSummaryFactory"/> class.
        /// </summary>
        /// <param name="currency">
        /// The <see cref="ICurrency"/>.
        /// </param>
        /// <param name="basketLineItemFactory">
        /// The basket Line Item Factory.
        /// </param>
        public CheckoutManagerSummaryFactory(ICurrency currency, BasketLineItemFactory basketLineItemFactory)
        {
            Mandate.ParameterNotNull(currency, "currency");
            Mandate.ParameterNotNull(basketLineItemFactory, "basketLineItemFactory");

            _currency = currency;
            _basketLineItemFactory = basketLineItemFactory;
        }
开发者ID:Teknyc,项目名称:Merchello,代码行数:17,代码来源:CheckoutManagerSummaryFactory.cs


示例11: BasketLineItemFactory

        /// <summary>
        /// Initializes a new instance of the <see cref="BasketLineItemFactory"/> class.
        /// </summary>
        /// <param name="umbraco">
        /// The umbraco.
        /// </param>
        /// <param name="currentCustomer">
        /// The current Customer.
        /// </param>
        /// <param name="currency">
        /// The currency.
        /// </param>
        public BasketLineItemFactory(UmbracoHelper umbraco, ICustomerBase currentCustomer, ICurrency currency)
        {
            Mandate.ParameterNotNull(umbraco, "umbraco");
            Mandate.ParameterNotNull(currency, "currency");
            Mandate.ParameterNotNull(currentCustomer, "currentCustomer");

            this._umbraco = umbraco;
            this._currency = currency;
            this._currentCustomer = currentCustomer;
        }
开发者ID:ProNotion,项目名称:Merchello,代码行数:22,代码来源:BasketLineItemFactory.cs


示例12: AccountDetailsView

        public AccountDetailsView(ICurrency baseCurrency)
        {
            Money zeroAmount = new Money(0m, baseCurrency);
            TotalAll = zeroAmount.DisplayString;
            TotalPositions = TotalAll;
            TotalCash = TotalAll;

            Status = AccountStati.Active;
            StatusIsOpen = true;
        }
开发者ID:kiquenet,项目名称:B4F,代码行数:10,代码来源:AccountDetailsView.cs


示例13: CommCalc

        public CommCalc(string name, ICurrency commCurrency, Money minValue, Money maxValue,
			Money fixedSetup)
        {
            Name = name;
            CommCurrency = commCurrency;
            MinValue = minValue;
            MaxValue = maxValue;
            FixedSetup = fixedSetup;

            checkCurrencies();
        }
开发者ID:kiquenet,项目名称:B4F,代码行数:11,代码来源:CommCalc.cs


示例14: BuildAddItemModel

 /// <summary>
 /// Builds a <see cref="AddItemModel"/> from <see cref="IProductContent"/>.
 /// </summary>
 /// <param name="product">
 /// The product.
 /// </param>
 /// <param name="currency">
 /// The currency.
 /// </param>
 /// <param name="showWishList">
 /// The show wish list.
 /// </param>
 /// <returns>
 /// The <see cref="AddItemModel"/>.
 /// </returns>
 public static AddItemModel BuildAddItemModel(this IProductContent product, ICurrency currency, bool showWishList)
 {
     return new AddItemModel()
         {
             Product = product.AsProductDisplay(),
             ContentId = 0,
             BasketPageId = BazaarContentHelper.GetBasketContent().Id,
             ShowWishList = showWishList,
             WishListPageId = BazaarContentHelper.GetWishListContent().Id,
             Currency = currency
         };
 }
开发者ID:drpeck,项目名称:Merchello,代码行数:27,代码来源:ProductContentExtensions.cs


示例15: isCurrencyLoaded

 private bool isCurrencyLoaded(string Symbol, ref ICurrency LoadedCurrency)
 {
     foreach (ICurrency c in theCurrencies)
     {
         if (c.Symbol == Symbol)
         {
             LoadedCurrency = c;
             return true;
         }
     }
     return false;
 }
开发者ID:kiquenet,项目名称:B4F,代码行数:12,代码来源:ExRateUpdate.cs


示例16: InstructionEngineParameters

 public InstructionEngineParameters(PricingTypes pricingType, decimal minimumQty, ICurrency underlying)
 {
     this.pricingType = pricingType;
     switch (pricingType)
     {
         case PricingTypes.Direct:
             this.minimumRebalanceAmount = new Money(minimumQty, underlying);
             break;
         case PricingTypes.Percentage:
             this.minimumRebalancePercentage = minimumQty;
             break;
     }
 }
开发者ID:kiquenet,项目名称:B4F,代码行数:13,代码来源:InstructionEngineParameters.cs


示例17: FeeCalc

        public FeeCalc(FeeType feeType, string name, ICurrency feeCurrency, IAssetManager assetManager)
            : this()
        {
            if ((feeType == null || feeType.Key == FeeTypes.None)|| string.IsNullOrEmpty(name) || feeCurrency == null || assetManager == null)
                throw new ApplicationException("Not all parameters are passed in to instantiate a new fee calculation");

            FeeType = feeType;
            Name = name;
            FeeCurrency = feeCurrency;
            this.AssetManager = assetManager;

            checkData();
        }
开发者ID:kiquenet,项目名称:B4F,代码行数:13,代码来源:FeeCalc.cs


示例18: GetHistoricalExRate

        /// <summary>
        /// Gets historical exchange rate by currency and time
        /// </summary>
        /// <param name="session">Data access object</param>
        /// <param name="currency">Currency</param>
        /// <param name="date">Date</param>
        /// <returns>Historical exchange object</returns>
        public static IHistoricalExRate GetHistoricalExRate(IDalSession session, ICurrency currency, DateTime date)
        {
            IList list;
            IHistoricalExRate rate = null;

            List<ICriterion> expressions = new List<ICriterion>();
            expressions.Add(Expression.Eq("Currency.Key", currency.Key));
            expressions.Add(Expression.Eq("RateDate", date));
            list = session.GetList(typeof(HistoricalExRate), expressions);
            if (list != null && list.Count > 0)
            {
                rate = (IHistoricalExRate)list[0];
            }
            return rate;
        }
开发者ID:kiquenet,项目名称:B4F,代码行数:22,代码来源:HistoricalExRateMapper.cs


示例19: CommValueDetails

        /// <summary>
        /// Constructor of CommValueDetails object
        /// </summary>
        /// <param name="detailsToCopy">The object we want to clone from</param>
        /// <param name="commCurrency">The new currency to convert to</param>
        /// <param name="detailsToCopy">The ex rate to use</param>
        internal CommValueDetails(ICommValueDetails detailsToCopy, ICurrency commCurrency, decimal exRate)
        {
            Money commission;
            if (detailsToCopy == null || detailsToCopy.CommLines.Count == 0)
                throw new ApplicationException("It is not possible to clone the commissiondetails when they are null");

            foreach (ICommValueBreakupLine line in detailsToCopy.CommLines)
            {
                if (line.CommCurrency.Equals(commCurrency))
                    commission = line.CalcValue;
                else
                    commission = line.CalcValue.Convert(exRate, commCurrency);

                AddLine(line.CalcType, commission, line.CalcInfo);
            }
        }
开发者ID:kiquenet,项目名称:B4F,代码行数:22,代码来源:CommValueDetails.cs


示例20: FromICurrency

        public static Currency FromICurrency(ICurrency icurrency)
        {
            Currency c = new Currency();
            c.Guid = icurrency.Guid;
            c.Title = icurrency.Title;
            c.Code = icurrency.Code;

            c.SymbolLeft = icurrency.SymbolLeft;
            c.SymbolRight = icurrency.SymbolRight;
            c.DecimalPointChar = icurrency.DecimalPointChar;
            c.ThousandsPointChar = icurrency.ThousandsPointChar;
            c.DecimalPlaces = icurrency.DecimalPlaces;
            c.Value = icurrency.Value;

            return c;
        }
开发者ID:freemsly,项目名称:cloudscribe,代码行数:16,代码来源:Currency.cs



注:本文中的ICurrency类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ICurrencyService类代码示例发布时间:2022-05-24
下一篇:
C# ICssCheckerContext类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap