Table of Contents

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

urn Urn

The 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

prefix string

The prefix of the Urn

type string

The type of the resource associated with the Urn

id long

The 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

long

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

string

TypeGroup

Gets a ResourceTypeGroup enum member describing the group of the resource

public ResourceTypeGroup TypeGroup { get; }

Property Value

ResourceTypeGroup
See Also

Methods

Equals(object)

Determines whether the specified object is equal to this instance.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to this instance; otherwise, false.

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

true if represents simple team; otherwise, false.

IsSimpleTeam(string)

Determines whether Urn represents a simple team

public static bool IsSimpleTeam(string urn)

Parameters

urn string

The string urn to be checked

Returns

bool

true if represents simple team; otherwise, false.

Parse(string)

Constructs a Urn instance by parsing the provided string

public static Urn Parse(string urnString)

Parameters

urnString string

The string representation of the Urn

Returns

Urn

A Urn constructed by parsing the provided string representation

Exceptions

FormatException

The format of the provided representation is not correct

Parse(string, bool)

Constructs a Urn instance by parsing the provided string

public static Urn Parse(string urnString, bool isCustomType)

Parameters

urnString string

The string representation of the Urn

isCustomType bool

Indicates if the urn type is for custom use

Returns

Urn

A Urn constructed by parsing the provided string representation

Exceptions

FormatException

The format of the provided representation is not correct

ToString()

Returns a string that represents this instance.

public override string ToString()

Returns

string

A string that represents this instance.

TryParse(string, out Urn)

Tries to construct a Urn instance by parsing the provided string

public static bool TryParse(string urnString, out Urn urn)

Parameters

urnString string

The string representation of the Urn

urn Urn

When the method returns it contains the Urn constructed by parsing the provided string if the parsing was successful, otherwise null

Returns

bool

true if XXXX, false otherwise.

TryParse(string, bool, out Urn)

Tries to construct a Urn instance by parsing the provided string

public static bool TryParse(string urnString, bool isCustomType, out Urn urn)

Parameters

urnString string

The string representation of the Urn

isCustomType bool

Indicates if the urn type is for custom use

urn Urn

When the method returns it contains the Urn constructed by parsing the provided string if the parsing was successful, otherwise null

Returns

bool

true if XXXX, false otherwise.