Class ServerAttribute
Attribute that defines the path to a server.
Implements
Inherited Members
Namespace: TheXDS.MCART.Attributes
Assembly: MCART.dll
Syntax
[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
[Serializable]
public sealed class ServerAttribute : Attribute, IValueAttribute<string>
Remarks
This attribute can be set more than once on the same element.
If a port number is defined in server
, the
value of the port
parameter will take precedence.
Constructors
| Edit this page View SourceServerAttribute(string, int)
Attribute that defines the path to a server.
Declaration
public ServerAttribute(string server, int port)
Parameters
Type | Name | Description |
---|---|---|
string | server | Server name / IP address. |
int | port | Server port number. |
Remarks
This attribute can be set more than once on the same element.
If a port number is defined in server
, the
value of the port
parameter will take precedence.
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown if the server is a malformed path. |
ArgumentOutOfRangeException | Thrown if |
Properties
| Edit this page View SourcePort
Gets or sets the connection port of the server.
Declaration
public int Port { get; }
Property Value
Type | Description |
---|---|
int | A value between 1 and 65535 that sets the port number to point to. |
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown if the server is a malformed path. |
ArgumentOutOfRangeException | Thrown if |
Server
Gets the server.
Declaration
public string Server { get; }
Property Value
Type | Description |
---|---|
string | The path of the server to which this attribute points. |
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown if the server is a malformed path. |
ArgumentOutOfRangeException | Thrown if |
Value
Gets the value of this attribute.
Declaration
public string Value { get; }
Property Value
Type | Description |
---|---|
string |
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown if the server is a malformed path. |
ArgumentOutOfRangeException | Thrown if |
Methods
| Edit this page View SourceToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string that represents the current object. |
Overrides
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown if the server is a malformed path. |
ArgumentOutOfRangeException | Thrown if |