コード例 #1
0
        public override void Dispose()
        {
            imageClient = null;

            logger.Dispose();
            logger = null;

            utility = null;
            helper  = null;

            hub.Unsubscribe <IInputMessage>(this.IInputMessageProcessor);
        }
コード例 #2
0
        public ICANSEE() : base("ICANSEEv1")
        {
            imageClient = new ImageClient();

            brokerHubHost = System.Configuration.ConfigurationSettings.AppSettings["ChatInterfaceHost"];
            brokerHubPort = System.Configuration.ConfigurationSettings.AppSettings["ChatInterfacePort"];

            logger  = new ICANSEELogger();
            utility = new ICANSEEUtility(logger, imageClient, brokerHubHost, brokerHubPort);
            helper  = new ICANSEEHelper(logger, utility, imageClient, brokerHubHost, brokerHubPort);

            hub.Subscribe <IInputMessage>(this.IInputMessageProcessor);
        }
コード例 #3
0
        public ICANSEEHelper(ICANSEEUtility utility, ImageClient imageClient, string brokerHubHost, string brokerHubPort)
        {
            this.utility       = utility;
            this.imageClient   = imageClient;
            this.brokerHubHost = brokerHubHost;
            this.brokerHubPort = brokerHubPort;

            computeDeviceList = utility.GetComputeDevicesList();

            if (computeDeviceList.Count <= 0)
            {
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine("No compute devices available (Check ComputeDeviceConfig file for extensive list)");
                Console.ResetColor();
            }
        }
コード例 #4
0
        public ICANSEEHelper(ICANSEELogger logger, ICANSEEUtility utility, ImageClient imageClient, string brokerHubHost, string brokerHubPort)
        {
            this.logger        = logger;
            this.utility       = utility;
            this.imageClient   = imageClient;
            this.brokerHubHost = brokerHubHost;
            this.brokerHubPort = brokerHubPort;

            computeDeviceList = utility.GetComputeDevicesList();

            if (computeDeviceList.Count <= 0)
            {
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine("No compute devices available (Check ComputeDeviceConfig file for extensive list)");
                Console.ResetColor();
            }
            else
            {
                foreach (var computeDevice in computeDeviceList)
                {
                    computeDeviceStateMap[computeDevice] = new Dictionary <int, ComputeDeviceState>();
                }
            }
        }