Example #1
0
        /// <summary>
        /// Initializes paths, static objects, check and load datafiles, etc.
        /// </summary>
        /// <remarks>May be called more than once without causing redundant operations to occur.</remarks>
        public static void Initialize()
        {
            if (s_initialized)
                return;

            s_initialized = true;

            Trace("begin");

            // Network monitoring (connection availability changes)
            NetworkMonitor.Initialize();

            //Set swagger global config
            Configuration.Default = new Configuration
            {
                BasePath = "https://esi.tech.ccp.is/",
                UserAgent = "EveMon - Development",
            };

            // APIMethods collection initialization (always before members instatiation)
            APIMethods.Initialize();

            // Members instantiations
            APIProviders = new GlobalAPIProviderCollection();
            MonitoredCharacters = new GlobalMonitoredCharacterCollection();
            CharacterIdentities = new GlobalCharacterIdentityCollection();
            Notifications = new GlobalNotificationCollection();
            Characters = new GlobalCharacterCollection();
            Datafiles = new GlobalDatafileCollection();
            APIKeys = new GlobalAPIKeyCollection();
            EVEServer = new EveServer();

            Trace("done");
        }
Example #2
0
        /// <summary>
        /// Initializes paths, static objects, check and load datafiles, etc.
        /// </summary>
        /// <remarks>May be called more than once without causing redundant operations to occur.</remarks>
        public static void Initialize()
        {
            if (s_initialized)
            {
                return;
            }

            s_initialized = true;

            Trace("begin");

            // Network monitoring (connection availability changes)
            NetworkMonitor.Initialize();

            // ESIMethods collection initialization (always before members instatiation)
            ESIMethods.Initialize();

            // Members instantiations
            APIProviders        = new GlobalAPIProviderCollection();
            MonitoredCharacters = new GlobalMonitoredCharacterCollection();
            CharacterIdentities = new GlobalCharacterIdentityCollection();
            Notifications       = new GlobalNotificationCollection();
            Characters          = new GlobalCharacterCollection();
            Datafiles           = new GlobalDatafileCollection();
            ESIKeys             = new GlobalAPIKeyCollection();
            EVEServer           = new EveServer();

            Trace("done");
        }
Example #3
0
 /// <summary>
 /// Resets collection that need to be cleared.
 /// </summary>
 internal static void ResetCollections()
 {
     ESIKeys             = new GlobalAPIKeyCollection();
     Characters          = new GlobalCharacterCollection();
     Notifications       = new GlobalNotificationCollection();
     CharacterIdentities = new GlobalCharacterIdentityCollection();
     MonitoredCharacters = new GlobalMonitoredCharacterCollection();
 }
Example #4
0
        /// <summary>
        /// Initializes paths, static objects, check and load datafiles, etc.
        /// </summary>
        /// <remarks>May be called more than once without causing redundant operations to occur.</remarks>
        public static void Initialize()
        {
            lock (s_initializationLock)
            {
                if (s_initialized)
                {
                    return;
                }

                s_initialized = true;

                Trace("EveClient.Initialize() - begin");

                // Members instantiations
                HttpWebService      = new HttpWebService();
                APIProviders        = new GlobalAPIProviderCollection();
                MonitoredCharacters = new GlobalMonitoredCharacterCollection();
                CharacterIdentities = new GlobalCharacterIdentityCollection();
                Notifications       = new GlobalNotificationCollection();
                Characters          = new GlobalCharacterCollection();
                Datafiles           = new GlobalDatafileCollection();
                Accounts            = new GlobalAccountCollection();
                EVEServer           = new EveServer();

                // Load static datas (min order to follow : skills before anything else, items before certs)
                Trace("Load Datafiles - begin");
                StaticProperties.Load();
                StaticSkills.Load();
                StaticItems.Load();
                StaticCertificates.Load();
                StaticBlueprints.Load();
                Trace("Load Datafiles - done");

                // Network monitoring (connection availability changes)
                NetworkMonitor.Initialize();

                Trace("EveClient.Initialize() - done");
            }
        }