public NamedPipeChannel(NamedPipeChannelDefinition definition, PipeProxy pipe, IDispatcher dispatcher)
 {
     Definition = definition;
     Name       = definition.Name;
     Dispatcher = dispatcher;
     Pipe       = pipe;
     Pipe.Connect();
 }
 public IChannel CreateChannel( IChannelDefinition definition )
 {
     var namedPipeChannelDefinition = definition as NamedPipeChannelDefinition;
     var serializer = Assimilate.GetInstanceOf( definition.SerializerType ) as IMessageSerializer;
     var proxy = new PipeProxy( namedPipeChannelDefinition, Dispatcher, serializer );
     var namedPipeChannel = new NamedPipeChannel( namedPipeChannelDefinition, proxy, Dispatcher );
     return namedPipeChannel;
 }
        public IChannel CreateChannel(IChannelDefinition definition)
        {
            var namedPipeChannelDefinition = definition as NamedPipeChannelDefinition;
            var serializer       = Assimilate.GetInstanceOf(definition.SerializerType) as IMessageSerializer;
            var proxy            = new PipeProxy(namedPipeChannelDefinition, Dispatcher, serializer);
            var namedPipeChannel = new NamedPipeChannel(namedPipeChannelDefinition, proxy, Dispatcher);

            return(namedPipeChannel);
        }