Example #1
0
 protected override void Arguments(IServiceArgs args)
 {
     args.Set("GameId", this.GameId);
     args.Set("UserId", this.UserId);
     args.Set("MaxTime", this.MaxTime);
     args.Set("MinTime", this.MinTime);
     args.Set("GameName", this.GameName);
     args.Set("ZoneId", this.ZoneId);
     args.Set("AndroidAppId", this.AndroidAppId);
     args.Set("IosAppId", this.IosAppId);
     args.Set("HttpServer", this.HttpServer);
 }
Example #2
0
 public BaseDomainService(IServiceArgs args)
 {
     this.serializer = args.serializer;
     if (this.serializer == null)
     {
         throw new ArgumentException(ErrorStrings.ERR_NO_SERIALIZER);
     }
     this._User             = args.principal;
     this._IsCodeGenEnabled = false;
     this._codeGenProviders = null;
     this._serviceContainer = this.CreateServiceContainer();
     this._serviceHelper    = this.CreateServiceHelper();
 }
Example #3
0
        public void Boot(IServiceArgs serviceArgs)
        {
            if (serviceArgs != null)
            {
                if (serviceArgs.LaunchDebugger)
                {
                    Debugger.Launch();
                }
            }

            try
            {
                _log.Log(LogCatagory.Info, "ServiceBoot starting Windows service instance.");

                // Entry point when running in console mode.
                if (Environment.UserInteractive)
                {
                    SubscribeToConsoleCancel();

                    _serviceInstance.StartInstance();

                    _log.Log(LogCatagory.Info, "Windows service instance started. Waiting for stop signal.");
                    // Wait on the stop signal of all instances of ServiceInstance. This will simulate the behaviour of ServiceBase.Run().
                    _serviceInstance.InstanceStopped.WaitOne();
                }
                // Entry point when running as a service.
                else
                {
                    var service = _serviceInstance as ServiceBase;
                    if (service == null)
                    {
                        _log.Log(LogCatagory.Warn, String.Format("Could not cast service instnace to type of ServiceBase. Instance: {0}.", _serviceInstance));
                    }

                    ServiceBase.Run(service);
                }

                _log.Log(LogCatagory.Info, "Windows service instance has stopped.");
            }
            catch (Exception e)
            {
                _log.Log(LogCatagory.Error, e, "ServiceBoot caught an unexpected exception while in Boot().");
            }
        }
 protected override void Arguments(IServiceArgs args)
 {
     args.Set("AppServer", this.AppServer);
     args.Set("AssetServer", this.AssetServer);
     args.Set("Valid", this.Valid);
 }
Example #5
0
 public EFDomainService(IServiceArgs args)
     : this(null, args)
 {
 }
Example #6
0
 public EFDomainService(TDB db, IServiceArgs args)
     : base(args)
 {
     this._db = db;
 }
Example #7
0
 protected override void Arguments(IServiceArgs args)
 {
     args.Set("ValidateData", this.ValidateData);
 }
Example #8
0
 public RIAppDemoService(IServiceArgs args)
     : base(args)
 {
 }
Example #9
0
 protected override void Arguments(IServiceArgs args)
 {
     args.Set("AppId", this.AppId);
     args.Set("AppKey", this.AppKey);
     args.Set("AppSecret", this.AppSecret);
 }
Example #10
0
 public LinqForSqlDomainService(TDB db, IServiceArgs args)
     : base(args)
 {
     this._db = db;
 }
Example #11
0
 public FolderBrowserService(IServiceArgs args)
     : base(args)
 {
     this.IsCodeGenEnabled = true;
 }
Example #12
0
 /// <summary>
 /// Service初始化参数设置入口,安装器可以将需要的初始化参数通过IServiceArgs接口传入Service。
 /// </summary>
 /// <param name="args">IServiceArgs接口。</param>
 protected virtual void Arguments(IServiceArgs args)
 {
 }
Example #13
0
 protected override void Arguments(IServiceArgs args)
 {
     args.Set <bool>("IsUseWebKit", IsUseWebKit);
     args.Set <string>("DefaultURL", this.DefaultURL);
     base.Arguments(args);
 }
Example #14
0
 protected override void Arguments(IServiceArgs args)
 {
     args.Set("AppIdForIOS", this.AppIdForIOS);
     args.Set("AppIdForAndroid", this.AppIdForAndroid);
     args.Set("IsDebug", this.IsDebug);
 }
Example #15
0
 protected override void Arguments(IServiceArgs args)
 {
     args.Set("BigEndian", this.BigEndian);
 }
Example #16
0
 public LinqForSqlDomainService(IServiceArgs args)
     : this(null, args)
 {
 }
 public FolderBrowserService(IServiceArgs args)
     : base(args)
 {
     IsCodeGenEnabled = true;
 }
 protected override void Arguments(IServiceArgs args)
 {
     args.Set("AppId", this.AppId);
     args.Set("AppChannel", this.AppChannel);
 }