当前位置: 首页>>代码示例>>C#>>正文


C# IResourceLoader.openTextFile方法代码示例

本文整理汇总了C#中IResourceLoader.openTextFile方法的典型用法代码示例。如果您正苦于以下问题:C# IResourceLoader.openTextFile方法的具体用法?C# IResourceLoader.openTextFile怎么用?C# IResourceLoader.openTextFile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IResourceLoader的用法示例。


在下文中一共展示了IResourceLoader.openTextFile方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RemoteConfigManager

 public RemoteConfigManager(IResourceLoader loader, IStorage storage, ILogger logger, RuntimePlatform platform)
 {
     this.storage = storage;
     logger.prefix = "Unibill.RemoteConfigManager";
     this.XML = loader.openTextFile ("unibillInventory.json").ReadToEnd ();
     Config = new UnibillConfiguration(XML, platform, logger);
     if (Config.UseHostedConfig) {
         string val = storage.GetString (CACHED_CONFIG_PATH, string.Empty);
         if (string.IsNullOrEmpty (val)) {
             logger.Log ("No cached config available. Using bundled");
         } else {
             logger.Log ("Cached config found, attempting to parse");
             try {
                 Config = new UnibillConfiguration(val, platform, logger);
                 if (Config.inventory.Count == 0) {
                     logger.LogError ("No purchasable items in cached config, ignoring.");
                     Config = new UnibillConfiguration (XML, platform, logger);
                 } else {
                     logger.Log (string.Format ("Using cached config with {0} purchasable items", Config.inventory.Count));
                     XML = val;
                 }
             } catch (Exception e) {
                 logger.LogError ("Error parsing inventory: {0}", e.Message);
                 Config = new UnibillConfiguration(XML, platform, logger);
             }
         }
         refreshCachedConfig (Config.HostedConfigUrl, logger);
     } else {
         logger.Log ("Not using cached inventory, using bundled.");
         Config = new UnibillConfiguration(XML, platform, logger);
     }
 }
开发者ID:jhillkwaj,项目名称:WordsOnWords,代码行数:32,代码来源:RemoteConfigManager.cs

示例2: GooglePlayCSVGenerator

 public GooglePlayCSVGenerator (IEditorUtil util, ProductIdRemapper remapper, InventoryDatabase db, IResourceLoader loader) {
     this.util = util;
     this.remapper = remapper;
     this.db = db;
     remapper.initialiseForPlatform(BillingPlatform.GooglePlay);
     this.inventory = XDocument.Load(loader.openTextFile("unibillInventory"));
 }
开发者ID:nhhoang,项目名称:shooting,代码行数:7,代码来源:GooglePlayCSVGenerator.cs

示例3: StorekitMassImportTemplateGenerator

 public StorekitMassImportTemplateGenerator(IResourceLoader loader,
                                            InventoryDatabase db, ProductIdRemapper remapper, IEditorUtil util) {
     this.db = db;
     this.remapper = remapper;
     this.util = util;
     XDocument inventory = XDocument.Load(loader.openTextFile("unibillInventory"));
     this.inventoryDocument = inventory;
     this.sku = (string) inventory.XPathSelectElement("//iOSSKU");
 }
开发者ID:nhhoang,项目名称:shooting,代码行数:9,代码来源:StorekitMassImportTemplateGenerator.cs


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