예제 #1
0
 internal MessageClient(string clientId, MessageDestination messageDestination, string endpointId, bool useSession)
 {
     SetIsValid(true);
     _clientId = clientId;
     Debug.Assert(messageDestination != null);
     _messageDestination = messageDestination;
     _endpointId         = endpointId;
     if (useSession)
     {
         _session = FluorineContext.Current.Session as Session;
         if (_session != null)
         {
             _session.RegisterMessageClient(this);
         }
         _client = FluorineContext.Current.Client;
         Debug.Assert(_client != null);
         _client.RegisterMessageClient(this);
     }
     else
     {
         _session = null;
         _client  = null;
     }
     if (log.IsDebugEnabled)
     {
         string msg = string.Format("MessageClient created with clientId {0} for destination {1}", _clientId, _messageDestination.Id);
         log.Debug(msg);
     }
 }
예제 #2
0
		internal MessageClient(string clientId, MessageDestination messageDestination, string endpointId, bool useSession) {
			SetIsValid(true);
			_clientId = clientId;
			Debug.Assert(messageDestination != null);
			_messageDestination = messageDestination;
			_endpointId = endpointId;
			if (useSession) {
				_session = FluorineContext.Current.Session as Session;
				if (_session != null)
					_session.RegisterMessageClient(this);
				_client = FluorineContext.Current.Client;
				Debug.Assert(_client != null);
				_client.RegisterMessageClient(this);
			} else {
				_session = null;
				_client = null;
			}
			if (log.IsDebugEnabled) {
				string msg = string.Format("MessageClient created with clientId {0} for destination {1}", _clientId, _messageDestination.Id);
				log.Debug(msg);
			}
		}
예제 #3
0
		internal MessageClient(string clientId, MessageDestination destination, string endpointId)
			: this(clientId, destination, endpointId, true) {
		}
예제 #4
0
 internal MessageClient(string clientId, MessageDestination destination, string endpointId)
     : this(clientId, destination, endpointId, true)
 {
 }