void TransparentStreamCanTimeoutRequestMessageReceived(TransparentStreamMessageBase transparentStreamMessageBase)
        {
            TransparentStreamCanTimeoutRequestMessage request = (TransparentStreamCanTimeoutRequestMessage)transparentStreamMessageBase;
            Exception exception  = null;
            bool      canTimeout = false;

            try {
                canTimeout = baseStream.CanTimeout;
            } catch (Exception ex) {
                exception = ex;
            }
            objectBusSession.SendMessage(new TransparentStreamCanTimeoutResponseMessage(streamID, request.ID, canTimeout, exception));
        }
Exemple #2
0
		public IAsyncResult BeginCanTimeout ()
		{
			TransparentStreamCanTimeoutRequestMessage request = new TransparentStreamCanTimeoutRequestMessage (Guid.NewGuid (), streamID);
			TransparentStreamAsyncResult result = new TransparentStreamAsyncResult (null);
			if (!pendingCanTimeoutRequests.TryAdd (request.ID, result)) {
				throw new Exception ("request failed before sending.");
			}
			objectBusSession.SendMessage (request);
			return result;
		}