本文整理汇总了C#中ICurrency类的典型用法代码示例。如果您正苦于以下问题:C# ICurrency类的具体用法?C# ICurrency怎么用?C# ICurrency使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ICurrency类属于命名空间,在下文中一共展示了ICurrency类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例2: CurrencyExchangeResult
public CurrencyExchangeResult(ICurrency exchangedCurrency, double exchangedAmount, DateTime timestamp, object state)
{
ExchangedCurrency = exchangedCurrency;
ExchangedAmount = exchangedAmount;
Timestamp = timestamp;
State = state;
}
示例3: Add
public Change Add(ICurrency currencyType, int count = 1)
{
if (_currency.ContainsKey(currencyType)) count += _currency[currencyType];
_currency[currencyType] = count;
return this;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例12: AccountDetailsView
public AccountDetailsView(ICurrency baseCurrency)
{
Money zeroAmount = new Money(0m, baseCurrency);
TotalAll = zeroAmount.DisplayString;
TotalPositions = TotalAll;
TotalCash = TotalAll;
Status = AccountStati.Active;
StatusIsOpen = true;
}
示例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();
}
示例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
};
}
示例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;
}