C# Класс gdapi.Resource

Represents a Resource from the API. This class is usually automatically populated by ResourceConverter from the returned JSON string.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
getLink ( string name ) : string

Gets the current link if it exists.

getProperties ( ) : string>.Dictionary

Gets the properties of the Resource.

getProperty ( string propertyName ) : string

Gets the current property value

getType ( ) : String

Gets the type of the Resource

hasLink ( string name ) : bool

Determins if a Resource currently has a link.

hasProperty ( string propertyName ) : bool
setProperties ( string>.Dictionary properties ) : void

Sets the properties of the Resource.

setProperty ( string key, string value ) : void

Sets the property of a resource

setType ( string type ) : void

Sets the type of the Resource

Описание методов

getLink() публичный Метод

Gets the current link if it exists.
public getLink ( string name ) : string
name string Link to fetch
Результат string

getProperties() публичный Метод

Gets the properties of the Resource.
public getProperties ( ) : string>.Dictionary
Результат string>.Dictionary

getProperty() публичный Метод

Gets the current property value
public getProperty ( string propertyName ) : string
propertyName string Name of property to get
Результат string

getType() публичный Метод

Gets the type of the Resource
public getType ( ) : String
Результат String

hasLink() публичный Метод

Determins if a Resource currently has a link.
public hasLink ( string name ) : bool
name string Link to check
Результат bool

hasProperty() публичный Метод

public hasProperty ( string propertyName ) : bool
propertyName string
Результат bool

setProperties() публичный Метод

Sets the properties of the Resource.
public setProperties ( string>.Dictionary properties ) : void
properties string>.Dictionary Properties dictionary to update the internal properties of the resource with.
Результат void

setProperty() публичный Метод

Sets the property of a resource
public setProperty ( string key, string value ) : void
key string Property name to set
value string Property value to set
Результат void

setType() публичный Метод

Sets the type of the Resource
public setType ( string type ) : void
type string Resource type
Результат void