Beispiel #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();

            // 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");
        }
Beispiel #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();

            //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");
        }
Beispiel #3
0
 /// <summary>
 /// Called when the server status updated.
 /// </summary>
 /// <param name="server">The server.</param>
 /// <param name="previousStatus">The previous status.</param>
 /// <param name="status">The status.</param>
 internal static void OnServerStatusUpdated(EveServer server, ServerStatus previousStatus, ServerStatus status)
 {
     Trace("EveClient.OnServerStatusUpdated");
     if (ServerStatusUpdated != null)
     {
         ServerStatusUpdated(null, new EveServerEventArgs(server, previousStatus, status));
     }
 }
Beispiel #4
0
        /// <summary>
        /// Called when the server status updated.
        /// </summary>
        /// <param name="server">The server.</param>
        /// <param name="previousStatus">The previous status.</param>
        /// <param name="status">The status.</param>
        internal static void OnServerStatusUpdated(EveServer server, ServerStatus previousStatus, ServerStatus status)
        {
            if (Closed)
            {
                return;
            }

            Trace();
            ServerStatusUpdated?.ThreadSafeInvoke(null, new EveServerEventArgs(server, previousStatus, status));
        }
Beispiel #5
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");
            }
        }
Beispiel #6
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");
            }
        }
Beispiel #7
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="server"></param>
 /// <param name="previousStatus"></param>
 /// <param name="status"></param>
 public EveServerEventArgs(EveServer server, ServerStatus previousStatus, ServerStatus status)
 {
     Server         = server;
     Status         = status;
     PreviousStatus = previousStatus;
 }
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="server"></param>
 /// <param name="previousStatus"></param>
 /// <param name="status"></param>
 public EveServerEventArgs(EveServer server, ServerStatus previousStatus, ServerStatus status)
 {
     Server = server;
     Status = status;
     PreviousStatus = previousStatus;
 }
Beispiel #9
0
 /// <summary>
 /// Called when the server status updated.
 /// </summary>
 /// <param name="server">The server.</param>
 /// <param name="previousStatus">The previous status.</param>
 /// <param name="status">The status.</param>
 internal static void OnServerStatusUpdated(EveServer server, ServerStatus previousStatus, ServerStatus status)
 {
     Trace("EveClient.OnServerStatusUpdated");
     if (ServerStatusUpdated != null)
         ServerStatusUpdated(null, new EveServerEventArgs(server, previousStatus, status));
 }
Beispiel #10
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="server"></param>
 /// <param name="previousStatus"></param>
 /// <param name="status"></param>
 public EveServerEventArgs(EveServer server, ServerStatus previousStatus, ServerStatus status)
 {
     m_server         = server;
     m_status         = status;
     m_previousStatus = previousStatus;
 }