Skip to content

Class Tags

Definition

Namespace: StardewUI
Assembly: StardewUI.dll

Typesafe heterogeneous container for associating arbitrary data with a view or other UI object.

public class Tags

Inheritance
Object ⇦ Tags

Members

Constructors

Name Description
Tags()

Fields

Name Description
Empty Empty tags that can be used as a placeholder.

Methods

Name Description
Create<T>(T) Creates a new Tags holding a single initial value.
Create<T1, T2>(T1, T2) Creates a new Tags holding two initial values.
Create<T1, T2, T3>(T1, T2, T3) Creates a new Tags holding three initial values.
Equals(Object) (Overrides Object.Equals(Object))
Get<T>() Gets the tag value of the specified type, if one exists.
GetHashCode() (Overrides Object.GetHashCode())
Set<T>(T) Replaces the tag value of the specified type.

Details

Constructors

Tags()

public Tags();

Fields

Empty

Empty tags that can be used as a placeholder.

public static readonly StardewUI.Tags Empty;
Field Value

Tags


Methods

Create<T>(T)

Creates a new Tags holding a single initial value.

public static StardewUI.Tags Create<T>(T value);
Parameters

value   T
The tag value.

Returns

Tags


Create<T1, T2>(T1, T2)

Creates a new Tags holding two initial values.

public static StardewUI.Tags Create<T1, T2>(T1 value1, T2 value2);
Parameters

value1   T1
The first value.

value2   T2
The second value.

Returns

Tags


Create<T1, T2, T3>(T1, T2, T3)

Creates a new Tags holding three initial values.

public static StardewUI.Tags Create<T1, T2, T3>(T1 value1, T2 value2, T3 value3);
Parameters

value1   T1
The first value.

value2   T2
The second value.

value3   T3
The third value.

Returns

Tags


Equals(Object)

public override bool Equals(System.Object obj);
Parameters

obj   Object

Returns

Boolean


Get<T>()

Gets the tag value of the specified type, if one exists.

public T Get<T>();
Returns

T

The stored value of type T, if any; otherwise null.


GetHashCode()

public override int GetHashCode();
Returns

Int32


Set<T>(T)

Replaces the tag value of the specified type.

public void Set<T>(T value);
Parameters

value   T
The new tag value.