Example #1
0
 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]);
     }
 }
Example #2
0
        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]);
            }
        }
Example #3
0
 internal Stream(Connection connection, ProcedureCall call)
 {
     stream = connection.StreamManager.AddStream(typeof(TReturnType), call);
 }
Example #4
0
 internal Stream(Connection connection, ulong id)
 {
     stream = connection.StreamManager.GetStream(typeof(TReturnType), id);
 }