Table of Contents

Class UrlReferenceBase

Namespace
Stride.Core.Serialization
Assembly
Stride.Core.Serialization.dll

Base class for IUrlReference implementations

[DataContract("urlref", Inherited = true)]
[DataStyle(DataStyle.Compact)]
public abstract class UrlReferenceBase : IReference, IUrlReference
Inheritance
UrlReferenceBase
Implements
Derived

Constructors

UrlReferenceBase()

Create a new UrlReferenceBase instance.

protected UrlReferenceBase()

UrlReferenceBase(AssetId, string)

Create a new UrlReferenceBase instance.

protected UrlReferenceBase(AssetId id, string url)

Parameters

id AssetId
url string

Exceptions

ArgumentNullException

If url is null or empty.

UrlReferenceBase(string)

Create a new UrlReferenceBase instance.

protected UrlReferenceBase(string url)

Parameters

url string

Exceptions

ArgumentNullException

If url is null or empty.

Properties

Id

Gets the Id of the referenced asset.

[DataMember(20)]
public AssetId Id { get; init; }

Property Value

AssetId

IsEmpty

Gets whether the url is null or empty.

public bool IsEmpty { get; }

Property Value

bool

Url

Gets the Url of the referenced asset.

[DataMember(10)]
public string Url { get; init; }

Property Value

string

Methods

IsUrlReferenceType(Type)

public static bool IsUrlReferenceType(Type type)

Parameters

type Type

Returns

bool

New(Type, AssetId, string)

public static UrlReferenceBase New(Type urlReferenceType, AssetId id, string url)

Parameters

urlReferenceType Type
id AssetId
url string

Returns

UrlReferenceBase

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

TryGetAssetType(Type, out Type)

public static bool TryGetAssetType(Type type, out Type assetType)

Parameters

type Type
assetType Type

Returns

bool