C# Class Hypermedia.Sample.XmlNodeExtensions

Mostra file Open project: cosullivan/Hypermedia

Public Methods

Method Description
GetDateTimeOffset ( this node, string name, DateTimeOffset defaultValue = default(DateTimeOffset) ) : DateTimeOffset

Gets an integer value from the given node's attribute.

GetInt32 ( this node, string name, int defaultValue ) : int

Gets an integer value from the given node's attribute.

GetString ( this node, string name, string defaultValue = null ) : string

Gets a string value from the given node's attribute.

Method Details

GetDateTimeOffset() public static method

Gets an integer value from the given node's attribute.
public static GetDateTimeOffset ( this node, string name, DateTimeOffset defaultValue = default(DateTimeOffset) ) : DateTimeOffset
node this The node to return the value from.
name string The name of the attribute to return the value for.
defaultValue DateTimeOffset The default value to return in the case that the attribute doesnt exist.
return DateTimeOffset

GetInt32() public static method

Gets an integer value from the given node's attribute.
public static GetInt32 ( this node, string name, int defaultValue ) : int
node this The node to return the value from.
name string The name of the attribute to return the value for.
defaultValue int The default value to return in the case that the attribute doesnt exist.
return int

GetString() public static method

Gets a string value from the given node's attribute.
public static GetString ( this node, string name, string defaultValue = null ) : string
node this The node to return the value from.
name string The name of the attribute to return the value for.
defaultValue string The default value to return in the case that the attribute doesnt exist.
return string