88 lines
3.4 KiB
C#
88 lines
3.4 KiB
C#
using System;
|
|
|
|
namespace System.Text
|
|
{
|
|
/// <summary>The exception that is thrown when a decoder fallback operation fails. This class cannot be inherited.</summary>
|
|
/// <filterpriority>2</filterpriority>
|
|
// Token: 0x020005E6 RID: 1510
|
|
[Serializable]
|
|
public sealed class DecoderFallbackException : ArgumentException
|
|
{
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.Text.DecoderFallbackException" /> class. </summary>
|
|
// Token: 0x060036F7 RID: 14071 RVA: 0x000BC7FC File Offset: 0x000BA9FC
|
|
public DecoderFallbackException()
|
|
: this(null)
|
|
{
|
|
}
|
|
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.Text.DecoderFallbackException" /> class. A parameter specifies the error message.</summary>
|
|
/// <param name="message">An error message.</param>
|
|
// Token: 0x060036F8 RID: 14072 RVA: 0x000BC808 File Offset: 0x000BAA08
|
|
public DecoderFallbackException(string message)
|
|
{
|
|
this.index = -1;
|
|
base..ctor(message);
|
|
}
|
|
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.Text.DecoderFallbackException" /> class. Parameters specify the error message and the inner exception that is the cause of this exception.</summary>
|
|
/// <param name="message">An error message.</param>
|
|
/// <param name="innerException">The exception that caused this exception.</param>
|
|
// Token: 0x060036F9 RID: 14073 RVA: 0x000BC818 File Offset: 0x000BAA18
|
|
public DecoderFallbackException(string message, Exception innerException)
|
|
{
|
|
this.index = -1;
|
|
base..ctor(message, innerException);
|
|
}
|
|
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.Text.DecoderFallbackException" /> class. Parameters specify the error message, the array of bytes being decoded, and the index of the byte that cannot be decoded.</summary>
|
|
/// <param name="message">An error message.</param>
|
|
/// <param name="bytesUnknown">The input byte array.</param>
|
|
/// <param name="index">The index position in <paramref name="bytesUnknown" /> of the byte that cannot be decoded.</param>
|
|
// Token: 0x060036FA RID: 14074 RVA: 0x000BC82C File Offset: 0x000BAA2C
|
|
public DecoderFallbackException(string message, byte[] bytesUnknown, int index)
|
|
{
|
|
this.index = -1;
|
|
base..ctor(message);
|
|
this.bytes_unknown = bytesUnknown;
|
|
this.index = index;
|
|
}
|
|
|
|
/// <summary>Gets the input byte sequence that caused the exception.</summary>
|
|
/// <returns>The input byte array that cannot be decoded. </returns>
|
|
/// <filterpriority>2</filterpriority>
|
|
// Token: 0x17000ABE RID: 2750
|
|
// (get) Token: 0x060036FB RID: 14075 RVA: 0x000BC84C File Offset: 0x000BAA4C
|
|
[MonoTODO]
|
|
public byte[] BytesUnknown
|
|
{
|
|
get
|
|
{
|
|
return this.bytes_unknown;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets the index position in the input byte sequence of the byte that caused the exception.</summary>
|
|
/// <returns>The index position in the input byte array of the byte that cannot be decoded. The index position is zero-based. </returns>
|
|
/// <filterpriority>1</filterpriority>
|
|
// Token: 0x17000ABF RID: 2751
|
|
// (get) Token: 0x060036FC RID: 14076 RVA: 0x000BC854 File Offset: 0x000BAA54
|
|
[MonoTODO]
|
|
public int Index
|
|
{
|
|
get
|
|
{
|
|
return this.index;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0400166F RID: 5743
|
|
private const string defaultMessage = "Failed to decode the input byte sequence to Unicode characters.";
|
|
|
|
// Token: 0x04001670 RID: 5744
|
|
private byte[] bytes_unknown;
|
|
|
|
// Token: 0x04001671 RID: 5745
|
|
private int index;
|
|
}
|
|
}
|