public UnibillConfiguration (IResourceLoader loader, UnibillXmlParser parser, IUtil util, ILogger logger) { var element = parser.Parse ("unibillInventory", "inventory") [0]; string o = null; element.kvps.TryGetValue("iOSSKU", out o); iOSSKU = o; element.kvps.TryGetValue("GooglePlayPublicKey", out o); GooglePlayPublicKey = o; this.AmazonSandboxEnabled = bool.Parse (element.kvps ["useAmazonSandbox"]); CurrentPlatform = BillingPlatform.MacAppStore; #if UNITY_ANDROID CurrentPlatform = (BillingPlatform) Enum.Parse(typeof(BillingPlatform), element.kvps["androidBillingPlatform"]); #endif #if UNITY_IPHONE CurrentPlatform = BillingPlatform.AppleAppStore; #endif }
public ProductIdRemapper (InventoryDatabase db, UnibillXmlParser parser, UnibillConfiguration config) { this.db = db; this.parser = parser; initialiseForPlatform(config.CurrentPlatform); }
public HelpCentre (UnibillXmlParser parser) { foreach (var element in parser.Parse("unibillStrings", "unibillError")) { UnibillError error = (UnibillError) Enum.Parse(typeof(UnibillError), element.attributes["id"]); helpMap[error] = element.kvps["message"]; } }