using System; namespace System.Text { /// Provides a failure handling mechanism, called a fallback, for an input character that cannot be converted to an output byte sequence. The fallback uses a user-specified replacement string instead of the original input character. This class cannot be inherited. /// 2 // Token: 0x020005EF RID: 1519 [Serializable] public sealed class EncoderReplacementFallback : EncoderFallback { /// Initializes a new instance of the class. // Token: 0x06003739 RID: 14137 RVA: 0x000BCE6C File Offset: 0x000BB06C public EncoderReplacementFallback() : this("?") { } /// Initializes a new instance of the class using a specified replacement string. /// A string that is converted in an encoding operation in place of an input character that cannot be encoded. /// /// is null. /// /// contains an invalid surrogate pair. In other words, the surrogate does not consist of one high surrogate component followed by one low surrogate component. // Token: 0x0600373A RID: 14138 RVA: 0x000BCE7C File Offset: 0x000BB07C [MonoTODO] public EncoderReplacementFallback(string replacement) { if (replacement == null) { throw new ArgumentNullException(); } this.replacement = replacement; } /// Gets the replacement string that is the value of the object. /// A substitute string that is used in place of an input character that cannot be encoded. /// 2 // Token: 0x17000AD0 RID: 2768 // (get) Token: 0x0600373B RID: 14139 RVA: 0x000BCE98 File Offset: 0x000BB098 public string DefaultString { get { return this.replacement; } } /// Gets the number of characters in the replacement string for the object. /// The number of characters in the string used in place of an input character that cannot be encoded. /// 2 // Token: 0x17000AD1 RID: 2769 // (get) Token: 0x0600373C RID: 14140 RVA: 0x000BCEA0 File Offset: 0x000BB0A0 public override int MaxCharCount { get { return this.replacement.Length; } } /// Creates a object that is initialized with the replacement string of this object. /// A object equal to this object. /// 2 // Token: 0x0600373D RID: 14141 RVA: 0x000BCEB0 File Offset: 0x000BB0B0 public override EncoderFallbackBuffer CreateFallbackBuffer() { return new EncoderReplacementFallbackBuffer(this); } /// Indicates whether the value of a specified object is equal to the object. /// true if the parameter specifies an object and the replacement string of that object is equal to the replacement string of this object; otherwise, false. /// A object. /// 2 // Token: 0x0600373E RID: 14142 RVA: 0x000BCEB8 File Offset: 0x000BB0B8 public override bool Equals(object value) { EncoderReplacementFallback encoderReplacementFallback = value as EncoderReplacementFallback; return encoderReplacementFallback != null && this.replacement == encoderReplacementFallback.replacement; } /// Retrieves the hash code for the value of the object. /// The hash code of the value of the object. /// 2 // Token: 0x0600373F RID: 14143 RVA: 0x000BCEE8 File Offset: 0x000BB0E8 public override int GetHashCode() { return this.replacement.GetHashCode(); } // Token: 0x04001680 RID: 5760 private string replacement; } }