コード例 #1
0
        public static IExCommsServiceInfo Run(IExecutorService executorService, string[] args)
        {
            using (ILogMethod method = Log.LogMethod("CommsServicesFactrory", "Run"))
            {
                IExCommsServiceInfo result = null;

                try
                {
                    var    activators = MEFHelper.GetExportedValues <IExCommsServerHostFactoryActivator>();
                    string key        = args.Length == 0 ? "/all" :
                                        ((args[0] == "/debug") ?
                                         ((args.Length == 1) ? "/all" : args[1]) : args[0]);

                    if (_servicesInfo.ContainsKey(key))
                    {
                        result = _servicesInfo[key](executorService, activators);
                    }
                }
                catch (Exception ex)
                {
                    method.Exception(ex);
                }

                return(result);
            }
        }
コード例 #2
0
 public override void Run()
 {
     _serviceInfo = ExCommsServicesFactrory.Run(_executorService, _args);
     _mutexGuid = _serviceInfo.ServiceGuid;
     this.RunInternal(_serviceInfo.ServiceName, _serviceInfo.DisplayName, typeof(Program).Assembly.Location);
 }
コード例 #3
0
 public override void Run()
 {
     _serviceInfo = ExCommsServicesFactrory.Run(_executorService, _args);
     _mutexGuid   = _serviceInfo.ServiceGuid;
     this.RunInternal(_serviceInfo.ServiceName, _serviceInfo.DisplayName, typeof(Program).Assembly.Location);
 }