Struct Node
Represents a network node. It is a binding, logical address of a host and a service that host provides
Nodes are not contract-dependent. The componets of address are not case-sensitive.
The form of the address is:
binding://host:service
. The "host" and "service" segment syntaxes depend on binding and may not contain the ':' char.
An example of some 'mytest' binding: 'mytest://adr=1.1.1.1,nic=eth001:job,chat,backup'
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: Azos.dll
Syntax
[Serializable]
public struct Node : INamed
Constructors
Node(String)
Inits a node struct. It is a binding, logical address of a host and a service that host provides
Nodes are not contract-dependent. The componets of address are not case-sensitive.
The form of the address is:
binding://host:service
. The "host" and "service" segment syntaxes depend on binding and may not contain the ':' char.
An example of some 'mytest' binding: 'mytest://adr=1.1.1.1,nic=eth001:job,chat,backup'
Declaration
public Node(string connectString)
Parameters
Type |
Name |
Description |
System.String |
connectString |
|
Fields
BINDING_SEPARATOR
Declaration
public const string BINDING_SEPARATOR = "://"
Field Value
Type |
Description |
System.String |
|
SERVICE_SEPARATOR
Declaration
public const string SERVICE_SEPARATOR = ":"
Field Value
Type |
Description |
System.String |
|
Properties
Assigned
Returns true when struct has some data assigned i.e. connect string is specified
Declaration
public bool Assigned { get; }
Property Value
Type |
Description |
System.Boolean |
|
Binding
Gets binding portion of ConnectString. This value selects binding adapter
Declaration
public string Binding { get; }
Property Value
Type |
Description |
System.String |
|
ConnectString
Gets a connection string - a structured URL-like connection descriptor that identifies a host
along with binding and service. The componets of address are not case-sensitive.
The form of the address is:
binding://host:service
. The "host" and "service" segment syntaxes depend on binding and may not contain the ':' char.
An example of some 'mytest' binding: 'mytest://adr=1.1.1.1,nic=eth001:job,chat,backup'
Declaration
public string ConnectString { get; }
Property Value
Type |
Description |
System.String |
|
Host
Gets host portion of ConnectString. This value may have a structure of its own which is understood by binding adapter
Declaration
public string Host { get; }
Property Value
Type |
Description |
System.String |
|
Name
INamed shortcut to ConnectString
Declaration
public string Name { get; }
Property Value
Type |
Description |
System.String |
|
Service
Gets service/port portion of ConnectString. This value may have a structure of its own which is understood by binding adapter
Declaration
public string Service { get; }
Property Value
Type |
Description |
System.String |
|
Methods
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
System.Object |
obj |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
System.ValueType.Equals(System.Object)
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Overrides
System.ValueType.GetHashCode()
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
System.ValueType.ToString()
Implements
Extension Methods