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
Exceptions
- ArgumentNullException
If
url
isnull
or empty.
UrlReferenceBase(string)
Create a new UrlReferenceBase instance.
protected UrlReferenceBase(string url)
Parameters
url
string
Exceptions
- ArgumentNullException
If
url
isnull
or empty.
Properties
Id
Gets the Id of the referenced asset.
[DataMember(20)]
public AssetId Id { get; init; }
Property Value
IsEmpty
Gets whether the url is null
or empty.
public bool IsEmpty { get; }
Property Value
Url
Gets the Url of the referenced asset.
[DataMember(10)]
public string Url { get; init; }
Property Value
Methods
IsUrlReferenceType(Type)
public static bool IsUrlReferenceType(Type type)
Parameters
type
Type
Returns
New(Type, AssetId, string)
public static UrlReferenceBase New(Type urlReferenceType, AssetId id, string url)
Parameters
Returns
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)