Class Urn
- Namespace
- Sportradar.OddsFeed.SDK.Common
- Assembly
- Sportradar.OddsFeed.SDK.dll
Represents a Uniform Resource Name
public class Urn
- Inheritance
-
Urn
- Inherited Members
Constructors
Urn(Urn)
Initializes a new instance of the Urn class.
public Urn(Urn urn)
Parameters
urnUrnThe urn to be used as a template
Urn(string, string, long)
Initializes a new instance of the Urn class.
public Urn(string prefix, string type, long id)
Parameters
prefixstringThe prefix of the Urn
typestringThe type of the resource associated with the Urn
idlongThe numerical identifier of the resource associated with the Urn
Properties
Id
Gets the numerical part of the identifier associated with the current instance
public long Id { get; }
Property Value
Prefix
Gets the prefix of the current instance.
public string Prefix { get; }
Property Value
- string
The prefix.
Type
Gets a string specifying the type of the resource associated with the current instance
public string Type { get; }
Property Value
TypeGroup
Gets a ResourceTypeGroup enum member describing the group of the resource
public ResourceTypeGroup TypeGroup { get; }
Property Value
- See Also
Methods
Equals(object)
Determines whether the specified object is equal to this instance.
public override bool Equals(object obj)
Parameters
objobjectThe object to compare with the current object.
Returns
GetHashCode()
Returns a hash code for this instance.
public override int GetHashCode()
Returns
- int
A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
IsSimpleTeam()
Determines whether Urn represents a simple team
public bool IsSimpleTeam()
Returns
- bool
trueif represents simple team; otherwise,false.
IsSimpleTeam(string)
Determines whether Urn represents a simple team
public static bool IsSimpleTeam(string urn)
Parameters
urnstringThe string urn to be checked
Returns
- bool
trueif represents simple team; otherwise,false.
Parse(string)
public static Urn Parse(string urnString)
Parameters
Returns
Exceptions
- FormatException
The format of the provided representation is not correct
Parse(string, bool)
public static Urn Parse(string urnString, bool isCustomType)
Parameters
urnStringstringThe string representation of the Urn
isCustomTypeboolIndicates if the urn type is for custom use
Returns
Exceptions
- FormatException
The format of the provided representation is not correct
ToString()
Returns a string that represents this instance.
public override string ToString()
Returns
TryParse(string, out Urn)
public static bool TryParse(string urnString, out Urn urn)
Parameters
urnStringstringThe string representation of the Urn
urnUrnWhen the method returns it contains the Urn constructed by parsing the provided string if the parsing was successful, otherwise null
Returns
- bool
trueif XXXX,falseotherwise.
TryParse(string, bool, out Urn)
public static bool TryParse(string urnString, bool isCustomType, out Urn urn)
Parameters
urnStringstringThe string representation of the Urn
isCustomTypeboolIndicates if the urn type is for custom use
urnUrnWhen the method returns it contains the Urn constructed by parsing the provided string if the parsing was successful, otherwise null
Returns
- bool
trueif XXXX,falseotherwise.