本文整理汇总了C#中System.Currency.GetString方法的典型用法代码示例。如果您正苦于以下问题:C# Currency.GetString方法的具体用法?C# Currency.GetString怎么用?C# Currency.GetString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Currency
的用法示例。
在下文中一共展示了Currency.GetString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: getProductTransactionEntry
/// <summary>
/// Initializes a product data entry for use in XML.
/// </summary>
/// <param name="currencyType">Type of currency the item is sold for</param>
/// <param name="description">NFS: World Beta feature, still gonna keep it for MAYBE future-use</param>
/// <param name="rentalDurationInMinutes">0 if not a rental, rental duration in minutes if else</param>
/// <param name="hash">Item hash value that is recognized by NFS: World</param>
/// <param name="iconString">Item icon that is displayed somewhere around its title</param>
/// <param name="levelLimit">0 if not level limited, minimum level value if else</param>
/// <param name="tooltipDescription">NFS: World Beta feature, still gonna keep it for MAYBE future-use</param>
/// <param name="price">How much the item is sold for</param>
/// <param name="priorityNumber">Priority in the shopping list in-game, commonly used for new items or discounts</param>
/// <param name="id">Server product id</param>
/// <param name="title">Item title that is displayed in-game</param>
/// <param name="itemType">Item type that NFS: World can recognize</param>
/// <param name="extraDetail">If there is one, a special condition for the item that is displayed in-game</param>
/// <returns>An XElement wrapped around in ProductTrans tags.</returns>
public static XElement getProductTransactionEntry(Currency currencyType, String description, Int32 rentalDurationInMinutes, Int64 hash, String iconString, Int16 levelLimit, String tooltipDescription, Int32 price, Int16 priorityNumber, String id, String title, GameItemType itemType, Special extraDetail = Special.None)
{
XElement ProductNode =
new XElement("ProductTrans",
new XElement("Currency", currencyType.GetString()),
new XElement("Description", description),
new XElement("DurationMinute", rentalDurationInMinutes.ToString()),
new XElement("Hash", hash.ToString()),
new XElement("Icon", iconString),
new XElement("Level", levelLimit.ToString()),
new XElement("LongDescription", tooltipDescription),
new XElement("Price", price.ToString()),
new XElement("Priority", priorityNumber.ToString()),
new XElement("ProductId", id),
new XElement("ProductTitle", title),
new XElement("ProductType", itemType.GetString()),
new XElement("SecondaryIcon", extraDetail.GetString()),
new XElement("UseCount", "1")
);
return ProductNode;
}
示例2: GetProductTransactionEntry
/// <summary>
/// Initializes a product data entry for use in XML.
/// </summary>
/// <param name="CurrencyType">Type of currency the item is sold for</param>
/// <param name="Description">NFS: World Beta feature, still gonna keep it for MAYBE future-use</param>
/// <param name="RentalDurationInMinutes">0 if not a rental, rental duration in minutes if else</param>
/// <param name="Hash">Item hash value that is recognized by NFS: World</param>
/// <param name="IconString">Item icon that is displayed somewhere around it's title</param>
/// <param name="LevelLimit">0 if not level limited, minimum level value if else</param>
/// <param name="TooltipDescription">NFS: World Beta feature, still gonna keep it for MAYBE future-use</param>
/// <param name="Price">How much the item is sold for</param>
/// <param name="PriorityNumber">Priority in the shopping list in-game, commonly used for new items or discounts</param>
/// <param name="SType">Item type that the server can recognize, not the game</param>
/// <param name="Id">Item index for the server</param>
/// <param name="Title">Item title that is displayed in-game</param>
/// <param name="GType">Item type that NFS: World can recognize, not the server</param>
/// <param name="ExtraDetail">If there is one, a special condition for the item that is displayed in-game</param>
/// <returns>An XElement wrapped around in ProductTrans tags.</returns>
public static XElement GetProductTransactionEntry(Currency CurrencyType, String Description, Int32 RentalDurationInMinutes, Int64 Hash, String IconString, Int16 LevelLimit, String TooltipDescription, Int32 Price, Int16 PriorityNumber, ServerItemType SType, Int32 Id, String Title, GameItemType GType, Special ExtraDetail)
{
XElement ProductNode =
new XElement("ProductTrans",
new XElement("BundleItems",
new XAttribute(ServerAttributes.nilNS + "nil", "true")
),
new XElement("CategoryId",
new XAttribute(ServerAttributes.nilNS + "nil", "true")
),
new XElement("Currency", CurrencyType.GetString()),
new XElement("Description", Description),
new XElement("DurationMinute", RentalDurationInMinutes.ToString()),
new XElement("Hash", Hash.ToString()),
new XElement("Icon", IconString),
new XElement("Level", LevelLimit.ToString()),
new XElement("LongDescription", TooltipDescription),
new XElement("Price", Price.ToString()),
new XElement("Priority", PriorityNumber.ToString()),
new XElement("ProductId", String.Format("ItemEntry{0}-{1}", SType.GetString(), Id.ToString())),
new XElement("ProductTitle", Title),
new XElement("ProductType", GType.GetString()),
new XElement("SecondaryIcon", ExtraDetail.GetString()),
new XElement("UseCount", "1")
);
return ProductNode;
}