void TransparentStreamGetWriteTimeoutRequestMessageReceived(TransparentStreamMessageBase transparentStreamMessageBase)
        {
            TransparentStreamGetWriteTimeoutRequestMessage request = (TransparentStreamGetWriteTimeoutRequestMessage)transparentStreamMessageBase;
            Exception exception    = null;
            int       writeTimeout = -1;

            try {
                writeTimeout = baseStream.WriteTimeout;
            } catch (Exception ex) {
                exception = ex;
            }
            objectBusSession.SendMessage(new TransparentStreamGetWriteTimeoutResponseMessage(streamID, request.ID, writeTimeout, exception));
        }
Exemple #2
0
		public IAsyncResult BeginGetWriteTimeout ()
		{
			TransparentStreamGetWriteTimeoutRequestMessage request = new TransparentStreamGetWriteTimeoutRequestMessage (Guid.NewGuid (), streamID);
			TransparentStreamAsyncResult result = new TransparentStreamAsyncResult (null);
			if (!pendingGetWriteTimeoutRequests.TryAdd (request.ID, result)) {
				throw new Exception ("request failed before sending.");
			}
			objectBusSession.SendMessage (request);
			return result;
		}