using System; using System.Runtime.InteropServices; namespace System.Runtime.Serialization { /// Represents a base implementation of the interface that uses the class and the interface. // Token: 0x02000479 RID: 1145 [ComVisible(true)] public class FormatterConverter : IFormatterConverter { /// Converts a value to the given . /// The converted or null if the parameter is null. /// The object to convert. /// The into which is converted. /// The parameter is null. // Token: 0x06002BC5 RID: 11205 RVA: 0x00090630 File Offset: 0x0008E830 public object Convert(object value, Type type) { return global::System.Convert.ChangeType(value, type); } /// Converts a value to the given . /// The converted , or null if the parameter is null. /// The object to convert. /// The into which is converted. /// The parameter is null. // Token: 0x06002BC6 RID: 11206 RVA: 0x0009063C File Offset: 0x0008E83C public object Convert(object value, TypeCode typeCode) { return global::System.Convert.ChangeType(value, typeCode); } /// Converts a value to a . /// The converted or null if the parameter is null. /// The object to convert. /// The parameter is null. // Token: 0x06002BC7 RID: 11207 RVA: 0x00090648 File Offset: 0x0008E848 public bool ToBoolean(object value) { if (value == null) { throw new ArgumentNullException("value is null."); } return global::System.Convert.ToBoolean(value); } /// Converts a value to an 8-bit unsigned integer. /// The converted or null if the parameter is null. /// The object to convert. /// The parameter is null. // Token: 0x06002BC8 RID: 11208 RVA: 0x00090664 File Offset: 0x0008E864 public byte ToByte(object value) { if (value == null) { throw new ArgumentNullException("value is null."); } return global::System.Convert.ToByte(value); } /// Converts a value to a Unicode character. /// The converted or null if the parameter is null. /// The object to convert. /// The parameter is null. // Token: 0x06002BC9 RID: 11209 RVA: 0x00090680 File Offset: 0x0008E880 public char ToChar(object value) { if (value == null) { throw new ArgumentNullException("value is null."); } return global::System.Convert.ToChar(value); } /// Converts a value to a . /// The converted or null if the parameter is null. /// The object to convert. /// The parameter is null. // Token: 0x06002BCA RID: 11210 RVA: 0x0009069C File Offset: 0x0008E89C public DateTime ToDateTime(object value) { if (value == null) { throw new ArgumentNullException("value is null."); } return global::System.Convert.ToDateTime(value); } /// Converts a value to a . /// The converted or null if the parameter is null. /// The object to convert. /// The parameter is null. // Token: 0x06002BCB RID: 11211 RVA: 0x000906B8 File Offset: 0x0008E8B8 public decimal ToDecimal(object value) { if (value == null) { throw new ArgumentNullException("value is null."); } return global::System.Convert.ToDecimal(value); } /// Converts a value to a double-precision floating-point number. /// The converted or null if the parameter is null. /// The object to convert. /// The parameter is null. // Token: 0x06002BCC RID: 11212 RVA: 0x000906D4 File Offset: 0x0008E8D4 public double ToDouble(object value) { if (value == null) { throw new ArgumentNullException("value is null."); } return global::System.Convert.ToDouble(value); } /// Converts a value to a 16-bit signed integer. /// The converted or null if the parameter is null. /// The object to convert. /// The parameter is null. // Token: 0x06002BCD RID: 11213 RVA: 0x000906F0 File Offset: 0x0008E8F0 public short ToInt16(object value) { if (value == null) { throw new ArgumentNullException("value is null."); } return global::System.Convert.ToInt16(value); } /// Converts a value to a 32-bit signed integer. /// The converted or null if the parameter is null. /// The object to convert. /// The parameter is null. // Token: 0x06002BCE RID: 11214 RVA: 0x0009070C File Offset: 0x0008E90C public int ToInt32(object value) { if (value == null) { throw new ArgumentNullException("value is null."); } return global::System.Convert.ToInt32(value); } /// Converts a value to a 64-bit signed integer. /// The converted or null if the parameter is null. /// The object to convert. /// The parameter is null. // Token: 0x06002BCF RID: 11215 RVA: 0x00090728 File Offset: 0x0008E928 public long ToInt64(object value) { if (value == null) { throw new ArgumentNullException("value is null."); } return global::System.Convert.ToInt64(value); } /// Converts a value to a single-precision floating-point number. /// The converted or null if the parameter is null. /// The object to convert. /// The parameter is null. // Token: 0x06002BD0 RID: 11216 RVA: 0x00090744 File Offset: 0x0008E944 public float ToSingle(object value) { if (value == null) { throw new ArgumentNullException("value is null."); } return global::System.Convert.ToSingle(value); } /// Converts the specified object to a . /// The converted or null if the parameter is null. /// The object to convert. /// The parameter is null. // Token: 0x06002BD1 RID: 11217 RVA: 0x00090760 File Offset: 0x0008E960 public string ToString(object value) { if (value == null) { throw new ArgumentNullException("value is null."); } return global::System.Convert.ToString(value); } /// Converts a value to a . /// The converted or null if the parameter is null. /// The object to convert. /// The parameter is null. // Token: 0x06002BD2 RID: 11218 RVA: 0x0009077C File Offset: 0x0008E97C [CLSCompliant(false)] public sbyte ToSByte(object value) { if (value == null) { throw new ArgumentNullException("value is null."); } return global::System.Convert.ToSByte(value); } /// Converts a value to a 16-bit unsigned integer. /// The converted or null if the parameter is null. /// The object to convert. /// The parameter is null. // Token: 0x06002BD3 RID: 11219 RVA: 0x00090798 File Offset: 0x0008E998 [CLSCompliant(false)] public ushort ToUInt16(object value) { if (value == null) { throw new ArgumentNullException("value is null."); } return global::System.Convert.ToUInt16(value); } /// Converts a value to a 32-bit unsigned integer. /// The converted or null if the parameter is null. /// The object to convert. /// The parameter is null. // Token: 0x06002BD4 RID: 11220 RVA: 0x000907B4 File Offset: 0x0008E9B4 [CLSCompliant(false)] public uint ToUInt32(object value) { if (value == null) { throw new ArgumentNullException("value is null."); } return global::System.Convert.ToUInt32(value); } /// Converts a value to a 64-bit unsigned integer. /// The converted or null if the parameter is null. /// The object to convert. /// The parameter is null. // Token: 0x06002BD5 RID: 11221 RVA: 0x000907D0 File Offset: 0x0008E9D0 [CLSCompliant(false)] public ulong ToUInt64(object value) { if (value == null) { throw new ArgumentNullException("value is null."); } return global::System.Convert.ToUInt64(value); } } }