3internal sealed class OSEncoding : Encoding
47 fixed (
char* ptr =
chars)
63 fixed (
char* pChars =
s)
71 if (
s ==
null ||
bytes ==
null)
83 if (byteIndex < 0 || byteIndex >
bytes.Length)
91 if (
bytes.Length == 0)
97 fixed (
byte* ptr2 = &
bytes[0])
118 if (byteIndex < 0 || byteIndex >
bytes.Length)
126 if (
bytes.Length == 0)
130 fixed (
char* ptr =
chars)
132 fixed (
byte* ptr2 = &
bytes[0])
157 fixed (
byte* ptr =
bytes)
177 if (charIndex < 0 || charIndex >
chars.Length)
185 if (
chars.Length == 0)
189 fixed (
byte* ptr =
bytes)
191 fixed (
char* ptr2 = &
chars[0])
205 if (num >
int.MaxValue)
219 if (num >
int.MaxValue)
256 return base.GetDecoder();
272 int num = global::Interop.Kernel32.MultiByteToWideChar((uint)codePage, 0u, pBytes,
byteCount, pChars,
count);
static string ArgumentOutOfRange_Index
static string Argument_EncodingConversionOverflowBytes
static string Argument_InvalidCharSequenceNoIndex
static string ArgumentOutOfRange_IndexCount
static string ArgumentOutOfRange_GetCharCountOverflow
static string Argument_EncodingConversionOverflowChars
static string ArgumentOutOfRange_GetByteCountOverflow
static string ArgumentOutOfRange_IndexCountBuffer
static string ArgumentNull_Array
static string ArgumentOutOfRange_NeedNonNegNum
override Decoder GetDecoder()
unsafe override int GetBytes(char[] chars, int charIndex, int charCount, byte[] bytes, int byteIndex)
unsafe override int GetByteCount(string s)
override int GetMaxCharCount(int byteCount)
override int GetMaxByteCount(int charCount)
unsafe override int GetChars(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex)
static unsafe int MultiByteToWideChar(int codePage, byte *pBytes, int byteCount, char *pChars, int count)
unsafe override int GetBytes(string s, int charIndex, int charCount, byte[] bytes, int byteIndex)
static unsafe int WideCharToMultiByte(int codePage, char *pChars, int count, byte *pBytes, int byteCount)
unsafe override int GetByteCount(char[] chars, int index, int count)
override Encoder GetEncoder()
unsafe override int GetCharCount(byte[] bytes, int index, int count)
override string EncodingName
static readonly IntPtr Zero