Class XmlRpcScalarValue
Represents a scalar remote procedure parameter value.
Inheritance
Inherited Members
Namespace: Argotic.Net
Assembly: Argotic.Core.dll
Syntax
[Serializable]
public class XmlRpcScalarValue : IXmlRpcValue, IComparable
Constructors
| Improve this Doc View SourceXmlRpcScalarValue()
Initializes a new instance of the XmlRpcScalarValue class.
Declaration
public XmlRpcScalarValue()
XmlRpcScalarValue(Boolean)
Initializes a new instance of the XmlRpcScalarValue class using the specified boolean value.
Declaration
public XmlRpcScalarValue(bool value)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | value | A boolean value. |
Remarks
This constructor sets the ValueType property to be Boolean,
and sets the Value property using the supplied value
.
XmlRpcScalarValue(Byte[])
Initializes a new instance of the XmlRpcScalarValue class using the specified array of bytes.
Declaration
public XmlRpcScalarValue(byte[] value)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | value | An array of 8-bit unsigned integers. |
Remarks
This constructor sets the ValueType property to be Base64,
and sets the Value property using the supplied value
.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
XmlRpcScalarValue(DateTime)
Initializes a new instance of the XmlRpcScalarValue class using the specified instance in time.
Declaration
public XmlRpcScalarValue(DateTime value)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | value | A System.DateTime, provided in Coordinated Universal Time (UTC). |
Remarks
This constructor sets the ValueType property to be DateTime,
and sets the Value property using the supplied value
.
XmlRpcScalarValue(Double)
Initializes a new instance of the XmlRpcScalarValue class using the specified double-precision signed floating-point number.
Declaration
public XmlRpcScalarValue(double value)
Parameters
Type | Name | Description |
---|---|---|
System.Double | value | A double-precision signed floating-point number. |
Remarks
This constructor sets the ValueType property to be Double,
and sets the Value property using the supplied value
.
XmlRpcScalarValue(Int32)
Initializes a new instance of the XmlRpcScalarValue class using the specified 32-bit signed integer.
Declaration
public XmlRpcScalarValue(int value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | value | A 32-bit signed integer. |
Remarks
This constructor sets the ValueType property to be Integer,
and sets the Value property using the supplied value
.
XmlRpcScalarValue(String)
Initializes a new instance of the XmlRpcScalarValue class using the specified series of characters.
Declaration
public XmlRpcScalarValue(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | A series of characters. |
Remarks
This constructor sets the ValueType property to be String,
and sets the Value property using the supplied value
.
Properties
| Improve this Doc View SourceValue
Gets or sets the value of this parameter.
Declaration
public object Value { get; set; }
Property Value
Type | Description |
---|---|
System.Object | A System.Object that represents the value of this parameter. |
Remarks
The value
should represent a System.Type that is appropriate for this parameter's ValueType.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
ValueType
Gets or sets the type of scalar value this parameter represents.
Declaration
public XmlRpcScalarValueType ValueType { get; set; }
Property Value
Type | Description |
---|---|
XmlRpcScalarValueType | A XmlRpcScalarValueType enumeration value that indicates the type of scalar value this parameter represents. The default value is None, which indicates that no type was specified. |
Remarks
If no type is indicated, the type is assumed to be String.
See Also
Methods
| Improve this Doc View SourceCompareTo(Object)
Compares the current instance with another object of the same type.
Declaration
public int CompareTo(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | An object to compare with this instance. |
Returns
Type | Description |
---|---|
System.Int32 | A 32-bit signed integer that indicates the relative order of the objects being compared. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | The |
Equals(Object)
Determines whether the specified System.Object is equal to the current instance.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The System.Object to compare with the current instance. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified System.Object is equal to the current instance; otherwise, false. |
Overrides
GetHashCode()
Returns a hash code for the current instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A 32-bit signed integer hash code. |
Overrides
Load(XPathNavigator)
Loads this XmlRpcScalarValue using the supplied System.Xml.XPath.XPathNavigator.
Declaration
public bool Load(XPathNavigator source)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XPath.XPathNavigator | source | The System.Xml.XPath.XPathNavigator to extract information from. |
Returns
Type | Description |
---|---|
System.Boolean | true if the XmlRpcScalarValue was initialized using the supplied |
Remarks
This method expects the supplied source
to be positioned on the XML element that represents a XmlRpcScalarValue.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
ToString()
Returns a System.String that represents the current XmlRpcScalarValue.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A System.String that represents the current XmlRpcScalarValue. |
Overrides
Remarks
This method returns the XML representation for the current instance.
WriteTo(XmlWriter)
Saves the current XmlRpcScalarValue to the specified System.Xml.XmlWriter.
Declaration
public void WriteTo(XmlWriter writer)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlWriter | writer | The System.Xml.XmlWriter to which you want to save. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
Operators
| Improve this Doc View SourceEquality(XmlRpcScalarValue, XmlRpcScalarValue)
Determines if operands are equal.
Declaration
public static bool operator ==(XmlRpcScalarValue first, XmlRpcScalarValue second)
Parameters
Type | Name | Description |
---|---|---|
XmlRpcScalarValue | first | Operand to be compared. |
XmlRpcScalarValue | second | Operand to compare to. |
Returns
Type | Description |
---|---|
System.Boolean | true if the values of its operands are equal, otherwise; false. |
GreaterThan(XmlRpcScalarValue, XmlRpcScalarValue)
Determines if first operand is greater than second operand.
Declaration
public static bool operator>(XmlRpcScalarValue first, XmlRpcScalarValue second)
Parameters
Type | Name | Description |
---|---|---|
XmlRpcScalarValue | first | Operand to be compared. |
XmlRpcScalarValue | second | Operand to compare to. |
Returns
Type | Description |
---|---|
System.Boolean | true if the first operand is greater than the second, otherwise; false. |
Inequality(XmlRpcScalarValue, XmlRpcScalarValue)
Determines if operands are not equal.
Declaration
public static bool operator !=(XmlRpcScalarValue first, XmlRpcScalarValue second)
Parameters
Type | Name | Description |
---|---|---|
XmlRpcScalarValue | first | Operand to be compared. |
XmlRpcScalarValue | second | Operand to compare to. |
Returns
Type | Description |
---|---|
System.Boolean | false if its operands are equal, otherwise; true. |
LessThan(XmlRpcScalarValue, XmlRpcScalarValue)
Determines if first operand is less than second operand.
Declaration
public static bool operator <(XmlRpcScalarValue first, XmlRpcScalarValue second)
Parameters
Type | Name | Description |
---|---|---|
XmlRpcScalarValue | first | Operand to be compared. |
XmlRpcScalarValue | second | Operand to compare to. |
Returns
Type | Description |
---|---|
System.Boolean | true if the first operand is less than the second, otherwise; false. |