internal EncoderNLSSurrogate(SerializationInfo info, StreamingContext context)
{
if (info == null)
{
throw new ArgumentNullException(nameof(info));
}
_encoding = (Encoding)info.GetValue(EncodingKey, typeof(Encoding));
_fallback = (EncoderFallback)info.GetValue(DecoderFallbackKey, typeof(EncoderFallback));
_charLeftOver = (char)info.GetValue(CharLeftOverKey, typeof(char));
}