Show / Hide Table of Contents

Class EnumWrapper<TEnum, TWrapper>

Used to implement IEquatable<T> for an enum.

Inheritance
object
EnumWrapper<TEnum, TWrapper>
TestBotAction
Implements
IEquatable<TWrapper>
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: Microsoft.XboxStudios.BotBrain.Samples.EnumBased
Assembly: BotBrain.Samples.dll
Syntax
public class EnumWrapper<TEnum, TWrapper> : IEquatable<TWrapper> where TEnum : Enum where TWrapper : EnumWrapper<TEnum, TWrapper>
Type Parameters
Name Description
TEnum

The enum type.

TWrapper

The wrapper type.

Remarks

Initializes a new instance of the EnumWrapper<TEnum, TWrapper> class.

Constructors

View Source

EnumWrapper(TEnum)

Used to implement IEquatable<T> for an enum.

Declaration
public EnumWrapper(TEnum value)
Parameters
Type Name Description
TEnum value

The enum value.

Remarks

Initializes a new instance of the EnumWrapper<TEnum, TWrapper> class.

Properties

View Source

Value

Gets the enum value.

Declaration
public TEnum Value { get; }
Property Value
Type Description
TEnum

Methods

View Source

Equals(TWrapper?)

Indicates whether the current object is equal to another object of the same type.

Declaration
public bool Equals(TWrapper? other)
Parameters
Type Name Description
TWrapper other

An object to compare with this object.

Returns
Type Description
bool

true if the current object is equal to the other parameter; otherwise, false.

View Source

ToString()

Returns a string that represents the current object.

Declaration
public override string ToString()
Returns
Type Description
string

A string that represents the current object.

Overrides
object.ToString()

Implements

IEquatable<T>
  • View Source
In this article
Back to top Generated by DocFX