public Encoder(Base16Settings settings) { if (settings == null) { throw new ArgumentNullException(nameof(settings)); } _encoder = new Base16Encoder(settings); }
/// <summary> /// Constructs a new instance of the <see cref="Base16Codec"/> with the specified settings. /// </summary> /// <param name="settings">The <see cref="Base16Settings"/> that determine how the instance operates.</param> /// <exception cref="ArgumentNullException">The <paramref name="settings"/> parameter is <c>null</c>.</exception> public Base16Codec(Base16Settings settings) { if (settings == null) { throw new ArgumentNullException(nameof(settings)); } Settings = settings.ToReadOnly(); }
/// <summary> /// Creates a new instance of the class with settings supplied by <paramref name="inheritedSettings"/>. /// </summary> /// <param name="inheritedSettings">The settings to duplicate.</param> /// <exception cref="ArgumentNullException"><paramref name="inheritedSettings"/> is <c>null</c>.</exception> public Base16Settings(Base16Settings inheritedSettings) : this(true) { if (inheritedSettings == null) { throw new ArgumentNullException(nameof(inheritedSettings)); } InheritSettings(inheritedSettings); }
public Base16Decoder(Base16Settings settings) { if (settings == null) { throw new ArgumentNullException(nameof(settings)); } // initialize all fields to default values.. this = default; settings.GetDecoderSettings( out _decodingTable, out _decodingAffixTable, out _decodingPrefixes, out _decodingPostfixes, out _flags ); Reset(); }
public Base16Encoder(Base16Settings settings) { if (settings == null) { throw new ArgumentNullException(nameof(settings)); } // initialize all fields to defaults.. this = default; settings.GetEncoderSettings( out _alphabet, out _flags, out _lineSeparator, out _maximumLineLength, out _initialAffix, out _finalAffix ); Reset(); }
private Base16Settings(Base16Settings inheritedSettings, bool isProtected) : this(inheritedSettings) { IsProtected = isProtected; }
public Decoder(Base16Settings settings) { _codecDecoder = new Base16Decoder(settings); }