43 lines
1.1 KiB
C#
43 lines
1.1 KiB
C#
using System;
|
|
using System.Runtime.Serialization;
|
|
|
|
namespace System.Text
|
|
{
|
|
// Token: 0x020005FB RID: 1531
|
|
[Serializable]
|
|
internal sealed class SurrogateEncoder : ISerializable, IObjectReference
|
|
{
|
|
// Token: 0x06003802 RID: 14338 RVA: 0x000C01C4 File Offset: 0x000BE3C4
|
|
private SurrogateEncoder(SerializationInfo info, StreamingContext context)
|
|
{
|
|
if (info == null)
|
|
{
|
|
throw new ArgumentNullException("info");
|
|
}
|
|
this.encoding = (Encoding)info.GetValue("m_encoding", typeof(Encoding));
|
|
}
|
|
|
|
// Token: 0x06003803 RID: 14339 RVA: 0x000C0200 File Offset: 0x000BE400
|
|
public void GetObjectData(SerializationInfo info, StreamingContext context)
|
|
{
|
|
throw new ArgumentException("This class cannot be serialized.");
|
|
}
|
|
|
|
// Token: 0x06003804 RID: 14340 RVA: 0x000C020C File Offset: 0x000BE40C
|
|
public object GetRealObject(StreamingContext context)
|
|
{
|
|
if (this.realObject == null)
|
|
{
|
|
this.realObject = this.encoding.GetEncoder();
|
|
}
|
|
return this.realObject;
|
|
}
|
|
|
|
// Token: 0x040016B9 RID: 5817
|
|
private Encoding encoding;
|
|
|
|
// Token: 0x040016BA RID: 5818
|
|
private Encoder realObject;
|
|
}
|
|
}
|