Struct AssetKey
Immutable value object representing a unique identifier for an asset.
Provides type safety and equality semantics for asset identification.
Implements
Inherited Members
Namespace: Serenity.AssetPrefetcher.Domain.ValueObjects
Assembly: Serenity.AssetPrefetcher.Domain.dll
Syntax
public readonly struct AssetKey : IEquatable<AssetKey>
Constructors
AssetKey(string)
Initializes a new asset key with the specified value.
Declaration
public AssetKey(string value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | value | The string value for the asset key |
Properties
Value
Declaration
public string Value { get; }
Property Value
| Type | Description |
|---|---|
| string | The string value representing the asset key. |
Methods
Equals(AssetKey)
Determines if this asset key is equal to another asset key.
Declaration
public bool Equals(AssetKey other)
Parameters
| Type | Name | Description |
|---|---|---|
| AssetKey | other | The other asset key to compare |
Returns
| Type | Description |
|---|---|
| bool | True if the keys are equal, false otherwise |
Equals(object)
Determines if this asset key is equal to another object.
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj | The object to compare |
Returns
| Type | Description |
|---|---|
| bool | True if the object is an equal asset key, false otherwise |
Overrides
GetHashCode()
Gets the hash code for this asset key.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int | Hash code based on the string value |
Overrides
ToString()
Returns the string representation of the asset key.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | The asset key value or empty string if null |
Overrides
Operators
operator ==(AssetKey, AssetKey)
Equality operator for asset keys.
Declaration
public static bool operator ==(AssetKey a, AssetKey b)
Parameters
| Type | Name | Description |
|---|---|---|
| AssetKey | a | |
| AssetKey | b |
Returns
| Type | Description |
|---|---|
| bool |
operator !=(AssetKey, AssetKey)
Inequality operator for asset keys.
Declaration
public static bool operator !=(AssetKey a, AssetKey b)
Parameters
| Type | Name | Description |
|---|---|---|
| AssetKey | a | |
| AssetKey | b |
Returns
| Type | Description |
|---|---|
| bool |