public SerialPortMessageChannel(IByteStream byteStream, IMessageParserFactory messageParserFactoryFactory, IMessageEncoderFactory messageEncoderFactoryFactory) { _byteStream = byteStream; _messageParserFactory = messageParserFactoryFactory; _messageEncoderFactory = messageEncoderFactoryFactory; }
public void Register(IMessageEncoderFactory factory) { if (factory == null) { throw new ArgumentNullException("factory"); } _encoderFactories.Add(factory); }
public void AddMessageEncoder <TMessage>(IMessageEncoderFactory <TMessage> factory) { if (factory == null) { throw new ArgumentNullException("factory"); } Type messageType = typeof(TMessage); lock (_type2encoderFactory) { if (_type2encoderFactory.ContainsKey(messageType)) { throw new InvalidOperationException("The specified message type (" + messageType.Name + ") is registered already."); } _type2encoderFactory[messageType] = factory; } }
// methods public new IMessageEncoder<QueryMessage> GetEncoder(IMessageEncoderFactory encoderFactory) { return encoderFactory.GetQueryMessageEncoder(); }
// methods public new IMessageEncoder <KillCursorsMessage> GetEncoder(IMessageEncoderFactory encoderFactory) { return(encoderFactory.GetKillCursorsMessageEncoder()); }
// public methods /// <inheritdoc /> public override IMessageEncoder GetEncoder(IMessageEncoderFactory encoderFactory) { return(encoderFactory.GetCommandMessageEncoder()); }
// public methods /// <inheritdoc /> public IMessageEncoder GetEncoder(IMessageEncoderFactory encoderFactory) { return(encoderFactory.GetCommandResponseMessageEncoder()); }
protected abstract IMessageEncoder GetNonGenericEncoder(IMessageEncoderFactory encoderFactory);
protected override IMessageEncoder GetNonGenericEncoder(IMessageEncoderFactory encoderFactory) { return GetEncoder(encoderFactory); }
// methods /// <inheritdoc/> public override IMessageEncoder GetEncoder(IMessageEncoderFactory encoderFactory) { return encoderFactory.GetKillCursorsMessageEncoder(); }
// methods public new IMessageEncoder<KillCursorsMessage> GetEncoder(IMessageEncoderFactory encoderFactory) { return encoderFactory.GetKillCursorsMessageEncoder(); }
public void AddMessageEncoder <TMessage>(IMessageEncoderFactory <TMessage> factory) { this.encoder.AddMessageEncoder <TMessage>(factory); }
// methods public IMessageEncoder GetEncoder(IMessageEncoderFactory encoderFactory) { return(GetNonGenericEncoder(encoderFactory)); }
// methods public new IMessageEncoder <QueryMessage> GetEncoder(IMessageEncoderFactory encoderFactory) { return(encoderFactory.GetQueryMessageEncoder()); }
// methods public new IMessageEncoder <UpdateMessage> GetEncoder(IMessageEncoderFactory encoderFactory) { return(encoderFactory.GetUpdateMessageEncoder()); }
// methods /// <inheritdoc/> public abstract IMessageEncoder GetEncoder(IMessageEncoderFactory encoderFactory);
// methods /// <inheritdoc /> public IMessageEncoder GetEncoder(IMessageEncoderFactory encoderFactory) { return(encoderFactory.GetReplyMessageEncoder <TDocument>(_documentSerializer)); }
// methods public new IMessageEncoder <GetMoreMessage> GetEncoder(IMessageEncoderFactory encoderFactory) { return(encoderFactory.GetGetMoreMessageEncoder()); }
// methods public new IMessageEncoder<UpdateMessage> GetEncoder(IMessageEncoderFactory encoderFactory) { return encoderFactory.GetUpdateMessageEncoder(); }
// methods /// <inheritdoc/> public override IMessageEncoder GetEncoder(IMessageEncoderFactory encoderFactory) { return encoderFactory.GetDeleteMessageEncoder(); }
// methods /// <inheritdoc/> public override IMessageEncoder GetEncoder(IMessageEncoderFactory encoderFactory) { return(encoderFactory.GetReplyMessageEncoder <TDocument>(_serializer)); }
// methods public new IMessageEncoder <InsertMessage <TDocument> > GetEncoder(IMessageEncoderFactory encoderFactory) { return(encoderFactory.GetInsertMessageEncoder <TDocument>(_serializer)); }
// public methods /// <inheritdoc /> public IMessageEncoder GetEncoder(IMessageEncoderFactory encoderFactory) { return(encoderFactory.GetCompressedMessageEncoder(_originalEncoderSelector)); }
protected override IMessageEncoder GetNonGenericEncoder(IMessageEncoderFactory encoderFactory) { return(GetEncoder(encoderFactory)); }
// methods public new IMessageEncoder <DeleteMessage> GetEncoder(IMessageEncoderFactory encoderFactory) { return(encoderFactory.GetDeleteMessageEncoder()); }
// methods /// <inheritdoc/> public override IMessageEncoder GetEncoder(IMessageEncoderFactory encoderFactory) { return(encoderFactory.GetGetMoreMessageEncoder()); }
/// <inheritdoc /> public override IMessageEncoder GetEncoder(IMessageEncoderFactory encoderFactory) { return(encoderFactory.GetCompressedMessageEncoder(null)); }
// methods /// <inheritdoc/> public override IMessageEncoder GetEncoder(IMessageEncoderFactory encoderFactory) { return(encoderFactory.GetKillCursorsMessageEncoder()); }
// methods public IMessageEncoder GetEncoder(IMessageEncoderFactory encoderFactory) { return GetNonGenericEncoder(encoderFactory); }