Struct ResourceId
- Namespace
- MoonBark.GridPlacement.Core.Types
- Assembly
- MoonBark.GridPlacement.Core.dll
Strongly-typed identifier for resources. Prevents string typos and provides compile-time type safety.
public readonly record struct ResourceId : IEquatable<ResourceId>
- Implements
- Inherited Members
Constructors
ResourceId(string)
Strongly-typed identifier for resources. Prevents string typos and provides compile-time type safety.
public ResourceId(string Value)
Parameters
Valuestring
Properties
Value
Gets the string value of the resource ID.
public string Value { get; }
Property Value
Methods
FromString(string)
Creates a ResourceId from a string.
public static ResourceId FromString(string value)
Parameters
valuestring
Returns
ToString()
Returns the string representation of the resource ID.
public override string ToString()
Returns
Operators
implicit operator string(ResourceId)
Implicit conversion from ResourceId to string.
public static implicit operator string(ResourceId id)
Parameters
idResourceId
Returns
implicit operator ResourceId(string)
Implicit conversion from string to ResourceId.
public static implicit operator ResourceId(string value)
Parameters
valuestring