Ejemplo n.º 1
0
        /// <summary>
        /// Called by the platform for initialize the module
        /// </summary>
        /// <param name="platform">A backwards pointer to the platform</param>
        /// <param name="logger">The default logging object</param>
        /// <param name="moduleInfo">ModuleInfo for the module</param>
        /// <param name="secret">Secret</param>
        public sealed override void Initialize(VPlatform platform, VLogger logger, VModuleInfo moduleInfo, int secret)
        {
            this.platform       = platform;
            this.logger         = logger;
            this.moduleInfo     = moduleInfo;
            this.secret         = secret;
            this.streamFactory  = StreamFactory.Instance;
            this.safeToGoOnline = platform.SafeToGoOnline();

            myPorts = new List <Port>();
            defaultPortCapabilities = new Dictionary <Port, Capability>();
            this.capabilityStore    = new Dictionary <VPort, VCapability>();

            InitPort(new PortInfo("ctrlport", moduleInfo));

            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(LogUnhandledException);

            logger.Log("Initialized {0}", moduleInfo.ToString());
        }
Ejemplo n.º 2
0
 public bool SafeToGoOnline()
 {
     return(_view.SafeToGoOnline());
 }