public void Init(IServiceMarshalling serviceMarshalling, IServerMarshaling serverMarshaling)
        {
            lock (syncobject)
            {
                if (HostServiceLogger == null)
                {
                    HostServiceLogger = new Logger(serviceMarshalling.GetHostedService(typeof(SourceCode.Logging.ILogger)) as SourceCode.Logging.ILogger);
                    HostServiceLogger.LogDebug("Logger loaded from ServiceMarshalling");
                }

                if (IdentityService == null)
                {
                    IdentityService = serviceMarshalling.GetHostedService(typeof(IIdentityService)) as IIdentityService;
                }
                if (SecurityManager == null)
                {
                    SecurityManager = serverMarshaling.GetSecurityManagerContext();
                }
            }
        }
Exemplo n.º 2
0
 public void Init(IServiceMarshalling serviceMarshalling, IServerMarshaling serverMarshaling)
 {
     lock (syncobject)
     {
         if (K2Connection == null)
         {
             K2Connection = new K2Connection(serviceMarshalling, serverMarshaling);
         }
         if (IdentityService == null)
         {
             IdentityService = serviceMarshalling.GetHostedService(typeof(IIdentityService)) as IIdentityService;
         }
     }
 }
        public void Init(IServiceMarshalling serviceMarshalling, IServerMarshaling serverMarshaling)
        {
            lock (syncobject)
            {
                //if (Logger == null)
                //{
                //    Logger = new Logger(serviceMarshalling.GetHostedService(typeof(SourceCode.Logging.ILogger)) as SourceCode.Logging.ILogger);
                //    Logger.LogDebug("Logger loaded from ServiceMarshalling");
                //}

                if (IdentityService == null)
                {
                    IdentityService = serviceMarshalling.GetHostedService(typeof(IIdentityService)) as IIdentityService;
                }
                if (SecurityManager == null)
                {
                    SecurityManager = serverMarshaling.GetSecurityManagerContext();
                }

            }
        }
        /// <summary>
        /// Initializes the security provider.
        /// </summary>
        /// <param name="ServiceMarshalling">An IServiceMarshalling representing the service marshaling.</param>
        /// <param name="ServerMarshaling">An IServerMarshaling representing the server marshaling.</param>
        public void Init(IServiceMarshalling ServiceMarshalling, IServerMarshaling ServerMarshaling)
        {
            // Get configuration manager from service marshaling.

            _configurationManager = ServiceMarshalling.GetConfigurationManagerContext();
            // Get security manager from server marshaling.
            _securityManager = ServerMarshaling.GetSecurityManagerContext();
            
            //set up logging
            this._logger = (Logger)ServiceMarshalling.GetHostedService(typeof(Logger).ToString());
        }
 void IHostableType.Init(IServiceMarshalling ServiceMarshalling, IServerMarshaling ServerMarshaling)
 {
     if (Logger.SelfLoaded == true)
     {
         string type = typeof(SourceCode.Logging.Logger).ToString();
         if (ServiceMarshalling.IsServiceHosted(type))
         {
             Logger = new Logger((SourceCode.Logging.Logger)ServiceMarshalling.GetHostedService(type));
             Logger.LogDebug("Logger loaded from ServiceMarshalling");
         }
     }
 }
        public void Init(IServiceMarshalling serviceMarshalling, IServerMarshaling serverMarshaling)
        {
            lock (syncobject)
            {
                if (Logger.SelfLoaded == true)
                {
                    string type = typeof(SourceCode.Logging.Logger).ToString();
                    if (serviceMarshalling.IsServiceHosted(type))
                    {
                        Logger = new Logger((SourceCode.Logging.Logger)serviceMarshalling.GetHostedService(type));
                        Logger.LogDebug("Logger loaded from ServiceMarshalling");
                    }
                }

                if (IdentityService == null)
                {
                    IdentityService = serviceMarshalling.GetHostedService(typeof(IIdentityService)) as IIdentityService;
                }
                if (SecurityManager == null)
                {
                    SecurityManager = serverMarshaling.GetSecurityManagerContext();
                }

            }
        }