using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.IO; namespace BodyshopPartner.Utils { public static class AppMetaData { //TODO: Change firebase API Key to be dependent on what environment monitor has been set for. public static string ActiveShopId = Properties.Settings.Default.LastSelectedShop; public static string ActiveShopName = ""; public static string user = ""; public static string ShopRegion = ""; public static dynamic CiecaOpCodes; private static NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger(); public static string graphQlEndpoint; public static string FirebaseAPIKey; public static Boolean IsTest = false; private static string workingDirectory = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location); public static string globalScriptsPath = @"C:\ImEX\PartnerScripts"; public static void CreateEndpoints() { logger.Debug("Creating endpoints for graphql."); string[] args = Environment.GetCommandLineArgs(); if (args.Length == 1) { #if DEBUG graphQlEndpoint = "https://bodyshop-dev-db.herokuapp.com/v1/graphql"; FirebaseAPIKey = "AIzaSyDPLT8GiDHDR1R4nI66Qi0BY1aYviDPioc"; #elif TEST graphQlEndpoint = "https://db.test.bodyshop.app/v1/graphql"; FirebaseAPIKey = "AIzaSyBw7_GTy7GtQyfkIRPVrWHEGKfcqeyXw0c"; #else graphQlEndpoint = "https://db.imex.online/v1/graphql"; FirebaseAPIKey = "AIzaSyDSezy-jGJreo7ulgpLdlpOwAOrgcaEkhU"; #endif } else { if (args[1] == "test") { IsTest = true; graphQlEndpoint = "https://db.test.bodyshop.app/v1/graphql"; FirebaseAPIKey = "AIzaSyBw7_GTy7GtQyfkIRPVrWHEGKfcqeyXw0c"; } else { #if DEBUG graphQlEndpoint = "https://bodyshop-dev-db.herokuapp.com/v1/graphql"; FirebaseAPIKey = "AIzaSyDPLT8GiDHDR1R4nI66Qi0BY1aYviDPioc"; #else graphQlEndpoint = "https://db.imex.online/v1/graphql"; FirebaseAPIKey = "AIzaSyDSezy-jGJreo7ulgpLdlpOwAOrgcaEkhU"; #endif } } } } }