Ejemplo n.º 1
0
        void TransparentStreamSetPositionRequestMessageReceived(TransparentStreamMessageBase transparentStreamMessageBase)
        {
            TransparentStreamSetPositionRequestMessage request = (TransparentStreamSetPositionRequestMessage)transparentStreamMessageBase;
            Exception exception = null;

            try {
                baseStream.Position = request.Position;
            } catch (Exception ex) {
                exception = ex;
            }
            objectBusSession.SendMessage(new TransparentStreamSetPositionResponseMessage(streamID, request.ID, exception));
        }
Ejemplo n.º 2
0
		public IAsyncResult BeginSetPosition (long value)
		{
			TransparentStreamSetPositionRequestMessage request = new TransparentStreamSetPositionRequestMessage (Guid.NewGuid (), streamID, value);
			TransparentStreamAsyncResult result = new TransparentStreamAsyncResult (null);
			if (!pendingSetPositionRequests.TryAdd (request.ID, result)) {
				throw new Exception ("request failed before sending.");
			}
			objectBusSession.SendMessage (request);
			return result;
		}