Why Base64Encoder use the Decode function ?? extend with MessageToMessageDecoder
- Dominant language
- C#
- Stars
- 4.3k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
Why Base64Encoder use the Decode function ?? extend with MessageToMessageDecoder
`
namespace DotNetty.Codecs.Base64{ using System.Collections.Generic; using DotNetty.Buffers; using DotNetty.Transport.Channels;
public sealed class Base64Encoder : MessageToMessageDecoder<IByteBuffer> { readonly bool breakLines; readonly Base64Dialect dialect;
public Base64Encoder() : this(true) { }
public Base64Encoder(bool breakLines) : this(breakLines, Base64Dialect.STANDARD) { }
public Base64Encoder(bool breakLines, Base64Dialect dialect) { this.breakLines = breakLines; this.dialect = dialect; }
protected internal override void Decode(IChannelHandlerContext context, IByteBuffer message, List<object> output) => output.Add(Base64.Encode(message, this.breakLines, this.dialect));
public override bool IsSharable => true; }}
`
Contributor guide
Assessment
This issue has not been assessed yet.