C# Class gdapi.Resource

Represents a Resource from the API. This class is usually automatically populated by ResourceConverter from the returned JSON string.
Mostrar archivo Open project: godaddy/gdapi-csharp Class Usage Examples

Public Methods

Method Description
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

Method Details

getLink() public method

Gets the current link if it exists.
public getLink ( string name ) : string
name string Link to fetch
return string

getProperties() public method

Gets the properties of the Resource.
public getProperties ( ) : string>.Dictionary
return string>.Dictionary

getProperty() public method

Gets the current property value
public getProperty ( string propertyName ) : string
propertyName string Name of property to get
return string

getType() public method

Gets the type of the Resource
public getType ( ) : String
return String

hasLink() public method

Determins if a Resource currently has a link.
public hasLink ( string name ) : bool
name string Link to check
return bool

hasProperty() public method

public hasProperty ( string propertyName ) : bool
propertyName string
return bool

setProperties() public method

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.
return void

setProperty() public method

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
return void

setType() public method

Sets the type of the Resource
public setType ( string type ) : void
type string Resource type
return void