Class Namespace
Represents a namespace for an IDocument, INode or IAttribute.
Inheritance
Implements
Inherited Members
Namespace: ZptSharp.Dom
Assembly: ZptSharp.Abstractions.dll
Syntax
public sealed class Namespace : IEquatable<Namespace>
Constructors
| Improve this Doc View SourceNamespace(String, String)
Initializes a new instance of the Namespace class.
Declaration
public Namespace(string prefix = null, string uri = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | prefix | Prefix. |
System.String | uri | URI. |
Properties
| Improve this Doc View SourcePrefix
Gets the short namespace prefix.
Declaration
public string Prefix { get; }
Property Value
Type | Description |
---|---|
System.String | The prefix. |
Uri
Gets the full URI for this namespace.
Declaration
public string Uri { get; }
Property Value
Type | Description |
---|---|
System.String | The URI. |
Methods
| Improve this Doc View SourceEquals(Object)
Determines whether the specified System.Object is equal to the current Namespace.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The System.Object to compare with the current Namespace. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Overrides
Equals(Namespace)
Declaration
public bool Equals(Namespace other)
Parameters
Type | Name | Description |
---|---|---|
Namespace | other |
Returns
Type | Description |
---|---|
System.Boolean |
|
GetHashCode()
Serves as a hash function for a Namespace object.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a hash table. |
Overrides
ToString()
Returns a System.String that represents the current Namespace.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A System.String that represents the current Namespace. |
Overrides
Operators
| Improve this Doc View SourceEquality(Namespace, Namespace)
Operator overload for testing equality between two Namespace instances.
Declaration
public static bool operator ==(Namespace first, Namespace second)
Parameters
Type | Name | Description |
---|---|---|
Namespace | first | The first instance. |
Namespace | second | The second instance. |
Returns
Type | Description |
---|---|
System.Boolean |
Inequality(Namespace, Namespace)
Operator overload for testing inequality between two Namespace instances.
Declaration
public static bool operator !=(Namespace first, Namespace second)
Parameters
Type | Name | Description |
---|---|---|
Namespace | first | The first instance. |
Namespace | second | The second instance. |
Returns
Type | Description |
---|---|
System.Boolean |