New() public static method

public static New ( ) : StreamCapture
return StreamCapture
Esempio n. 1
0
 public T Receive <T>()
 {
     using (var capture = StreamCapture.New())
     {
         var result = ReadBsonMessage <T>();
         ReadStreams(capture);
         log.Write(EventType.Diagnostic, "Received: {0}", result);
         return(result);
     }
 }
Esempio n. 2
0
        public void Send <T>(T message)
        {
            using (var capture = StreamCapture.New())
            {
                WriteBsonMessage(message);
                WriteEachStream(capture.SerializedStreams);
            }

            log.Write(EventType.Diagnostic, "Sent: {0}", message);
        }