예제 #1
0
        public PipeProxy(NamedPipeChannelDefinition definition, IDispatcher dispatch, IMessageSerializer messageSerializer)
        {
            Definition  = definition;
            Dispatcher  = dispatch;
            Serializer  = messageSerializer;
            PipeFactory = new PipeEndpointFactory();
            Pipe        = PipeFactory.CreateEndpointForChannel(definition);

            RingBuffer = new RingBuffer(1000);
            RingBuffer.AddTransform(DeserializeMessage);
            RingBuffer.AddTransform(DispatchResult);
            RingBuffer.Start();
        }
예제 #2
0
 public PipeProxy( NamedPipeChannelDefinition definition, IDispatcher dispatch, IMessageSerializer messageSerializer )
 {
     Definition = definition;
     Dispatcher = dispatch;
     Serializer = messageSerializer;
     PipeFactory = new PipeEndpointFactory();
     Pipe = PipeFactory.CreateEndpointForChannel( definition );
     
     RingBuffer = new RingBuffer( 1000 );
     RingBuffer.AddTransform( DeserializeMessage );
     RingBuffer.AddTransform( DispatchResult );
     RingBuffer.Start();
 }