Definition at line 31 of file BMPEncoding.cs.
32 {
34 {
35 return 0;
36 }
37 if (
bytes.Length % 2 != 0)
38 {
39 base.DecoderFallback.CreateFallbackBuffer().Fallback(
bytes.Slice(
bytes.Length - 1).ToArray(),
bytes.Length - 1);
41 }
42 int num = 0;
43 for (
int i = 0;
i <
bytes.Length;
i += 2)
44 {
46 char c = (char)num2;
47 if (char.IsSurrogate(c))
48 {
49 base.DecoderFallback.CreateFallbackBuffer().Fallback(
bytes.Slice(i, 2).ToArray(),
i);
51 }
52 if (write)
53 {
55 }
56 num++;
57 }
58 return num;
59 }
@ InvalidOperationException
References System.bytes, and System.chars.