164 lines
8.1 KiB
C#
164 lines
8.1 KiB
C#
using System;
|
|
using System.Diagnostics;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace System
|
|
{
|
|
/// <summary>Represents a value type that can be assigned <see langword="null" />.</summary>
|
|
/// <typeparam name="T">The underlying value type of the <see cref="T:System.Nullable`1" /> generic type.</typeparam>
|
|
// Token: 0x02000188 RID: 392
|
|
[Token(Token = "0x2000188")]
|
|
[DebuggerStepThrough]
|
|
[Serializable]
|
|
public struct Nullable<T> where T : struct
|
|
{
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.Nullable`1" /> structure to the specified value.</summary>
|
|
/// <param name="value">A value type.</param>
|
|
// Token: 0x06000F81 RID: 3969 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6000F81")]
|
|
[Address(RVA = "0x2D1EE00", Offset = "0x2D1DC00", VA = "0x182D1EE00")]
|
|
public Nullable(T value)
|
|
{
|
|
}
|
|
|
|
/// <summary>Gets a value indicating whether the current <see cref="T:System.Nullable`1" /> object has a valid value of its underlying type.</summary>
|
|
/// <returns>
|
|
/// <see langword="true" /> if the current <see cref="T:System.Nullable`1" /> object has a value; <see langword="false" /> if the current <see cref="T:System.Nullable`1" /> object has no value.</returns>
|
|
// Token: 0x17000176 RID: 374
|
|
// (get) Token: 0x06000F82 RID: 3970 RVA: 0x0000C9A8 File Offset: 0x0000ABA8
|
|
[Token(Token = "0x17000176")]
|
|
public bool HasValue
|
|
{
|
|
[Token(Token = "0x6000F82")]
|
|
[Address(RVA = "0x1B6FAD0", Offset = "0x1B6E8D0", VA = "0x181B6FAD0")]
|
|
get
|
|
{
|
|
return default(bool);
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets the value of the current <see cref="T:System.Nullable`1" /> object if it has been assigned a valid underlying value.</summary>
|
|
/// <returns>The value of the current <see cref="T:System.Nullable`1" /> object if the <see cref="P:System.Nullable`1.HasValue" /> property is <see langword="true" />. An exception is thrown if the <see cref="P:System.Nullable`1.HasValue" /> property is <see langword="false" />.</returns>
|
|
/// <exception cref="T:System.InvalidOperationException">The <see cref="P:System.Nullable`1.HasValue" /> property is <see langword="false" />.</exception>
|
|
// Token: 0x17000177 RID: 375
|
|
// (get) Token: 0x06000F83 RID: 3971 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x17000177")]
|
|
public T Value
|
|
{
|
|
[Token(Token = "0x6000F83")]
|
|
[Address(RVA = "0x2D1FE50", Offset = "0x2D1EC50", VA = "0x182D1FE50")]
|
|
get
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
|
|
/// <summary>Indicates whether the current <see cref="T:System.Nullable`1" /> object is equal to a specified object.</summary>
|
|
/// <param name="other">An object.</param>
|
|
/// <returns>
|
|
/// <see langword="true" /> if the <paramref name="other" /> parameter is equal to the current <see cref="T:System.Nullable`1" /> object; otherwise, <see langword="false" />.
|
|
/// This table describes how equality is defined for the compared values:
|
|
/// Return Value
|
|
///
|
|
/// Description
|
|
///
|
|
/// <see langword="true" /> The <see cref="P:System.Nullable`1.HasValue" /> property is <see langword="false" />, and the <paramref name="other" /> parameter is <see langword="null" />. That is, two null values are equal by definition.
|
|
///
|
|
/// -or-
|
|
///
|
|
/// The <see cref="P:System.Nullable`1.HasValue" /> property is <see langword="true" />, and the value returned by the <see cref="P:System.Nullable`1.Value" /> property is equal to the <paramref name="other" /> parameter.
|
|
///
|
|
/// <see langword="false" /> The <see cref="P:System.Nullable`1.HasValue" /> property for the current <see cref="T:System.Nullable`1" /> structure is <see langword="true" />, and the <paramref name="other" /> parameter is <see langword="null" />.
|
|
///
|
|
/// -or-
|
|
///
|
|
/// The <see cref="P:System.Nullable`1.HasValue" /> property for the current <see cref="T:System.Nullable`1" /> structure is <see langword="false" />, and the <paramref name="other" /> parameter is not <see langword="null" />.
|
|
///
|
|
/// -or-
|
|
///
|
|
/// The <see cref="P:System.Nullable`1.HasValue" /> property for the current <see cref="T:System.Nullable`1" /> structure is <see langword="true" />, and the value returned by the <see cref="P:System.Nullable`1.Value" /> property is not equal to the <paramref name="other" /> parameter.</returns>
|
|
// Token: 0x06000F84 RID: 3972 RVA: 0x0000C9C0 File Offset: 0x0000ABC0
|
|
[Token(Token = "0x6000F84")]
|
|
[Address(RVA = "0x2966740", Offset = "0x2965540", VA = "0x182966740", Slot = "0")]
|
|
public override bool Equals(object other)
|
|
{
|
|
return default(bool);
|
|
}
|
|
|
|
// Token: 0x06000F85 RID: 3973 RVA: 0x0000C9D8 File Offset: 0x0000ABD8
|
|
[Token(Token = "0x6000F85")]
|
|
[Address(RVA = "0x2967020", Offset = "0x2965E20", VA = "0x182967020")]
|
|
private bool Equals(T? other)
|
|
{
|
|
return default(bool);
|
|
}
|
|
|
|
/// <summary>Retrieves the hash code of the object returned by the <see cref="P:System.Nullable`1.Value" /> property.</summary>
|
|
/// <returns>The hash code of the object returned by the <see cref="P:System.Nullable`1.Value" /> property if the <see cref="P:System.Nullable`1.HasValue" /> property is <see langword="true" />, or zero if the <see cref="P:System.Nullable`1.HasValue" /> property is <see langword="false" />.</returns>
|
|
// Token: 0x06000F86 RID: 3974 RVA: 0x0000C9F0 File Offset: 0x0000ABF0
|
|
[Token(Token = "0x6000F86")]
|
|
[Address(RVA = "0x2967C60", Offset = "0x2966A60", VA = "0x182967C60", Slot = "2")]
|
|
public override int GetHashCode()
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/// <summary>Retrieves the value of the current <see cref="T:System.Nullable`1" /> object, or the default value of the underlying type.</summary>
|
|
/// <returns>The value of the <see cref="P:System.Nullable`1.Value" /> property if the <see cref="P:System.Nullable`1.HasValue" /> property is <see langword="true" />; otherwise, the default value of the underlying type.</returns>
|
|
// Token: 0x06000F87 RID: 3975 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x6000F87")]
|
|
[Address(RVA = "0x57C620", Offset = "0x57B420", VA = "0x18057C620")]
|
|
public T GetValueOrDefault()
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Retrieves the value of the current <see cref="T:System.Nullable`1" /> object, or the specified default value.</summary>
|
|
/// <param name="defaultValue">A value to return if the <see cref="P:System.Nullable`1.HasValue" /> property is <see langword="false" />.</param>
|
|
/// <returns>The value of the <see cref="P:System.Nullable`1.Value" /> property if the <see cref="P:System.Nullable`1.HasValue" /> property is <see langword="true" />; otherwise, the <paramref name="defaultValue" /> parameter.</returns>
|
|
// Token: 0x06000F88 RID: 3976 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x6000F88")]
|
|
[Address(RVA = "0x2D1CC80", Offset = "0x2D1BA80", VA = "0x182D1CC80")]
|
|
public T GetValueOrDefault(T defaultValue)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Returns the text representation of the value of the current <see cref="T:System.Nullable`1" /> object.</summary>
|
|
/// <returns>The text representation of the value of the current <see cref="T:System.Nullable`1" /> object if the <see cref="P:System.Nullable`1.HasValue" /> property is <see langword="true" />, or an empty string ("") if the <see cref="P:System.Nullable`1.HasValue" /> property is <see langword="false" />.</returns>
|
|
// Token: 0x06000F89 RID: 3977 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x6000F89")]
|
|
[Address(RVA = "0x2969630", Offset = "0x2968430", VA = "0x182969630", Slot = "3")]
|
|
public override string ToString()
|
|
{
|
|
return null;
|
|
}
|
|
|
|
// Token: 0x06000F8A RID: 3978 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x6000F8A")]
|
|
[Address(RVA = "0x2963AD0", Offset = "0x29628D0", VA = "0x182963AD0")]
|
|
private static object Box(T? o)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
// Token: 0x06000F8B RID: 3979 RVA: 0x0000CA08 File Offset: 0x0000AC08
|
|
[Token(Token = "0x6000F8B")]
|
|
[Address(RVA = "0x296AF60", Offset = "0x2969D60", VA = "0x18296AF60")]
|
|
private static T? Unbox(object o)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
// Token: 0x04000641 RID: 1601
|
|
[FieldOffset(Offset = "0x0")]
|
|
[Token(Token = "0x4000641")]
|
|
internal T value;
|
|
|
|
// Token: 0x04000642 RID: 1602
|
|
[FieldOffset(Offset = "0x0")]
|
|
[Token(Token = "0x4000642")]
|
|
internal bool has_value;
|
|
}
|
|
}
|