public StreamImpl GetStream(System.Type returnType, ulong id) { CheckDisposed(); lock (updateLock) { if (!streams.ContainsKey(id)) { streams [id] = new StreamImpl(connection, id, returnType, updateLock); } return(streams [id]); } }
public StreamImpl AddStream(System.Type returnType, ProcedureCall call) { CheckDisposed(); var id = connection.KRPC().AddStream(call, false).Id; lock (updateLock) { if (!streams.ContainsKey(id)) { streams [id] = new StreamImpl(connection, id, returnType, updateLock); } return(streams [id]); } }
internal Stream(Connection connection, ProcedureCall call) { stream = connection.StreamManager.AddStream(typeof(TReturnType), call); }
internal Stream(Connection connection, ulong id) { stream = connection.StreamManager.GetStream(typeof(TReturnType), id); }