System.Text.UTF7Encoding.DecoderUTF7FallbackBuffer.InternalFallback C# (CSharp) Method

InternalFallback() private method

private InternalFallback ( byte bytes, byte pBytes ) : int
bytes byte
pBytes byte
return int
            internal unsafe override int InternalFallback(byte[] bytes, byte* pBytes)
            {
                // We expect no previous fallback in our buffer
                BCLDebug.Assert(iCount < 0, "[DecoderUTF7FallbackBuffer.InternalFallback] Can't have recursive fallbacks");
                BCLDebug.Assert(bytes.Length == 1, "[DecoderUTF7FallbackBuffer.InternalFallback] Only possible fallback case should be 1 unknown byte");

                // Can't fallback a byte 0, so return for that case, 1 otherwise.
                return bytes[0] == 0 ? 0 : 1;
            }
        }