void TransparentStreamGetReadTimeoutRequestMessageReceived(TransparentStreamMessageBase transparentStreamMessageBase)
        {
            TransparentStreamGetReadTimeoutRequestMessage request = (TransparentStreamGetReadTimeoutRequestMessage)transparentStreamMessageBase;
            Exception exception   = null;
            int       readTimeout = -1;

            try {
                readTimeout = baseStream.ReadTimeout;
            } catch (Exception ex) {
                exception = ex;
            }
            objectBusSession.SendMessage(new TransparentStreamGetReadTimeoutResponseMessage(streamID, request.ID, readTimeout, exception));
        }
示例#2
0
		public IAsyncResult BeginGetReadTimeout ()
		{
			TransparentStreamGetReadTimeoutRequestMessage request = new TransparentStreamGetReadTimeoutRequestMessage (Guid.NewGuid (), streamID);
			TransparentStreamAsyncResult result = new TransparentStreamAsyncResult (null);
			if (!pendingGetReadTimeoutRequests.TryAdd (request.ID, result)) {
				throw new Exception ("request failed before sending.");
			}
			objectBusSession.SendMessage (request);
			return result;
		}