using System; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Security; namespace System.Text { /// Represents a character encoding. /// 1 // Token: 0x020005F1 RID: 1521 [ComVisible(true)] [Serializable] public abstract class Encoding : ICloneable { /// Initializes a new instance of the class. // Token: 0x06003748 RID: 14152 RVA: 0x000BD028 File Offset: 0x000BB228 protected Encoding() { } /// Initializes a new instance of the class that corresponds to the specified code page. /// The code page identifier of the preferred encoding.-or- 0, to use the default encoding. /// /// is less than zero. // Token: 0x06003749 RID: 14153 RVA: 0x000BD038 File Offset: 0x000BB238 protected Encoding(int codePage) { this.windows_code_page = codePage; this.codePage = codePage; if (codePage != 1200 && codePage != 1201 && codePage != 12000 && codePage != 12001 && codePage != 65000 && codePage != 65001) { if (codePage != 20127 && codePage != 54936) { this.decoder_fallback = DecoderFallback.ReplacementFallback; this.encoder_fallback = EncoderFallback.ReplacementFallback; } else { this.decoder_fallback = DecoderFallback.ReplacementFallback; this.encoder_fallback = EncoderFallback.ReplacementFallback; } } else { this.decoder_fallback = DecoderFallback.StandardSafeFallback; this.encoder_fallback = EncoderFallback.StandardSafeFallback; } } // Token: 0x0600374B RID: 14155 RVA: 0x000BD2DC File Offset: 0x000BB4DC internal static string _(string arg) { return arg; } /// When overridden in a derived class, gets a value indicating whether the current encoding is read-only. /// true if the current is read-only; otherwise, false. The default is true. /// 2 // Token: 0x17000AD3 RID: 2771 // (get) Token: 0x0600374C RID: 14156 RVA: 0x000BD2E0 File Offset: 0x000BB4E0 [ComVisible(false)] public bool IsReadOnly { get { return this.is_readonly; } } /// When overridden in a derived class, gets a value indicating whether the current encoding uses single-byte code points. /// true if the current uses single-byte code points; otherwise, false. /// 2 // Token: 0x17000AD4 RID: 2772 // (get) Token: 0x0600374D RID: 14157 RVA: 0x000BD2E8 File Offset: 0x000BB4E8 [ComVisible(false)] public virtual bool IsSingleByte { get { return false; } } /// Gets or sets the object for the current object. /// The object for the current object. /// The value in a set operation is null. /// A value cannot be assigned in a set operation because the current object is read-only. /// 2 // Token: 0x17000AD5 RID: 2773 // (get) Token: 0x0600374E RID: 14158 RVA: 0x000BD2EC File Offset: 0x000BB4EC // (set) Token: 0x0600374F RID: 14159 RVA: 0x000BD2F4 File Offset: 0x000BB4F4 [ComVisible(false)] public DecoderFallback DecoderFallback { get { return this.decoder_fallback; } set { if (this.IsReadOnly) { throw new InvalidOperationException("This Encoding is readonly."); } if (value == null) { throw new ArgumentNullException(); } this.decoder_fallback = value; } } /// Gets or sets the object for the current object. /// The object for the current object. /// The value in a set operation is null. /// A value cannot be assigned in a set operation because the current object is read-only. /// 2 // Token: 0x17000AD6 RID: 2774 // (get) Token: 0x06003750 RID: 14160 RVA: 0x000BD320 File Offset: 0x000BB520 // (set) Token: 0x06003751 RID: 14161 RVA: 0x000BD328 File Offset: 0x000BB528 [ComVisible(false)] public EncoderFallback EncoderFallback { get { return this.encoder_fallback; } set { if (this.IsReadOnly) { throw new InvalidOperationException("This Encoding is readonly."); } if (value == null) { throw new ArgumentNullException(); } this.encoder_fallback = value; } } // Token: 0x06003752 RID: 14162 RVA: 0x000BD354 File Offset: 0x000BB554 internal void SetFallbackInternal(EncoderFallback e, DecoderFallback d) { if (e != null) { this.encoder_fallback = e; } if (d != null) { this.decoder_fallback = d; } } /// Converts an entire byte array from one encoding to another. /// An array of type containing the results of converting from to . /// The encoding format of . /// The target encoding format. /// /// /// is null.-or- is null.-or- is null. /// A fallback occurred (see Understanding Encodings for complete explanation)-and-srcEncoding. is set to . /// A fallback occurred (see Understanding Encodings for complete explanation)-and-dstEncoding. is set to . /// 1 // Token: 0x06003753 RID: 14163 RVA: 0x000BD370 File Offset: 0x000BB570 public static byte[] Convert(Encoding srcEncoding, Encoding dstEncoding, byte[] bytes) { if (srcEncoding == null) { throw new ArgumentNullException("srcEncoding"); } if (dstEncoding == null) { throw new ArgumentNullException("dstEncoding"); } if (bytes == null) { throw new ArgumentNullException("bytes"); } return dstEncoding.GetBytes(srcEncoding.GetChars(bytes, 0, bytes.Length)); } /// Converts a range of bytes in a byte array from one encoding to another. /// An array of type containing the result of converting a range of bytes in from to . /// The encoding of the source array, . /// The encoding of the output array. /// The array of bytes to convert. /// The index of the first element of to convert. /// The number of bytes to convert. /// /// is null.-or- is null.-or- is null. /// /// and do not specify a valid range in the byte array. /// A fallback occurred (see Understanding Encodings for complete explanation)-and-srcEncoding. is set to . /// A fallback occurred (see Understanding Encodings for complete explanation)-and-dstEncoding. is set to . /// 1 // Token: 0x06003754 RID: 14164 RVA: 0x000BD3C4 File Offset: 0x000BB5C4 public static byte[] Convert(Encoding srcEncoding, Encoding dstEncoding, byte[] bytes, int index, int count) { if (srcEncoding == null) { throw new ArgumentNullException("srcEncoding"); } if (dstEncoding == null) { throw new ArgumentNullException("dstEncoding"); } if (bytes == null) { throw new ArgumentNullException("bytes"); } if (index < 0 || index > bytes.Length) { throw new ArgumentOutOfRangeException("index", Encoding._("ArgRange_Array")); } if (count < 0 || bytes.Length - index < count) { throw new ArgumentOutOfRangeException("count", Encoding._("ArgRange_Array")); } return dstEncoding.GetBytes(srcEncoding.GetChars(bytes, index, count)); } /// Determines whether the specified is equal to the current instance. /// true if is an instance of and is equal to the current instance; otherwise, false. /// The to compare with the current instance. /// 2 // Token: 0x06003755 RID: 14165 RVA: 0x000BD464 File Offset: 0x000BB664 public override bool Equals(object value) { Encoding encoding = value as Encoding; return encoding != null && (this.codePage == encoding.codePage && this.DecoderFallback.Equals(encoding.DecoderFallback)) && this.EncoderFallback.Equals(encoding.EncoderFallback); } /// When overridden in a derived class, calculates the number of bytes produced by encoding a set of characters from the specified character array. /// The number of bytes produced by encoding the specified characters. /// The character array containing the set of characters to encode. /// The index of the first character to encode. /// The number of characters to encode. /// /// is null. /// /// or is less than zero.-or- and do not denote a valid range in . /// A fallback occurred (see Understanding Encodings for complete explanation)-and- is set to . /// 1 // Token: 0x06003756 RID: 14166 public abstract int GetByteCount(char[] chars, int index, int count); /// When overridden in a derived class, calculates the number of bytes produced by encoding the characters in the specified string. /// The number of bytes produced by encoding the specified characters. /// The string containing the set of characters to encode. /// /// is null. /// A fallback occurred (see Understanding Encodings for complete explanation)-and- is set to . /// 1 // Token: 0x06003757 RID: 14167 RVA: 0x000BD4BC File Offset: 0x000BB6BC public unsafe virtual int GetByteCount(string s) { if (s == null) { throw new ArgumentNullException("s"); } if (s.Length == 0) { return 0; } fixed (char* ptr = s + RuntimeHelpers.OffsetToStringData / 2) { return this.GetByteCount(ptr, s.Length); } } /// When overridden in a derived class, calculates the number of bytes produced by encoding all the characters in the specified character array. /// The number of bytes produced by encoding all the characters in the specified character array. /// The character array containing the characters to encode. /// /// is null. /// A fallback occurred (see Understanding Encodings for complete explanation)-and- is set to . /// 1 // Token: 0x06003758 RID: 14168 RVA: 0x000BD500 File Offset: 0x000BB700 public virtual int GetByteCount(char[] chars) { if (chars != null) { return this.GetByteCount(chars, 0, chars.Length); } throw new ArgumentNullException("chars"); } /// When overridden in a derived class, encodes a set of characters from the specified character array into the specified byte array. /// The actual number of bytes written into . /// The character array containing the set of characters to encode. /// The index of the first character to encode. /// The number of characters to encode. /// The byte array to contain the resulting sequence of bytes. /// The index at which to start writing the resulting sequence of bytes. /// /// is null.-or- is null. /// /// or or is less than zero.-or- and do not denote a valid range in .-or- is not a valid index in . /// /// does not have enough capacity from to the end of the array to accommodate the resulting bytes. /// A fallback occurred (see Understanding Encodings for complete explanation)-and- is set to . /// 1 // Token: 0x06003759 RID: 14169 public abstract int GetBytes(char[] chars, int charIndex, int charCount, byte[] bytes, int byteIndex); /// When overridden in a derived class, encodes a set of characters from the specified string into the specified byte array. /// The actual number of bytes written into . /// The string containing the set of characters to encode. /// The index of the first character to encode. /// The number of characters to encode. /// The byte array to contain the resulting sequence of bytes. /// The index at which to start writing the resulting sequence of bytes. /// /// is null.-or- is null. /// /// or or is less than zero.-or- and do not denote a valid range in .-or- is not a valid index in . /// /// does not have enough capacity from to the end of the array to accommodate the resulting bytes. /// A fallback occurred (see Understanding Encodings for complete explanation)-and- is set to . /// 1 // Token: 0x0600375A RID: 14170 RVA: 0x000BD520 File Offset: 0x000BB720 public unsafe virtual int GetBytes(string s, int charIndex, int charCount, byte[] bytes, int byteIndex) { if (s == null) { throw new ArgumentNullException("s"); } if (charIndex < 0 || charIndex > s.Length) { throw new ArgumentOutOfRangeException("charIndex", Encoding._("ArgRange_Array")); } if (charCount < 0 || charIndex > s.Length - charCount) { throw new ArgumentOutOfRangeException("charCount", Encoding._("ArgRange_Array")); } if (byteIndex < 0 || byteIndex > bytes.Length) { throw new ArgumentOutOfRangeException("byteIndex", Encoding._("ArgRange_Array")); } if (charCount == 0 || bytes.Length == byteIndex) { return 0; } fixed (char* ptr = s + RuntimeHelpers.OffsetToStringData / 2) { fixed (byte* ptr2 = (ref bytes != null && bytes.Length != 0 ? ref bytes[0] : ref *null)) { return this.GetBytes(ptr + charIndex, charCount, ptr2 + byteIndex, bytes.Length - byteIndex); } } } /// When overridden in a derived class, encodes all the characters in the specified string into a sequence of bytes. /// A byte array containing the results of encoding the specified set of characters. /// /// /// is null. /// A fallback occurred (see Understanding Encodings for complete explanation)-and- is set to . /// 1 // Token: 0x0600375B RID: 14171 RVA: 0x000BD610 File Offset: 0x000BB810 public unsafe virtual byte[] GetBytes(string s) { if (s == null) { throw new ArgumentNullException("s"); } if (s.Length == 0) { return new byte[0]; } int byteCount = this.GetByteCount(s); if (byteCount == 0) { return new byte[0]; } fixed (char* ptr = s + RuntimeHelpers.OffsetToStringData / 2) { byte[] array = new byte[byteCount]; fixed (byte* ptr2 = (ref array != null && array.Length != 0 ? ref array[0] : ref *null)) { this.GetBytes(ptr, s.Length, ptr2, byteCount); return array; } } } /// When overridden in a derived class, encodes a set of characters from the specified character array into a sequence of bytes. /// A byte array containing the results of encoding the specified set of characters. /// The character array containing the set of characters to encode. /// The index of the first character to encode. /// The number of characters to encode. /// /// is null. /// /// or is less than zero.-or- and do not denote a valid range in . /// A fallback occurred (see Understanding Encodings for complete explanation)-and- is set to . /// 1 // Token: 0x0600375C RID: 14172 RVA: 0x000BD698 File Offset: 0x000BB898 public virtual byte[] GetBytes(char[] chars, int index, int count) { int byteCount = this.GetByteCount(chars, index, count); byte[] array = new byte[byteCount]; this.GetBytes(chars, index, count, array, 0); return array; } /// When overridden in a derived class, encodes all the characters in the specified character array into a sequence of bytes. /// A byte array containing the results of encoding the specified set of characters. /// The character array containing the characters to encode. /// /// is null. /// A fallback occurred (see Understanding Encodings for complete explanation)-and- is set to . /// 1 // Token: 0x0600375D RID: 14173 RVA: 0x000BD6C4 File Offset: 0x000BB8C4 public virtual byte[] GetBytes(char[] chars) { int byteCount = this.GetByteCount(chars, 0, chars.Length); byte[] array = new byte[byteCount]; this.GetBytes(chars, 0, chars.Length, array, 0); return array; } /// When overridden in a derived class, calculates the number of characters produced by decoding a sequence of bytes from the specified byte array. /// The number of characters produced by decoding the specified sequence of bytes. /// The byte array containing the sequence of bytes to decode. /// The index of the first byte to decode. /// The number of bytes to decode. /// /// is null. /// /// or is less than zero.-or- and do not denote a valid range in . /// A fallback occurred (see Understanding Encodings for complete explanation)-and- is set to . /// 1 // Token: 0x0600375E RID: 14174 public abstract int GetCharCount(byte[] bytes, int index, int count); /// When overridden in a derived class, calculates the number of characters produced by decoding all the bytes in the specified byte array. /// The number of characters produced by decoding the specified sequence of bytes. /// The byte array containing the sequence of bytes to decode. /// /// is null. /// A fallback occurred (see Understanding Encodings for complete explanation)-and- is set to . /// 1 // Token: 0x0600375F RID: 14175 RVA: 0x000BD6F4 File Offset: 0x000BB8F4 public virtual int GetCharCount(byte[] bytes) { if (bytes == null) { throw new ArgumentNullException("bytes"); } return this.GetCharCount(bytes, 0, bytes.Length); } /// When overridden in a derived class, decodes a sequence of bytes from the specified byte array into the specified character array. /// The actual number of characters written into . /// The byte array containing the sequence of bytes to decode. /// The index of the first byte to decode. /// The number of bytes to decode. /// The character array to contain the resulting set of characters. /// The index at which to start writing the resulting set of characters. /// /// is null.-or- is null. /// /// or or is less than zero.-or- and do not denote a valid range in .-or- is not a valid index in . /// /// does not have enough capacity from to the end of the array to accommodate the resulting characters. /// A fallback occurred (see Understanding Encodings for complete explanation)-and- is set to . /// 1 // Token: 0x06003760 RID: 14176 public abstract int GetChars(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex); /// When overridden in a derived class, decodes a sequence of bytes from the specified byte array into a set of characters. /// A character array containing the results of decoding the specified sequence of bytes. /// The byte array containing the sequence of bytes to decode. /// The index of the first byte to decode. /// The number of bytes to decode. /// /// is null. /// /// or is less than zero.-or- and do not denote a valid range in . /// A fallback occurred (see Understanding Encodings for complete explanation)-and- is set to . /// 1 // Token: 0x06003761 RID: 14177 RVA: 0x000BD714 File Offset: 0x000BB914 public virtual char[] GetChars(byte[] bytes, int index, int count) { int charCount = this.GetCharCount(bytes, index, count); char[] array = new char[charCount]; this.GetChars(bytes, index, count, array, 0); return array; } /// When overridden in a derived class, decodes all the bytes in the specified byte array into a set of characters. /// A character array containing the results of decoding the specified sequence of bytes. /// The byte array containing the sequence of bytes to decode. /// /// is null. /// A fallback occurred (see Understanding Encodings for complete explanation)-and- is set to . /// 1 // Token: 0x06003762 RID: 14178 RVA: 0x000BD740 File Offset: 0x000BB940 public virtual char[] GetChars(byte[] bytes) { if (bytes == null) { throw new ArgumentNullException("bytes"); } int charCount = this.GetCharCount(bytes, 0, bytes.Length); char[] array = new char[charCount]; this.GetChars(bytes, 0, bytes.Length, array, 0); return array; } /// When overridden in a derived class, obtains a decoder that converts an encoded sequence of bytes into a sequence of characters. /// A that converts an encoded sequence of bytes into a sequence of characters. /// 1 // Token: 0x06003763 RID: 14179 RVA: 0x000BD780 File Offset: 0x000BB980 public virtual Decoder GetDecoder() { return new Encoding.ForwardingDecoder(this); } /// When overridden in a derived class, obtains an encoder that converts a sequence of Unicode characters into an encoded sequence of bytes. /// A that converts a sequence of Unicode characters into an encoded sequence of bytes. /// 1 // Token: 0x06003764 RID: 14180 RVA: 0x000BD788 File Offset: 0x000BB988 public virtual Encoder GetEncoder() { return new Encoding.ForwardingEncoder(this); } // Token: 0x06003765 RID: 14181 RVA: 0x000BD790 File Offset: 0x000BB990 private static object InvokeI18N(string name, params object[] args) { object obj = Encoding.lockobj; object obj2; lock (obj) { if (Encoding.i18nDisabled) { obj2 = null; } else { if (Encoding.i18nAssembly == null) { try { try { Encoding.i18nAssembly = Assembly.Load("I18N, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756"); } catch (NotImplementedException) { Encoding.i18nDisabled = true; return null; } if (Encoding.i18nAssembly == null) { return null; } } catch (SystemException) { return null; } } Type type; try { type = Encoding.i18nAssembly.GetType("I18N.Common.Manager"); } catch (NotImplementedException) { Encoding.i18nDisabled = true; return null; } if (type == null) { obj2 = null; } else { object obj3; try { obj3 = type.InvokeMember("PrimaryManager", BindingFlags.Static | BindingFlags.Public | BindingFlags.GetProperty, null, null, null, null, null, null); if (obj3 == null) { return null; } } catch (MissingMethodException) { return null; } catch (SecurityException) { return null; } catch (NotImplementedException) { Encoding.i18nDisabled = true; return null; } try { obj2 = type.InvokeMember(name, BindingFlags.Instance | BindingFlags.Public | BindingFlags.InvokeMethod, null, obj3, args, null, null, null); } catch (MissingMethodException) { obj2 = null; } catch (SecurityException) { obj2 = null; } } } } return obj2; } /// Returns the encoding associated with the specified code page identifier. /// The associated with the specified code page. /// The code page identifier of the preferred encoding.-or- 0, to use the default encoding. /// /// is less than zero or greater than 65535. /// /// is not supported by the underlying platform. /// /// is not supported by the underlying platform. /// 1 // Token: 0x06003766 RID: 14182 RVA: 0x000BD9BC File Offset: 0x000BBBBC public static Encoding GetEncoding(int codepage) { if (codepage < 0 || codepage > 65535) { throw new ArgumentOutOfRangeException("codepage", "Valid values are between 0 and 65535, inclusive."); } int num = codepage; if (num == 1200) { return Encoding.Unicode; } if (num == 1201) { return Encoding.BigEndianUnicode; } if (num == 12000) { return Encoding.UTF32; } if (num == 12001) { return Encoding.BigEndianUTF32; } if (num == 65000) { return Encoding.UTF7; } if (num == 65001) { return Encoding.UTF8; } if (num == 0) { return Encoding.Default; } if (num == 20127) { return Encoding.ASCII; } if (num == 28591) { return Encoding.ISOLatin1; } Encoding encoding = (Encoding)Encoding.InvokeI18N("GetEncoding", new object[] { codepage }); if (encoding != null) { encoding.is_readonly = true; return encoding; } string text = "System.Text.CP" + codepage.ToString(); Assembly executingAssembly = Assembly.GetExecutingAssembly(); Type type = executingAssembly.GetType(text); if (type != null) { encoding = (Encoding)Activator.CreateInstance(type); encoding.is_readonly = true; return encoding; } type = Type.GetType(text); if (type != null) { encoding = (Encoding)Activator.CreateInstance(type); encoding.is_readonly = true; return encoding; } throw new NotSupportedException(string.Format("CodePage {0} not supported", codepage.ToString())); } /// When overridden in a derived class, creates a shallow copy of the current object. /// A copy of the current object. /// 2 // Token: 0x06003767 RID: 14183 RVA: 0x000BDB38 File Offset: 0x000BBD38 [ComVisible(false)] public virtual object Clone() { Encoding encoding = (Encoding)base.MemberwiseClone(); encoding.is_readonly = false; return encoding; } /// Returns the encoding associated with the specified code page identifier. Parameters specify an error handler for characters that cannot be encoded and byte sequences that cannot be decoded. /// The object associated with the specified code page. /// The code page identifier of the preferred encoding.-or- 0, to use the default encoding. /// A object that provides an error handling procedure when a character cannot be encoded with the current encoding. /// A object that provides an error handling procedure when a byte sequence cannot be decoded with the current encoding. /// /// is less than zero or greater than 65535. /// /// is not supported by the underlying platform. /// /// is not supported by the underlying platform. /// 1 // Token: 0x06003768 RID: 14184 RVA: 0x000BDB5C File Offset: 0x000BBD5C public static Encoding GetEncoding(int codepage, EncoderFallback encoderFallback, DecoderFallback decoderFallback) { if (encoderFallback == null) { throw new ArgumentNullException("encoderFallback"); } if (decoderFallback == null) { throw new ArgumentNullException("decoderFallback"); } Encoding encoding = Encoding.GetEncoding(codepage).Clone() as Encoding; encoding.is_readonly = false; encoding.encoder_fallback = encoderFallback; encoding.decoder_fallback = decoderFallback; return encoding; } /// Returns the encoding associated with the specified code page name. Parameters specify an error handler for characters that cannot be encoded and byte sequences that cannot be decoded. /// The object associated with the specified code page. /// The code page name of the preferred encoding. /// A object that provides an error handling procedure when a character cannot be encoded with the current encoding. /// A object that provides an error handling procedure when a byte sequence cannot be decoded with the current encoding. /// /// is not a valid code page name.-or- The code page indicated by is not supported by the underlying platform. /// 1 // Token: 0x06003769 RID: 14185 RVA: 0x000BDBB4 File Offset: 0x000BBDB4 public static Encoding GetEncoding(string name, EncoderFallback encoderFallback, DecoderFallback decoderFallback) { if (encoderFallback == null) { throw new ArgumentNullException("encoderFallback"); } if (decoderFallback == null) { throw new ArgumentNullException("decoderFallback"); } Encoding encoding = Encoding.GetEncoding(name).Clone() as Encoding; encoding.is_readonly = false; encoding.encoder_fallback = encoderFallback; encoding.decoder_fallback = decoderFallback; return encoding; } /// Returns an array containing all encodings. /// An array of type containing all encodings. /// 1 // Token: 0x0600376A RID: 14186 RVA: 0x000BDC0C File Offset: 0x000BBE0C public static EncodingInfo[] GetEncodings() { if (Encoding.encoding_infos == null) { int[] array = new int[] { 37, 437, 500, 708, 850, 852, 855, 857, 858, 860, 861, 862, 863, 864, 865, 866, 869, 870, 874, 875, 932, 936, 949, 950, 1026, 1047, 1140, 1141, 1142, 1143, 1144, 1145, 1146, 1147, 1148, 1149, 1200, 1201, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 10000, 10079, 12000, 12001, 20127, 20273, 20277, 20278, 20280, 20284, 20285, 20290, 20297, 20420, 20424, 20866, 20871, 21025, 21866, 28591, 28592, 28593, 28594, 28595, 28596, 28597, 28598, 28599, 28605, 38598, 50220, 50221, 50222, 51932, 51949, 54936, 57002, 57003, 57004, 57005, 57006, 57007, 57008, 57009, 57010, 57011, 65000, 65001 }; Encoding.encoding_infos = new EncodingInfo[array.Length]; for (int i = 0; i < array.Length; i++) { Encoding.encoding_infos[i] = new EncodingInfo(array[i]); } } return Encoding.encoding_infos; } /// Gets a value indicating whether the current encoding is always normalized, using the default normalization form. /// true if the current is always normalized; otherwise, false. The default is false. /// 2 // Token: 0x0600376B RID: 14187 RVA: 0x000BDC6C File Offset: 0x000BBE6C [ComVisible(false)] public bool IsAlwaysNormalized() { return this.IsAlwaysNormalized(NormalizationForm.FormC); } /// When overridden in a derived class, gets a value indicating whether the current encoding is always normalized, using the specified normalization form. /// true if the current object is always normalized using the specified value; otherwise, false. The default is false. /// One of the values. /// 2 // Token: 0x0600376C RID: 14188 RVA: 0x000BDC78 File Offset: 0x000BBE78 [ComVisible(false)] public virtual bool IsAlwaysNormalized(NormalizationForm form) { return form == NormalizationForm.FormC && this is ASCIIEncoding; } /// Returns an encoding associated with the specified code page name. /// The associated with the specified code page. /// The code page name of the preferred encoding. Any value returned by is a valid input. /// /// is not a valid code page name.-or- The code page indicated by is not supported by the underlying platform. /// 1 // Token: 0x0600376D RID: 14189 RVA: 0x000BDC90 File Offset: 0x000BBE90 public static Encoding GetEncoding(string name) { if (name == null) { throw new ArgumentNullException("name"); } string text = name.ToLowerInvariant().Replace('-', '_'); int num = 0; for (int i = 0; i < Encoding.encodings.Length; i++) { object obj = Encoding.encodings[i]; if (obj is int) { num = (int)obj; } else if (text == (string)Encoding.encodings[i]) { return Encoding.GetEncoding(num); } } Encoding encoding = (Encoding)Encoding.InvokeI18N("GetEncoding", new object[] { name }); if (encoding != null) { return encoding; } string text2 = "System.Text.ENC" + text; Assembly executingAssembly = Assembly.GetExecutingAssembly(); Type type = executingAssembly.GetType(text2); if (type != null) { return (Encoding)Activator.CreateInstance(type); } type = Type.GetType(text2); if (type != null) { return (Encoding)Activator.CreateInstance(type); } throw new ArgumentException(string.Format("Encoding name '{0}' not supported", name), "name"); } /// Returns the hash code for the current instance. /// The hash code for the current instance. /// 1 // Token: 0x0600376E RID: 14190 RVA: 0x000BDDA0 File Offset: 0x000BBFA0 public override int GetHashCode() { return this.DecoderFallback.GetHashCode() << 24 + this.EncoderFallback.GetHashCode() << 16 + this.codePage; } /// When overridden in a derived class, calculates the maximum number of bytes produced by encoding the specified number of characters. /// The maximum number of bytes produced by encoding the specified number of characters. /// The number of characters to encode. /// /// is less than zero. /// A fallback occurred (see Understanding Encodings for complete explanation)-and- is set to . /// 1 // Token: 0x0600376F RID: 14191 public abstract int GetMaxByteCount(int charCount); /// When overridden in a derived class, calculates the maximum number of characters produced by decoding the specified number of bytes. /// The maximum number of characters produced by decoding the specified number of bytes. /// The number of bytes to decode. /// /// is less than zero. /// A fallback occurred (see Understanding Encodings for complete explanation)-and- is set to . /// 1 // Token: 0x06003770 RID: 14192 public abstract int GetMaxCharCount(int byteCount); /// When overridden in a derived class, returns a sequence of bytes that specifies the encoding used. /// A byte array containing a sequence of bytes that specifies the encoding used.-or- A byte array of length zero, if a preamble is not required. /// 1 // Token: 0x06003771 RID: 14193 RVA: 0x000BDDD8 File Offset: 0x000BBFD8 public virtual byte[] GetPreamble() { return new byte[0]; } /// When overridden in a derived class, decodes a sequence of bytes from the specified byte array into a string. /// A containing the results of decoding the specified sequence of bytes. /// The byte array containing the sequence of bytes to decode. /// The index of the first byte to decode. /// The number of bytes to decode. /// /// is null. /// /// or is less than zero.-or- and do not denote a valid range in . /// A fallback occurred (see Understanding Encodings for complete explanation)-and- is set to . /// 1 // Token: 0x06003772 RID: 14194 RVA: 0x000BDDE0 File Offset: 0x000BBFE0 public virtual string GetString(byte[] bytes, int index, int count) { return new string(this.GetChars(bytes, index, count)); } /// When overridden in a derived class, decodes all the bytes in the specified byte array into a string. /// A containing the results of decoding the specified sequence of bytes. /// The byte array containing the sequence of bytes to decode. /// /// is null. /// A fallback occurred (see Understanding Encodings for complete explanation)-and- is set to . /// 1 // Token: 0x06003773 RID: 14195 RVA: 0x000BDDF0 File Offset: 0x000BBFF0 public virtual string GetString(byte[] bytes) { if (bytes == null) { throw new ArgumentNullException("bytes"); } return this.GetString(bytes, 0, bytes.Length); } /// When overridden in a derived class, gets a name for the current encoding that can be used with mail agent body tags. /// A name for the current that can be used with mail agent body tags.-or- An empty string (""), if the current cannot be used. /// 2 // Token: 0x17000AD7 RID: 2775 // (get) Token: 0x06003774 RID: 14196 RVA: 0x000BDE10 File Offset: 0x000BC010 public virtual string BodyName { get { return this.body_name; } } /// When overridden in a derived class, gets the code page identifier of the current . /// The code page identifier of the current . /// 2 // Token: 0x17000AD8 RID: 2776 // (get) Token: 0x06003775 RID: 14197 RVA: 0x000BDE18 File Offset: 0x000BC018 public virtual int CodePage { get { return this.codePage; } } /// When overridden in a derived class, gets the human-readable description of the current encoding. /// The human-readable description of the current . /// 2 // Token: 0x17000AD9 RID: 2777 // (get) Token: 0x06003776 RID: 14198 RVA: 0x000BDE20 File Offset: 0x000BC020 public virtual string EncodingName { get { return this.encoding_name; } } /// When overridden in a derived class, gets a name for the current encoding that can be used with mail agent header tags. /// A name for the current to use with mail agent header tags.-or- An empty string (""), if the current cannot be used. /// 2 // Token: 0x17000ADA RID: 2778 // (get) Token: 0x06003777 RID: 14199 RVA: 0x000BDE28 File Offset: 0x000BC028 public virtual string HeaderName { get { return this.header_name; } } /// When overridden in a derived class, gets a value indicating whether the current encoding can be used by browser clients for displaying content. /// true if the current can be used by browser clients for displaying content; otherwise, false. /// 2 // Token: 0x17000ADB RID: 2779 // (get) Token: 0x06003778 RID: 14200 RVA: 0x000BDE30 File Offset: 0x000BC030 public virtual bool IsBrowserDisplay { get { return this.is_browser_display; } } /// When overridden in a derived class, gets a value indicating whether the current encoding can be used by browser clients for saving content. /// true if the current can be used by browser clients for saving content; otherwise, false. /// 2 // Token: 0x17000ADC RID: 2780 // (get) Token: 0x06003779 RID: 14201 RVA: 0x000BDE38 File Offset: 0x000BC038 public virtual bool IsBrowserSave { get { return this.is_browser_save; } } /// When overridden in a derived class, gets a value indicating whether the current encoding can be used by mail and news clients for displaying content. /// true if the current can be used by mail and news clients for displaying content; otherwise, false. /// 2 // Token: 0x17000ADD RID: 2781 // (get) Token: 0x0600377A RID: 14202 RVA: 0x000BDE40 File Offset: 0x000BC040 public virtual bool IsMailNewsDisplay { get { return this.is_mail_news_display; } } /// When overridden in a derived class, gets a value indicating whether the current encoding can be used by mail and news clients for saving content. /// true if the current can be used by mail and news clients for saving content; otherwise, false. /// 2 // Token: 0x17000ADE RID: 2782 // (get) Token: 0x0600377B RID: 14203 RVA: 0x000BDE48 File Offset: 0x000BC048 public virtual bool IsMailNewsSave { get { return this.is_mail_news_save; } } /// When overridden in a derived class, gets the name registered with the Internet Assigned Numbers Authority (IANA) for the current encoding. /// The IANA name for the current . /// 2 // Token: 0x17000ADF RID: 2783 // (get) Token: 0x0600377C RID: 14204 RVA: 0x000BDE50 File Offset: 0x000BC050 public virtual string WebName { get { return this.web_name; } } /// When overridden in a derived class, gets the Windows operating system code page that most closely corresponds to the current encoding. /// The Windows operating system code page that most closely corresponds to the current . /// 2 // Token: 0x17000AE0 RID: 2784 // (get) Token: 0x0600377D RID: 14205 RVA: 0x000BDE58 File Offset: 0x000BC058 public virtual int WindowsCodePage { get { return this.windows_code_page; } } /// Gets an encoding for the ASCII (7-bit) character set. /// An encoding for the ASCII (7-bit) character set. /// 1 // Token: 0x17000AE1 RID: 2785 // (get) Token: 0x0600377E RID: 14206 RVA: 0x000BDE60 File Offset: 0x000BC060 public static Encoding ASCII { get { if (Encoding.asciiEncoding == null) { object obj = Encoding.lockobj; lock (obj) { if (Encoding.asciiEncoding == null) { Encoding.asciiEncoding = new ASCIIEncoding(); } } } return Encoding.asciiEncoding; } } /// Gets an encoding for the UTF-16 format using the big endian byte order. /// An encoding object for the UTF-16 format using the big endian byte order. /// 1 // Token: 0x17000AE2 RID: 2786 // (get) Token: 0x0600377F RID: 14207 RVA: 0x000BDECC File Offset: 0x000BC0CC public static Encoding BigEndianUnicode { get { if (Encoding.bigEndianEncoding == null) { object obj = Encoding.lockobj; lock (obj) { if (Encoding.bigEndianEncoding == null) { Encoding.bigEndianEncoding = new UnicodeEncoding(true, true); } } } return Encoding.bigEndianEncoding; } } // Token: 0x06003780 RID: 14208 [MethodImpl(MethodImplOptions.InternalCall)] internal static extern string InternalCodePage(ref int code_page); /// Gets an encoding for the operating system's current ANSI code page. /// An encoding for the operating system's current ANSI code page. /// 1 // Token: 0x17000AE3 RID: 2787 // (get) Token: 0x06003781 RID: 14209 RVA: 0x000BDF3C File Offset: 0x000BC13C public static Encoding Default { get { if (Encoding.defaultEncoding == null) { object obj = Encoding.lockobj; lock (obj) { if (Encoding.defaultEncoding == null) { int num = 1; string text = Encoding.InternalCodePage(ref num); try { if (num == -1) { Encoding.defaultEncoding = Encoding.GetEncoding(text); } else { num &= 268435455; switch (num) { case 1: num = 20127; break; case 2: num = 65000; break; case 3: num = 65001; break; case 4: num = 1200; break; case 5: num = 1201; break; case 6: num = 28591; break; } Encoding.defaultEncoding = Encoding.GetEncoding(num); } } catch (NotSupportedException) { Encoding.defaultEncoding = Encoding.UTF8Unmarked; } catch (ArgumentException) { Encoding.defaultEncoding = Encoding.UTF8Unmarked; } Encoding.defaultEncoding.is_readonly = true; } } } return Encoding.defaultEncoding; } } // Token: 0x17000AE4 RID: 2788 // (get) Token: 0x06003782 RID: 14210 RVA: 0x000BE0A4 File Offset: 0x000BC2A4 private static Encoding ISOLatin1 { get { if (Encoding.isoLatin1Encoding == null) { object obj = Encoding.lockobj; lock (obj) { if (Encoding.isoLatin1Encoding == null) { Encoding.isoLatin1Encoding = new Latin1Encoding(); } } } return Encoding.isoLatin1Encoding; } } /// Gets an encoding for the UTF-7 format. /// A for the UTF-7 format. /// 1 // Token: 0x17000AE5 RID: 2789 // (get) Token: 0x06003783 RID: 14211 RVA: 0x000BE110 File Offset: 0x000BC310 public static Encoding UTF7 { get { if (Encoding.utf7Encoding == null) { object obj = Encoding.lockobj; lock (obj) { if (Encoding.utf7Encoding == null) { Encoding.utf7Encoding = new UTF7Encoding(); } } } return Encoding.utf7Encoding; } } /// Gets an encoding for the UTF-8 format. /// An encoding for the UTF-8 format. /// 1 // Token: 0x17000AE6 RID: 2790 // (get) Token: 0x06003784 RID: 14212 RVA: 0x000BE17C File Offset: 0x000BC37C public static Encoding UTF8 { get { if (Encoding.utf8EncodingWithMarkers == null) { object obj = Encoding.lockobj; lock (obj) { if (Encoding.utf8EncodingWithMarkers == null) { Encoding.utf8EncodingWithMarkers = new UTF8Encoding(true); } } } return Encoding.utf8EncodingWithMarkers; } } // Token: 0x17000AE7 RID: 2791 // (get) Token: 0x06003785 RID: 14213 RVA: 0x000BE1EC File Offset: 0x000BC3EC internal static Encoding UTF8Unmarked { get { if (Encoding.utf8EncodingWithoutMarkers == null) { object obj = Encoding.lockobj; lock (obj) { if (Encoding.utf8EncodingWithoutMarkers == null) { Encoding.utf8EncodingWithoutMarkers = new UTF8Encoding(false, false); } } } return Encoding.utf8EncodingWithoutMarkers; } } // Token: 0x17000AE8 RID: 2792 // (get) Token: 0x06003786 RID: 14214 RVA: 0x000BE25C File Offset: 0x000BC45C internal static Encoding UTF8UnmarkedUnsafe { get { if (Encoding.utf8EncodingUnsafe == null) { object obj = Encoding.lockobj; lock (obj) { if (Encoding.utf8EncodingUnsafe == null) { Encoding.utf8EncodingUnsafe = new UTF8Encoding(false, false); Encoding.utf8EncodingUnsafe.is_readonly = false; Encoding.utf8EncodingUnsafe.DecoderFallback = new DecoderReplacementFallback(string.Empty); Encoding.utf8EncodingUnsafe.is_readonly = true; } } } return Encoding.utf8EncodingUnsafe; } } /// Gets an encoding for the UTF-16 format using the little endian byte order. /// An encoding for the UTF-16 format using the little endian byte order. /// 1 // Token: 0x17000AE9 RID: 2793 // (get) Token: 0x06003787 RID: 14215 RVA: 0x000BE2FC File Offset: 0x000BC4FC public static Encoding Unicode { get { if (Encoding.unicodeEncoding == null) { object obj = Encoding.lockobj; lock (obj) { if (Encoding.unicodeEncoding == null) { Encoding.unicodeEncoding = new UnicodeEncoding(false, true); } } } return Encoding.unicodeEncoding; } } /// Gets an encoding for the UTF-32 format using the little endian byte order. /// An encoding object for the UTF-32 format using the little endian byte order. /// 1 // Token: 0x17000AEA RID: 2794 // (get) Token: 0x06003788 RID: 14216 RVA: 0x000BE36C File Offset: 0x000BC56C public static Encoding UTF32 { get { if (Encoding.utf32Encoding == null) { object obj = Encoding.lockobj; lock (obj) { if (Encoding.utf32Encoding == null) { Encoding.utf32Encoding = new UTF32Encoding(false, true); } } } return Encoding.utf32Encoding; } } // Token: 0x17000AEB RID: 2795 // (get) Token: 0x06003789 RID: 14217 RVA: 0x000BE3DC File Offset: 0x000BC5DC internal static Encoding BigEndianUTF32 { get { if (Encoding.bigEndianUTF32Encoding == null) { object obj = Encoding.lockobj; lock (obj) { if (Encoding.bigEndianUTF32Encoding == null) { Encoding.bigEndianUTF32Encoding = new UTF32Encoding(true, true); } } } return Encoding.bigEndianUTF32Encoding; } } /// When overridden in a derived class, calculates the number of bytes produced by encoding a set of characters starting at the specified character pointer. /// The number of bytes produced by encoding the specified characters. /// A pointer to the first character to encode. /// The number of characters to encode. /// /// is null. /// /// is less than zero. /// A fallback occurred (see Understanding Encodings for complete explanation)-and- is set to . /// 1 // Token: 0x0600378A RID: 14218 RVA: 0x000BE44C File Offset: 0x000BC64C [CLSCompliant(false)] [ComVisible(false)] public unsafe virtual int GetByteCount(char* chars, int count) { if (chars == null) { throw new ArgumentNullException("chars"); } if (count < 0) { throw new ArgumentOutOfRangeException("count"); } char[] array = new char[count]; for (int i = 0; i < count; i++) { array[i] = chars[i]; } return this.GetByteCount(array); } /// When overridden in a derived class, calculates the number of characters produced by decoding a sequence of bytes starting at the specified byte pointer. /// The number of characters produced by decoding the specified sequence of bytes. /// A pointer to the first byte to decode. /// The number of bytes to decode. /// /// is null. /// /// is less than zero. /// A fallback occurred (see Understanding Encodings for complete explanation)-and- is set to . /// 1 // Token: 0x0600378B RID: 14219 RVA: 0x000BE4A8 File Offset: 0x000BC6A8 [ComVisible(false)] [CLSCompliant(false)] public unsafe virtual int GetCharCount(byte* bytes, int count) { if (bytes == null) { throw new ArgumentNullException("bytes"); } if (count < 0) { throw new ArgumentOutOfRangeException("count"); } byte[] array = new byte[count]; for (int i = 0; i < count; i++) { array[i] = bytes[i]; } return this.GetCharCount(array, 0, count); } /// When overridden in a derived class, decodes a sequence of bytes starting at the specified byte pointer into a set of characters that are stored starting at the specified character pointer. /// The actual number of characters written at the location indicated by the parameter. /// A pointer to the first byte to decode. /// The number of bytes to decode. /// A pointer to the location at which to start writing the resulting set of characters. /// The maximum number of characters to write. /// /// is null.-or- is null. /// /// or is less than zero. /// /// is less than the resulting number of characters. /// A fallback occurred (see Understanding Encodings for complete explanation)-and- is set to . /// 1 // Token: 0x0600378C RID: 14220 RVA: 0x000BE504 File Offset: 0x000BC704 [CLSCompliant(false)] [ComVisible(false)] public unsafe virtual int GetChars(byte* bytes, int byteCount, char* chars, int charCount) { if (bytes == null) { throw new ArgumentNullException("bytes"); } if (chars == null) { throw new ArgumentNullException("chars"); } if (charCount < 0) { throw new ArgumentOutOfRangeException("charCount"); } if (byteCount < 0) { throw new ArgumentOutOfRangeException("byteCount"); } byte[] array = new byte[byteCount]; for (int i = 0; i < byteCount; i++) { array[i] = bytes[i]; } char[] chars2 = this.GetChars(array, 0, byteCount); int num = chars2.Length; if (num > charCount) { throw new ArgumentException("charCount is less than the number of characters produced", "charCount"); } for (int j = 0; j < num; j++) { chars[j] = chars2[j]; } return num; } /// When overridden in a derived class, encodes a set of characters starting at the specified character pointer into a sequence of bytes that are stored starting at the specified byte pointer. /// The actual number of bytes written at the location indicated by the parameter. /// A pointer to the first character to encode. /// The number of characters to encode. /// A pointer to the location at which to start writing the resulting sequence of bytes. /// The maximum number of bytes to write. /// /// is null.-or- is null. /// /// or is less than zero. /// /// is less than the resulting number of bytes. /// A fallback occurred (see Understanding Encodings for complete explanation)-and- is set to . /// 1 // Token: 0x0600378D RID: 14221 RVA: 0x000BE5C0 File Offset: 0x000BC7C0 [CLSCompliant(false)] [ComVisible(false)] public unsafe virtual int GetBytes(char* chars, int charCount, byte* bytes, int byteCount) { if (bytes == null) { throw new ArgumentNullException("bytes"); } if (chars == null) { throw new ArgumentNullException("chars"); } if (charCount < 0) { throw new ArgumentOutOfRangeException("charCount"); } if (byteCount < 0) { throw new ArgumentOutOfRangeException("byteCount"); } char[] array = new char[charCount]; for (int i = 0; i < charCount; i++) { array[i] = chars[i]; } byte[] bytes2 = this.GetBytes(array, 0, charCount); int num = bytes2.Length; if (num > byteCount) { throw new ArgumentException("byteCount is less that the number of bytes produced", "byteCount"); } for (int j = 0; j < num; j++) { bytes[j] = bytes2[j]; } return bytes2.Length; } // Token: 0x04001684 RID: 5764 internal int codePage; // Token: 0x04001685 RID: 5765 internal int windows_code_page; // Token: 0x04001686 RID: 5766 private bool is_readonly = true; // Token: 0x04001687 RID: 5767 private DecoderFallback decoder_fallback; // Token: 0x04001688 RID: 5768 private EncoderFallback encoder_fallback; // Token: 0x04001689 RID: 5769 private static Assembly i18nAssembly; // Token: 0x0400168A RID: 5770 private static bool i18nDisabled; // Token: 0x0400168B RID: 5771 private static EncodingInfo[] encoding_infos; // Token: 0x0400168C RID: 5772 private static readonly object[] encodings = new object[] { 20127, "ascii", "us_ascii", "us", "ansi_x3.4_1968", "ansi_x3.4_1986", "cp367", "csascii", "ibm367", "iso_ir_6", "iso646_us", "iso_646.irv:1991", 65000, "utf_7", "csunicode11utf7", "unicode_1_1_utf_7", "unicode_2_0_utf_7", "x_unicode_1_1_utf_7", "x_unicode_2_0_utf_7", 65001, "utf_8", "unicode_1_1_utf_8", "unicode_2_0_utf_8", "x_unicode_1_1_utf_8", "x_unicode_2_0_utf_8", 1200, "utf_16", "UTF_16LE", "ucs_2", "unicode", "iso_10646_ucs2", 1201, "unicodefffe", "utf_16be", 12000, "utf_32", "UTF_32LE", "ucs_4", 12001, "UTF_32BE", 28591, "iso_8859_1", "latin1" }; // Token: 0x0400168D RID: 5773 internal string body_name; // Token: 0x0400168E RID: 5774 internal string encoding_name; // Token: 0x0400168F RID: 5775 internal string header_name; // Token: 0x04001690 RID: 5776 internal bool is_mail_news_display; // Token: 0x04001691 RID: 5777 internal bool is_mail_news_save; // Token: 0x04001692 RID: 5778 internal bool is_browser_save; // Token: 0x04001693 RID: 5779 internal bool is_browser_display; // Token: 0x04001694 RID: 5780 internal string web_name; // Token: 0x04001695 RID: 5781 private static volatile Encoding asciiEncoding; // Token: 0x04001696 RID: 5782 private static volatile Encoding bigEndianEncoding; // Token: 0x04001697 RID: 5783 private static volatile Encoding defaultEncoding; // Token: 0x04001698 RID: 5784 private static volatile Encoding utf7Encoding; // Token: 0x04001699 RID: 5785 private static volatile Encoding utf8EncodingWithMarkers; // Token: 0x0400169A RID: 5786 private static volatile Encoding utf8EncodingWithoutMarkers; // Token: 0x0400169B RID: 5787 private static volatile Encoding unicodeEncoding; // Token: 0x0400169C RID: 5788 private static volatile Encoding isoLatin1Encoding; // Token: 0x0400169D RID: 5789 private static volatile Encoding utf8EncodingUnsafe; // Token: 0x0400169E RID: 5790 private static volatile Encoding utf32Encoding; // Token: 0x0400169F RID: 5791 private static volatile Encoding bigEndianUTF32Encoding; // Token: 0x040016A0 RID: 5792 private static readonly object lockobj = new object(); // Token: 0x020005F2 RID: 1522 private sealed class ForwardingDecoder : Decoder { // Token: 0x0600378E RID: 14222 RVA: 0x000BE680 File Offset: 0x000BC880 public ForwardingDecoder(Encoding enc) { this.encoding = enc; DecoderFallback decoderFallback = this.encoding.DecoderFallback; if (decoderFallback != null) { base.Fallback = decoderFallback; } } // Token: 0x0600378F RID: 14223 RVA: 0x000BE6B4 File Offset: 0x000BC8B4 public override int GetCharCount(byte[] bytes, int index, int count) { return this.encoding.GetCharCount(bytes, index, count); } // Token: 0x06003790 RID: 14224 RVA: 0x000BE6C4 File Offset: 0x000BC8C4 public override int GetChars(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex) { return this.encoding.GetChars(bytes, byteIndex, byteCount, chars, charIndex); } // Token: 0x040016A1 RID: 5793 private Encoding encoding; } // Token: 0x020005F3 RID: 1523 private sealed class ForwardingEncoder : Encoder { // Token: 0x06003791 RID: 14225 RVA: 0x000BE6D8 File Offset: 0x000BC8D8 public ForwardingEncoder(Encoding enc) { this.encoding = enc; EncoderFallback encoderFallback = this.encoding.EncoderFallback; if (encoderFallback != null) { base.Fallback = encoderFallback; } } // Token: 0x06003792 RID: 14226 RVA: 0x000BE70C File Offset: 0x000BC90C public override int GetByteCount(char[] chars, int index, int count, bool flush) { return this.encoding.GetByteCount(chars, index, count); } // Token: 0x06003793 RID: 14227 RVA: 0x000BE71C File Offset: 0x000BC91C public override int GetBytes(char[] chars, int charIndex, int charCount, byte[] bytes, int byteCount, bool flush) { return this.encoding.GetBytes(chars, charIndex, charCount, bytes, byteCount); } // Token: 0x040016A2 RID: 5794 private Encoding encoding; } } }