コード例 #1
0
        /// <summary>
        /// Enables an application to initialize its private variables and allocate system resources.
        /// </summary>
        /// <param name="appInfo">A collection of the attributes and corresponding values that were specified in the application element used to register the application</param>
        /// <param name="entryPointInfo">A collection of the attributes and corresponding values that were specified in the entrypoint element used to register the application's entry points</param>
        public void Initialize(Dictionary <string, object> appInfo, Dictionary <string, object> entryPointInfo)
        {
            _disposed = false;

            needs_cleanup = true;

            if (!Directory.Exists(AddInModule.DATA_DIR))
            {
                Directory.CreateDirectory(AddInModule.DATA_DIR);
            }

            logger = new Logger("Add-In", false);

            //  Set the base port number
            int.TryParse(entryPointInfo["context"].ToString(), out m_basePortNumber);

            m_httpServer = new HttpSocketServer();
            m_httpServer.InitServer();

            //  Sets the wait handle to the launch method will not exit
            m_waitHandle.Reset();
        }
コード例 #2
0
ファイル: AddInModule.cs プロジェクト: RuneHL/MceController
        /// <summary>
        /// Enables an application to initialize its private variables and allocate system resources.
        /// </summary>
        /// <param name="appInfo">A collection of the attributes and corresponding values that were specified in the application element used to register the application</param>
        /// <param name="entryPointInfo">A collection of the attributes and corresponding values that were specified in the entrypoint element used to register the application's entry points</param>
        public void Initialize(Dictionary<string, object> appInfo, Dictionary<string, object> entryPointInfo)
        {
            //  Set the base port number
            int.TryParse(entryPointInfo["context"].ToString(), out m_basePortNumber);

            m_httpServer = new HttpSocketServer(m_remoteCommands);
            m_httpServer.InitServer();

            //  Sets the wait handle to the launch method will not exit
            m_waitHandle.Reset();
        }