Table of Contents

Struct UnturnedAssetReference

Namespace
Uncreated.Warfare.Models.Assets
Assembly
Uncreated.Warfare.dll
public readonly struct UnturnedAssetReference
Inherited Members

Constructors

UnturnedAssetReference()

public UnturnedAssetReference()

UnturnedAssetReference(Asset?)

public UnturnedAssetReference(Asset? asset)

Parameters

asset Asset

UnturnedAssetReference(Guid)

public UnturnedAssetReference(Guid guid)

Parameters

guid Guid

UnturnedAssetReference(string)

public UnturnedAssetReference(string guid)

Parameters

guid string

UnturnedAssetReference(ushort)

public UnturnedAssetReference(ushort id)

Parameters

id ushort

UnturnedAssetReference(IAssetContainer?)

public UnturnedAssetReference(IAssetContainer? assetContainer)

Parameters

assetContainer IAssetContainer

Properties

Guid

public Guid Guid { get; }

Property Value

Guid

Id

public ushort Id { get; }

Property Value

ushort

Methods

Equals(Asset)

public bool Equals(Asset asset)

Parameters

asset Asset

Returns

bool

Equals(Guid)

public bool Equals(Guid guid)

Parameters

guid Guid

Returns

bool

Equals(object?)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

Equals(ushort)

public bool Equals(ushort id)

Parameters

id ushort

Returns

bool

Equals(UnturnedAssetReference)

public bool Equals(UnturnedAssetReference other)

Parameters

other UnturnedAssetReference

Returns

bool
public static UnturnedAssetReference FromAssetLink<TAsset>(IAssetLink<TAsset>? assetReference) where TAsset : Asset

Parameters

assetReference IAssetLink<TAsset>

Returns

UnturnedAssetReference

Type Parameters

TAsset
public IAssetLink<TAsset> GetAssetLink<TAsset>() where TAsset : Asset

Returns

IAssetLink<TAsset>

Type Parameters

TAsset

GetAsset<TAsset>()

public TAsset? GetAsset<TAsset>() where TAsset : Asset

Returns

TAsset

Type Parameters

TAsset

GetFriendlyName()

public string? GetFriendlyName()

Returns

string

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

Parse(ReadOnlySpan<char>)

public static UnturnedAssetReference Parse(ReadOnlySpan<char> text)

Parameters

text ReadOnlySpan<char>

Returns

UnturnedAssetReference

Parse(string)

public static UnturnedAssetReference Parse(string text)

Parameters

text string

Returns

UnturnedAssetReference

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.

TryGetAsset<TAsset>(out TAsset)

public bool TryGetAsset<TAsset>(out TAsset asset) where TAsset : Asset

Parameters

asset TAsset

Returns

bool

Type Parameters

TAsset

TryParse(ReadOnlySpan<char>, out UnturnedAssetReference)

public static bool TryParse(ReadOnlySpan<char> text, out UnturnedAssetReference result)

Parameters

text ReadOnlySpan<char>
result UnturnedAssetReference

Returns

bool

TryParse(string, out UnturnedAssetReference)

public static bool TryParse(string text, out UnturnedAssetReference result)

Parameters

text string
result UnturnedAssetReference

Returns

bool

Operators

operator ==(UnturnedAssetReference, UnturnedAssetReference)

public static bool operator ==(UnturnedAssetReference left, UnturnedAssetReference right)

Parameters

left UnturnedAssetReference
right UnturnedAssetReference

Returns

bool

operator !=(UnturnedAssetReference, UnturnedAssetReference)

public static bool operator !=(UnturnedAssetReference left, UnturnedAssetReference right)

Parameters

left UnturnedAssetReference
right UnturnedAssetReference

Returns

bool