예제 #1
0
파일: ServiceHost.cs 프로젝트: radtek/Xeeny
        private ServiceHost(IList <IListener> listeners, ISerializer serializer,
                            Type callbackType, ILoggerFactory loggerFactory)
        {
            TypeDescription <TService> .ValidateAsService(callbackType);

            _listeners    = new ReadOnlyCollection <IListener>(listeners);
            _serializer   = serializer;
            _msgBuilder   = new MessageBuilder(_serializer);
            _callbackType = callbackType;
            _logger       = loggerFactory.CreateLogger("ServiceHost");
        }
예제 #2
0
파일: ServiceHost.cs 프로젝트: PCavan/Xeeny
        internal ServiceHost(IList <IListener> listeners, InstanceMode instanceMode, ISerializer serializer,
                             Type callbackType, ILoggerFactory loggerFactory)
        {
            TypeDescription <TService> .ValidateAsService(callbackType);

            _listeners    = new ReadOnlyCollection <IListener>(listeners);
            _serializer   = serializer;
            _msgBuilder   = new MessageBuilder(_serializer);
            _callbackType = callbackType;
            _logger       = loggerFactory.CreateLogger("ServiceHost");

            _instanceContextFactory = new InstanceContextFactory <TService>(instanceMode, _msgBuilder, loggerFactory);
            _instanceContextFactory.InstanceCreated        += OnInstanceFactoryInstanceCreate;
            _instanceContextFactory.SessionInstanceRemoved += OnInstanceFactorySessionInstanceRemoved;
        }