Struct UserDataSlot<TValue>
Uniquely identifies user data which can be associated with any object.
Implements
Inherited Members
Namespace: DotNext
Assembly: DotNext.dll
Syntax
public struct UserDataSlot<TValue> : IEquatable<UserDataSlot<TValue>>
Type Parameters
| Name | Description |
|---|---|
| TValue | The type of the value stored in user data slot. |
Methods
| Improve this Doc View SourceAllocate()
Allocates a new data slot.
Declaration
public static UserDataSlot<TValue> Allocate()
Returns
| Type | Description |
|---|---|
| UserDataSlot<TValue> | Allocated data slot. |
Equals(UserDataSlot<TValue>)
Checks whether the two data slots are the same.
Declaration
public bool Equals(UserDataSlot<TValue> other)
Parameters
| Type | Name | Description |
|---|---|---|
| UserDataSlot<TValue> | other | Other data slot to check. |
Returns
| Type | Description |
|---|---|
| Boolean | true if both data slots identifies the same data key. |
Equals(Object)
Checks whether the two data slots are the same.
Declaration
public override bool Equals(object other)
Parameters
| Type | Name | Description |
|---|---|---|
| Object | other | Other data slot to check. |
Returns
| Type | Description |
|---|---|
| Boolean | true if both data slots identifies the same data key. |
Overrides
| Improve this Doc View SourceGetHashCode()
Computes hash code for this data slot.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| Int32 | Hash code. |
Overrides
| Improve this Doc View SourceToString()
Gets textual representation of this data slot useful for debugging.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| String | Textual representation of this data slot. |
Overrides
Operators
| Improve this Doc View SourceEquality(UserDataSlot<TValue>, UserDataSlot<TValue>)
Checks whether the two data slots are the same.
Declaration
public static bool operator ==(UserDataSlot<TValue> first, UserDataSlot<TValue> second)
Parameters
| Type | Name | Description |
|---|---|---|
| UserDataSlot<TValue> | first | The first data slot to check. |
| UserDataSlot<TValue> | second | The second data slot to check. |
Returns
| Type | Description |
|---|---|
| Boolean | true if both data slots identifies the same data key. |
Inequality(UserDataSlot<TValue>, UserDataSlot<TValue>)
Checks whether the two data slots are not the same.
Declaration
public static bool operator !=(UserDataSlot<TValue> first, UserDataSlot<TValue> second)
Parameters
| Type | Name | Description |
|---|---|---|
| UserDataSlot<TValue> | first | The first data slot to check. |
| UserDataSlot<TValue> | second | The second data slot to check. |
Returns
| Type | Description |
|---|---|
| Boolean | false if both data slots identifies the same data key. |