Files
Dec2017-Script-Dump/mscorlib/System/Runtime/Serialization/SerializationInfo.cs
T
2026-06-04 11:42:34 +02:00

614 lines
35 KiB
C#

using System;
using System.Collections;
using System.Runtime.InteropServices;
namespace System.Runtime.Serialization
{
/// <summary>Stores all the data needed to serialize or deserialize an object. This class cannot be inherited.</summary>
// Token: 0x02000494 RID: 1172
[ComVisible(true)]
public sealed class SerializationInfo
{
// Token: 0x06002C50 RID: 11344 RVA: 0x00091F3C File Offset: 0x0009013C
private SerializationInfo(Type type)
{
this.assemblyName = type.Assembly.FullName;
this.fullTypeName = type.FullName;
this.converter = new FormatterConverter();
}
// Token: 0x06002C51 RID: 11345 RVA: 0x00091F90 File Offset: 0x00090190
private SerializationInfo(Type type, SerializationEntry[] data)
{
int num = data.Length;
this.assemblyName = type.Assembly.FullName;
this.fullTypeName = type.FullName;
this.converter = new FormatterConverter();
for (int i = 0; i < num; i++)
{
this.serialized.Add(data[i].Name, data[i]);
this.values.Add(data[i]);
}
}
/// <summary>Creates a new instance of the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> class.</summary>
/// <param name="type">The <see cref="T:System.Type" /> of the object to serialize. </param>
/// <param name="converter">The <see cref="T:System.Runtime.Serialization.IFormatterConverter" /> used during deserialization. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="type" /> or <paramref name="converter" /> is null. </exception>
// Token: 0x06002C52 RID: 11346 RVA: 0x0009203C File Offset: 0x0009023C
[CLSCompliant(false)]
public SerializationInfo(Type type, IFormatterConverter converter)
{
if (type == null)
{
throw new ArgumentNullException("type", "Null argument");
}
if (converter == null)
{
throw new ArgumentNullException("converter", "Null argument");
}
this.converter = converter;
this.assemblyName = type.Assembly.FullName;
this.fullTypeName = type.FullName;
}
/// <summary>Gets or sets the assembly name of the type to serialize during serialization only.</summary>
/// <returns>The full name of the assembly of the type to serialize.</returns>
/// <exception cref="T:System.ArgumentNullException">The value the property is set to is null. </exception>
// Token: 0x170008A7 RID: 2215
// (get) Token: 0x06002C53 RID: 11347 RVA: 0x000920B8 File Offset: 0x000902B8
// (set) Token: 0x06002C54 RID: 11348 RVA: 0x000920C0 File Offset: 0x000902C0
public string AssemblyName
{
get
{
return this.assemblyName;
}
set
{
if (value == null)
{
throw new ArgumentNullException("Argument is null.");
}
this.assemblyName = value;
}
}
/// <summary>Gets or sets the full name of the <see cref="T:System.Type" /> to serialize.</summary>
/// <returns>The full name of the type to serialize.</returns>
/// <exception cref="T:System.ArgumentNullException">The value this property is set to is null. </exception>
// Token: 0x170008A8 RID: 2216
// (get) Token: 0x06002C55 RID: 11349 RVA: 0x000920DC File Offset: 0x000902DC
// (set) Token: 0x06002C56 RID: 11350 RVA: 0x000920E4 File Offset: 0x000902E4
public string FullTypeName
{
get
{
return this.fullTypeName;
}
set
{
if (value == null)
{
throw new ArgumentNullException("Argument is null.");
}
this.fullTypeName = value;
}
}
/// <summary>Gets the number of members that have been added to the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> store.</summary>
/// <returns>The number of members that have been added to the current <see cref="T:System.Runtime.Serialization.SerializationInfo" />.</returns>
// Token: 0x170008A9 RID: 2217
// (get) Token: 0x06002C57 RID: 11351 RVA: 0x00092100 File Offset: 0x00090300
public int MemberCount
{
get
{
return this.serialized.Count;
}
}
/// <summary>Adds a value into the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> store, where <paramref name="value" /> is associated with <paramref name="name" /> and is serialized as being of <see cref="T:System.Type" /><paramref name="type" />.</summary>
/// <param name="name">The name to associate with the value, so it can be deserialized later. </param>
/// <param name="value">The value to be serialized. Any children of this object will automatically be serialized. </param>
/// <param name="type">The <see cref="T:System.Type" /> to associate with the current object. This parameter must always be the type of the object itself or of one of its base classes. </param>
/// <exception cref="T:System.ArgumentNullException">If <paramref name="name" /> or <paramref name="type" /> is null. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">A value has already been associated with <paramref name="name" />. </exception>
// Token: 0x06002C58 RID: 11352 RVA: 0x00092110 File Offset: 0x00090310
public void AddValue(string name, object value, Type type)
{
if (name == null)
{
throw new ArgumentNullException("name is null");
}
if (type == null)
{
throw new ArgumentNullException("type is null");
}
if (this.serialized.ContainsKey(name))
{
throw new SerializationException("Value has been serialized already.");
}
SerializationEntry serializationEntry = new SerializationEntry(name, type, value);
this.serialized.Add(name, serializationEntry);
this.values.Add(serializationEntry);
}
/// <summary>Retrieves a value from the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> store.</summary>
/// <returns>The object of the specified <see cref="T:System.Type" /> associated with <paramref name="name" />.</returns>
/// <param name="name">The name associated with the value to retrieve.</param>
/// <param name="type">The <see cref="T:System.Type" /> of the value to retrieve. If the stored value cannot be converted to this type, the system will throw a <see cref="T:System.InvalidCastException" />. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="name" /> or <paramref name="type" /> is null. </exception>
/// <exception cref="T:System.InvalidCastException">The value associated with <paramref name="name" /> cannot be converted to <paramref name="type" />. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">An element with the specified name is not found in the current instance. </exception>
// Token: 0x06002C59 RID: 11353 RVA: 0x0009218C File Offset: 0x0009038C
public object GetValue(string name, Type type)
{
if (name == null)
{
throw new ArgumentNullException("name is null.");
}
if (type == null)
{
throw new ArgumentNullException("type");
}
if (!this.serialized.ContainsKey(name))
{
throw new SerializationException("No element named " + name + " could be found.");
}
SerializationEntry serializationEntry = (SerializationEntry)this.serialized[name];
if (serializationEntry.Value != null && !type.IsInstanceOfType(serializationEntry.Value))
{
return this.converter.Convert(serializationEntry.Value, type);
}
return serializationEntry.Value;
}
/// <summary>Sets the <see cref="T:System.Type" /> of the object to serialize.</summary>
/// <param name="type">The <see cref="T:System.Type" /> of the object to serialize. </param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="type" /> parameter is null. </exception>
// Token: 0x06002C5A RID: 11354 RVA: 0x00092230 File Offset: 0x00090430
public void SetType(Type type)
{
if (type == null)
{
throw new ArgumentNullException("type is null.");
}
this.fullTypeName = type.FullName;
this.assemblyName = type.Assembly.FullName;
}
/// <summary>Returns a <see cref="T:System.Runtime.Serialization.SerializationInfoEnumerator" /> used to iterate through the name-value pairs in the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> store.</summary>
/// <returns>A <see cref="T:System.Runtime.Serialization.SerializationInfoEnumerator" /> for parsing the name-value pairs contained in the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> store.</returns>
// Token: 0x06002C5B RID: 11355 RVA: 0x0009226C File Offset: 0x0009046C
public SerializationInfoEnumerator GetEnumerator()
{
return new SerializationInfoEnumerator(this.values);
}
/// <summary>Adds a 16-bit signed integer value into the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> store.</summary>
/// <param name="name">The name to associate with the value, so it can be deserialized later. </param>
/// <param name="value">The Int16 value to serialize. </param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="name" /> parameter is null. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">A value has already been associated with <paramref name="name" />. </exception>
// Token: 0x06002C5C RID: 11356 RVA: 0x0009227C File Offset: 0x0009047C
public void AddValue(string name, short value)
{
this.AddValue(name, value, typeof(short));
}
/// <summary>Adds a 16-bit unsigned integer value into the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> store.</summary>
/// <param name="name">The name to associate with the value, so it can be deserialized later. </param>
/// <param name="value">The UInt16 value to serialize. </param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="name" /> parameter is null. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">A value has already been associated with <paramref name="name" />. </exception>
// Token: 0x06002C5D RID: 11357 RVA: 0x00092298 File Offset: 0x00090498
[CLSCompliant(false)]
public void AddValue(string name, ushort value)
{
this.AddValue(name, value, typeof(ushort));
}
/// <summary>Adds a 32-bit signed integer value into the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> store.</summary>
/// <param name="name">The name to associate with the value, so it can be deserialized later. </param>
/// <param name="value">The Int32 value to serialize. </param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="name" /> parameter is null. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">A value has already been associated with <paramref name="name" />. </exception>
// Token: 0x06002C5E RID: 11358 RVA: 0x000922B4 File Offset: 0x000904B4
public void AddValue(string name, int value)
{
this.AddValue(name, value, typeof(int));
}
/// <summary>Adds an 8-bit unsigned integer value into the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> store.</summary>
/// <param name="name">The name to associate with the value, so it can be deserialized later. </param>
/// <param name="value">The byte value to serialize. </param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="name" /> parameter is null. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">A value has already been associated with <paramref name="name" />. </exception>
// Token: 0x06002C5F RID: 11359 RVA: 0x000922D0 File Offset: 0x000904D0
public void AddValue(string name, byte value)
{
this.AddValue(name, value, typeof(byte));
}
/// <summary>Adds a Boolean value into the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> store.</summary>
/// <param name="name">The name to associate with the value, so it can be deserialized later. </param>
/// <param name="value">The Boolean value to serialize. </param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="name" /> parameter is null. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">A value has already been associated with <paramref name="name" />. </exception>
// Token: 0x06002C60 RID: 11360 RVA: 0x000922EC File Offset: 0x000904EC
public void AddValue(string name, bool value)
{
this.AddValue(name, value, typeof(bool));
}
/// <summary>Adds a Unicode character value into the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> store.</summary>
/// <param name="name">The name to associate with the value, so it can be deserialized later. </param>
/// <param name="value">The character value to serialize. </param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="name" /> parameter is null. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">A value has already been associated with <paramref name="name" />. </exception>
// Token: 0x06002C61 RID: 11361 RVA: 0x00092308 File Offset: 0x00090508
public void AddValue(string name, char value)
{
this.AddValue(name, value, typeof(char));
}
/// <summary>Adds an 8-bit signed integer value into the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> store.</summary>
/// <param name="name">The name to associate with the value, so it can be deserialized later. </param>
/// <param name="value">The Sbyte value to serialize. </param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="name" /> parameter is null. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">A value has already been associated with <paramref name="name" />. </exception>
// Token: 0x06002C62 RID: 11362 RVA: 0x00092324 File Offset: 0x00090524
[CLSCompliant(false)]
public void AddValue(string name, sbyte value)
{
this.AddValue(name, value, typeof(sbyte));
}
/// <summary>Adds a double-precision floating-point value into the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> store.</summary>
/// <param name="name">The name to associate with the value, so it can be deserialized later. </param>
/// <param name="value">The double value to serialize. </param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="name" /> parameter is null. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">A value has already been associated with <paramref name="name" />. </exception>
// Token: 0x06002C63 RID: 11363 RVA: 0x00092340 File Offset: 0x00090540
public void AddValue(string name, double value)
{
this.AddValue(name, value, typeof(double));
}
/// <summary>Adds a decimal value into the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> store.</summary>
/// <param name="name">The name to associate with the value, so it can be deserialized later. </param>
/// <param name="value">The decimal value to serialize. </param>
/// <exception cref="T:System.ArgumentNullException">If The <paramref name="name" /> parameter is null. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">If a value has already been associated with <paramref name="name" />. </exception>
// Token: 0x06002C64 RID: 11364 RVA: 0x0009235C File Offset: 0x0009055C
public void AddValue(string name, decimal value)
{
this.AddValue(name, value, typeof(decimal));
}
/// <summary>Adds a <see cref="T:System.DateTime" /> value into the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> store.</summary>
/// <param name="name">The name to associate with the value, so it can be deserialized later. </param>
/// <param name="value">The <see cref="T:System.DateTime" /> value to serialize. </param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="name" /> parameter is null. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">A value has already been associated with <paramref name="name" />. </exception>
// Token: 0x06002C65 RID: 11365 RVA: 0x00092378 File Offset: 0x00090578
public void AddValue(string name, DateTime value)
{
this.AddValue(name, value, typeof(DateTime));
}
/// <summary>Adds a single-precision floating-point value into the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> store.</summary>
/// <param name="name">The name to associate with the value, so it can be deserialized later. </param>
/// <param name="value">The single value to serialize. </param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="name" /> parameter is null. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">A value has already been associated with <paramref name="name" />. </exception>
// Token: 0x06002C66 RID: 11366 RVA: 0x00092394 File Offset: 0x00090594
public void AddValue(string name, float value)
{
this.AddValue(name, value, typeof(float));
}
/// <summary>Adds a 32-bit unsigned integer value into the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> store.</summary>
/// <param name="name">The name to associate with the value, so it can be deserialized later. </param>
/// <param name="value">The UInt32 value to serialize. </param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="name" /> parameter is null. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">A value has already been associated with <paramref name="name" />. </exception>
// Token: 0x06002C67 RID: 11367 RVA: 0x000923B0 File Offset: 0x000905B0
[CLSCompliant(false)]
public void AddValue(string name, uint value)
{
this.AddValue(name, value, typeof(uint));
}
/// <summary>Adds a 64-bit signed integer value into the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> store.</summary>
/// <param name="name">The name to associate with the value, so it can be deserialized later. </param>
/// <param name="value">The Int64 value to serialize. </param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="name" /> parameter is null. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">A value has already been associated with <paramref name="name" />. </exception>
// Token: 0x06002C68 RID: 11368 RVA: 0x000923CC File Offset: 0x000905CC
public void AddValue(string name, long value)
{
this.AddValue(name, value, typeof(long));
}
/// <summary>Adds a 64-bit unsigned integer value into the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> store.</summary>
/// <param name="name">The name to associate with the value, so it can be deserialized later. </param>
/// <param name="value">The UInt64 value to serialize. </param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="name" /> parameter is null. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">A value has already been associated with <paramref name="name" />. </exception>
// Token: 0x06002C69 RID: 11369 RVA: 0x000923E8 File Offset: 0x000905E8
[CLSCompliant(false)]
public void AddValue(string name, ulong value)
{
this.AddValue(name, value, typeof(ulong));
}
/// <summary>Adds the specified object into the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> store, where it is associated with a specified name.</summary>
/// <param name="name">The name to associate with the value, so it can be deserialized later. </param>
/// <param name="value">The value to be serialized. Any children of this object will automatically be serialized. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="name" /> is null. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">A value has already been associated with <paramref name="name" />. </exception>
// Token: 0x06002C6A RID: 11370 RVA: 0x00092404 File Offset: 0x00090604
public void AddValue(string name, object value)
{
if (value == null)
{
this.AddValue(name, value, typeof(object));
}
else
{
this.AddValue(name, value, value.GetType());
}
}
/// <summary>Retrieves a Boolean value from the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> store.</summary>
/// <returns>The Boolean value associated with <paramref name="name" />.</returns>
/// <param name="name">The name associated with the value to retrieve. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="name" /> is null. </exception>
/// <exception cref="T:System.InvalidCastException">The value associated with <paramref name="name" /> cannot be converted to a Boolean value. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">An element with the specified name is not found in the current instance. </exception>
// Token: 0x06002C6B RID: 11371 RVA: 0x0009243C File Offset: 0x0009063C
public bool GetBoolean(string name)
{
object value = this.GetValue(name, typeof(bool));
return this.converter.ToBoolean(value);
}
/// <summary>Retrieves an 8-bit unsigned integer value from the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> store.</summary>
/// <returns>The 8-bit unsigned integer associated with <paramref name="name" />.</returns>
/// <param name="name">The name associated with the value to retrieve. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="name" /> is null. </exception>
/// <exception cref="T:System.InvalidCastException">The value associated with <paramref name="name" /> cannot be converted to an 8-bit unsigned integer. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">An element with the specified name is not found in the current instance. </exception>
// Token: 0x06002C6C RID: 11372 RVA: 0x00092468 File Offset: 0x00090668
public byte GetByte(string name)
{
object value = this.GetValue(name, typeof(byte));
return this.converter.ToByte(value);
}
/// <summary>Retrieves a Unicode character value from the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> store.</summary>
/// <returns>The Unicode character associated with <paramref name="name" />.</returns>
/// <param name="name">The name associated with the value to retrieve.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="name" /> is null. </exception>
/// <exception cref="T:System.InvalidCastException">The value associated with <paramref name="name" /> cannot be converted to a Unicode character. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">An element with the specified name is not found in the current instance. </exception>
// Token: 0x06002C6D RID: 11373 RVA: 0x00092494 File Offset: 0x00090694
public char GetChar(string name)
{
object value = this.GetValue(name, typeof(char));
return this.converter.ToChar(value);
}
/// <summary>Retrieves a <see cref="T:System.DateTime" /> value from the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> store.</summary>
/// <returns>The <see cref="T:System.DateTime" /> value associated with <paramref name="name" />.</returns>
/// <param name="name">The name associated with the value to retrieve. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="name" /> is null. </exception>
/// <exception cref="T:System.InvalidCastException">The value associated with <paramref name="name" /> cannot be converted to a <see cref="T:System.DateTime" /> value. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">An element with the specified name is not found in the current instance. </exception>
// Token: 0x06002C6E RID: 11374 RVA: 0x000924C0 File Offset: 0x000906C0
public DateTime GetDateTime(string name)
{
object value = this.GetValue(name, typeof(DateTime));
return this.converter.ToDateTime(value);
}
/// <summary>Retrieves a decimal value from the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> store.</summary>
/// <returns>A decimal value from the <see cref="T:System.Runtime.Serialization.SerializationInfo" />.</returns>
/// <param name="name">The name associated with the value to retrieve. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="name" /> is null. </exception>
/// <exception cref="T:System.InvalidCastException">The value associated with <paramref name="name" /> cannot be converted to a decimal. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">An element with the specified name is not found in the current instance. </exception>
// Token: 0x06002C6F RID: 11375 RVA: 0x000924EC File Offset: 0x000906EC
public decimal GetDecimal(string name)
{
object value = this.GetValue(name, typeof(decimal));
return this.converter.ToDecimal(value);
}
/// <summary>Retrieves a double-precision floating-point value from the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> store.</summary>
/// <returns>The double-precision floating-point value associated with <paramref name="name" />.</returns>
/// <param name="name">The name associated with the value to retrieve.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="name" /> is null. </exception>
/// <exception cref="T:System.InvalidCastException">The value associated with <paramref name="name" /> cannot be converted to a double-precision floating-point value. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">An element with the specified name is not found in the current instance. </exception>
// Token: 0x06002C70 RID: 11376 RVA: 0x00092518 File Offset: 0x00090718
public double GetDouble(string name)
{
object value = this.GetValue(name, typeof(double));
return this.converter.ToDouble(value);
}
/// <summary>Retrieves a 16-bit signed integer value from the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> store.</summary>
/// <returns>The 16-bit signed integer associated with <paramref name="name" />.</returns>
/// <param name="name">The name associated with the value to retrieve.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="name" /> is null. </exception>
/// <exception cref="T:System.InvalidCastException">The value associated with <paramref name="name" /> cannot be converted to a 16-bit signed integer. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">An element with the specified name is not found in the current instance. </exception>
// Token: 0x06002C71 RID: 11377 RVA: 0x00092544 File Offset: 0x00090744
public short GetInt16(string name)
{
object value = this.GetValue(name, typeof(short));
return this.converter.ToInt16(value);
}
/// <summary>Retrieves a 32-bit signed integer value from the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> store.</summary>
/// <returns>The 32-bit signed integer associated with <paramref name="name" />.</returns>
/// <param name="name">The name of the value to retrieve. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="name" /> is null. </exception>
/// <exception cref="T:System.InvalidCastException">The value associated with <paramref name="name" /> cannot be converted to a 32-bit signed integer. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">An element with the specified name is not found in the current instance. </exception>
// Token: 0x06002C72 RID: 11378 RVA: 0x00092570 File Offset: 0x00090770
public int GetInt32(string name)
{
object value = this.GetValue(name, typeof(int));
return this.converter.ToInt32(value);
}
/// <summary>Retrieves a 64-bit signed integer value from the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> store.</summary>
/// <returns>The 64-bit signed integer associated with <paramref name="name" />.</returns>
/// <param name="name">The name associated with the value to retrieve.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="name" /> is null. </exception>
/// <exception cref="T:System.InvalidCastException">The value associated with <paramref name="name" /> cannot be converted to a 64-bit signed integer. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">An element with the specified name is not found in the current instance. </exception>
// Token: 0x06002C73 RID: 11379 RVA: 0x0009259C File Offset: 0x0009079C
public long GetInt64(string name)
{
object value = this.GetValue(name, typeof(long));
return this.converter.ToInt64(value);
}
/// <summary>Retrieves an 8-bit signed integer value from the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> store.</summary>
/// <returns>The 8-bit signed integer associated with <paramref name="name" />.</returns>
/// <param name="name">The name associated with the value to retrieve.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="name" /> is null. </exception>
/// <exception cref="T:System.InvalidCastException">The value associated with <paramref name="name" /> cannot be converted to an 8-bit signed integer. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">An element with the specified name is not found in the current instance. </exception>
// Token: 0x06002C74 RID: 11380 RVA: 0x000925C8 File Offset: 0x000907C8
[CLSCompliant(false)]
public sbyte GetSByte(string name)
{
object value = this.GetValue(name, typeof(sbyte));
return this.converter.ToSByte(value);
}
/// <summary>Retrieves a single-precision floating-point value from the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> store.</summary>
/// <returns>The single-precision floating-point value associated with <paramref name="name" />.</returns>
/// <param name="name">The name of the value to retrieve. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="name" /> is null. </exception>
/// <exception cref="T:System.InvalidCastException">The value associated with <paramref name="name" /> cannot be converted to a single-precision floating-point value. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">An element with the specified name is not found in the current instance. </exception>
// Token: 0x06002C75 RID: 11381 RVA: 0x000925F4 File Offset: 0x000907F4
public float GetSingle(string name)
{
object value = this.GetValue(name, typeof(float));
return this.converter.ToSingle(value);
}
/// <summary>Retrieves a <see cref="T:System.String" /> value from the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> store.</summary>
/// <returns>The <see cref="T:System.String" /> associated with <paramref name="name" />.</returns>
/// <param name="name">The name associated with the value to retrieve.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="name" /> is null. </exception>
/// <exception cref="T:System.InvalidCastException">The value associated with <paramref name="name" /> cannot be converted to a <see cref="T:System.String" />. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">An element with the specified name is not found in the current instance. </exception>
// Token: 0x06002C76 RID: 11382 RVA: 0x00092620 File Offset: 0x00090820
public string GetString(string name)
{
object value = this.GetValue(name, typeof(string));
if (value == null)
{
return null;
}
return this.converter.ToString(value);
}
/// <summary>Retrieves a 16-bit unsigned integer value from the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> store.</summary>
/// <returns>The 16-bit unsigned integer associated with <paramref name="name" />.</returns>
/// <param name="name">The name associated with the value to retrieve.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="name" /> is null. </exception>
/// <exception cref="T:System.InvalidCastException">The value associated with <paramref name="name" /> cannot be converted to a 16-bit unsigned integer. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">An element with the specified name is not found in the current instance. </exception>
// Token: 0x06002C77 RID: 11383 RVA: 0x00092654 File Offset: 0x00090854
[CLSCompliant(false)]
public ushort GetUInt16(string name)
{
object value = this.GetValue(name, typeof(ushort));
return this.converter.ToUInt16(value);
}
/// <summary>Retrieves a 32-bit unsigned integer value from the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> store.</summary>
/// <returns>The 32-bit unsigned integer associated with <paramref name="name" />.</returns>
/// <param name="name">The name associated with the value to retrieve.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="name" /> is null. </exception>
/// <exception cref="T:System.InvalidCastException">The value associated with <paramref name="name" /> cannot be converted to a 32-bit unsigned integer. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">An element with the specified name is not found in the current instance. </exception>
// Token: 0x06002C78 RID: 11384 RVA: 0x00092680 File Offset: 0x00090880
[CLSCompliant(false)]
public uint GetUInt32(string name)
{
object value = this.GetValue(name, typeof(uint));
return this.converter.ToUInt32(value);
}
/// <summary>Retrieves a 64-bit unsigned integer value from the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> store.</summary>
/// <returns>The 64-bit unsigned integer associated with <paramref name="name" />.</returns>
/// <param name="name">The name associated with the value to retrieve.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="name" /> is null. </exception>
/// <exception cref="T:System.InvalidCastException">The value associated with <paramref name="name" /> cannot be converted to a 64-bit unsigned integer. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">An element with the specified name is not found in the current instance. </exception>
// Token: 0x06002C79 RID: 11385 RVA: 0x000926AC File Offset: 0x000908AC
[CLSCompliant(false)]
public ulong GetUInt64(string name)
{
object value = this.GetValue(name, typeof(ulong));
return this.converter.ToUInt64(value);
}
// Token: 0x06002C7A RID: 11386 RVA: 0x000926D8 File Offset: 0x000908D8
private SerializationEntry[] get_entries()
{
SerializationEntry[] array = new SerializationEntry[this.MemberCount];
int num = 0;
foreach (SerializationEntry serializationEntry in this)
{
array[num++] = serializationEntry;
}
return array;
}
// Token: 0x04001131 RID: 4401
private Hashtable serialized = new Hashtable();
// Token: 0x04001132 RID: 4402
private ArrayList values = new ArrayList();
// Token: 0x04001133 RID: 4403
private string assemblyName;
// Token: 0x04001134 RID: 4404
private string fullTypeName;
// Token: 0x04001135 RID: 4405
private IFormatterConverter converter;
}
}