protected Guid CreateStream(System.IO.Stream backendStream) { TransparentStreamServer tss = new TransparentStreamServer(this, backendStream, objectBusSession); streamServers.TryAdd(tss.StreamID, tss); return(tss.StreamID); }
internal void RemoveStreamServer(TransparentStreamServer transparentStreamServer) { TransparentStreamServer referenece; streamServers.TryGetValue(transparentStreamServer.StreamID, out referenece); if (referenece != transparentStreamServer) { throw new InvalidOperationException("requested stream server has an id belonging to this agent but the object itself does not"); } streamServers.TryRemove(transparentStreamServer.StreamID, out referenece); }