Exemplo n.º 1
0
            private TimeSpan m_fileSaveTimeSpan = new TimeSpan(0, 1, 0); // Every 1 hr, try to save XML file.
            #endregion

            #region Public interface

            public RnlXmlFileImplementation(AppPlatform platform)
                : base(platform)
            {
                m_filePath               = ApplicationConfiguration.RnlFile;
                m_directory              = new Dictionary <string, string>();
                m_fileSaveTimer          = new TimerItem(platform.TimerWheel, m_fileSaveTimeSpan);
                m_fileSaveTimer.Expired += FileSaveTimerExpired;
            }
Exemplo n.º 2
0
        private List <AsyncTask> m_pendingUserEndpointCreationTasks; // Stores tasks that are waiting for user endpoint to establish first.
        #endregion Private fields

        #region Public interface

        public AppFrontEnd(AppPlatform parent, ApplicationEndpointSettings settings) : base(parent)
        {
            Debug.Assert(parent != null);
            m_parent                           = parent;
            m_settings                         = settings;
            m_customerSessions                 = new LinkedList <CustomerSession>();
            m_userEndpoints                    = new Dictionary <RealTimeAddress, MyUserEndpoint>();
            m_userEndpointReferenceCounts      = new Dictionary <RealTimeAddress, int>();
            m_pendingUserEndpointCreationTasks = new List <AsyncTask>();
        }
Exemplo n.º 3
0
        private void StartPlatform()
        {
            string userAgent;
            string applicationId;

            GetPlatformSettings(out userAgent, out applicationId);

            m_platform = new AppPlatform(userAgent, applicationId);
            bool isLogEnabled;

            Logger.LogLevel logSwitch;
            Application.GetLoggerSetting(out isLogEnabled, out logSwitch);
            if (isLogEnabled)
            {
                this.Logger.EnableLog();
            }
            else
            {
                this.Logger.DisableLog();
            }
            this.Logger.LogSwitch = logSwitch;
            try
            {
                m_platform.BeginStartup(
                    ar =>
                {
                    try { m_platform.EndStartup(ar); }
                    catch (RealTimeException e) { Console.Write(e.ToString()); }
                },
                    null);
            }
            catch (InvalidOperationException exp)
            {
                Logger.Log(Logger.LogLevel.Error, "Unable to start the platform.", exp);
            }
        }
Exemplo n.º 4
0
 public static ReverseNumberLookup GetLookupInstance(AppPlatform platform)
 {
     return(new RnlXmlFileImplementation(platform));
 }
Exemplo n.º 5
0
 public ReverseNumberLookup(AppPlatform platform)
     : base(platform)
 {
 }
Exemplo n.º 6
0
        //public ComponentBase()
        //{
        //}

        public ComponentBase(AppPlatform appPlatform)
        {
            m_appPlatform = appPlatform;
        }
Exemplo n.º 7
0
 internal MusicProvider(AppPlatform platform, string mohFilePath) : base(platform)
 {
     m_mohFilePath = mohFilePath;
 }