public override void WriteBase64(byte[] buffer, int index, int count)
{
try
{
if (buffer == null)
{
throw new ArgumentNullException(nameof(buffer));
}
if (index < 0)
{
throw new ArgumentOutOfRangeException(nameof(index));
}
if (count < 0)
{
throw new ArgumentOutOfRangeException(nameof(count));
}
if (count > buffer.Length - index)
{
throw new ArgumentOutOfRangeException(nameof(count));
}
AdvanceState(Token.Base64);
_writer.WriteBase64(buffer, index, count);
}
catch
{
_currentState = State.Error;
throw;
}
}