Show / Hide Table of Contents

Class ServerAttribute

Attribute that defines the path to a server.

Inheritance
object
Attribute
ServerAttribute
Implements
IValueAttribute<string>
Inherited Members
Attribute.Equals(object)
Attribute.GetCustomAttribute(Assembly, Type)
Attribute.GetCustomAttribute(Assembly, Type, bool)
Attribute.GetCustomAttribute(MemberInfo, Type)
Attribute.GetCustomAttribute(MemberInfo, Type, bool)
Attribute.GetCustomAttribute(Module, Type)
Attribute.GetCustomAttribute(Module, Type, bool)
Attribute.GetCustomAttribute(ParameterInfo, Type)
Attribute.GetCustomAttribute(ParameterInfo, Type, bool)
Attribute.GetCustomAttributes(Assembly)
Attribute.GetCustomAttributes(Assembly, bool)
Attribute.GetCustomAttributes(Assembly, Type)
Attribute.GetCustomAttributes(Assembly, Type, bool)
Attribute.GetCustomAttributes(MemberInfo)
Attribute.GetCustomAttributes(MemberInfo, bool)
Attribute.GetCustomAttributes(MemberInfo, Type)
Attribute.GetCustomAttributes(MemberInfo, Type, bool)
Attribute.GetCustomAttributes(Module)
Attribute.GetCustomAttributes(Module, bool)
Attribute.GetCustomAttributes(Module, Type)
Attribute.GetCustomAttributes(Module, Type, bool)
Attribute.GetCustomAttributes(ParameterInfo)
Attribute.GetCustomAttributes(ParameterInfo, bool)
Attribute.GetCustomAttributes(ParameterInfo, Type)
Attribute.GetCustomAttributes(ParameterInfo, Type, bool)
Attribute.GetHashCode()
Attribute.IsDefaultAttribute()
Attribute.IsDefined(Assembly, Type)
Attribute.IsDefined(Assembly, Type, bool)
Attribute.IsDefined(MemberInfo, Type)
Attribute.IsDefined(MemberInfo, Type, bool)
Attribute.IsDefined(Module, Type)
Attribute.IsDefined(Module, Type, bool)
Attribute.IsDefined(ParameterInfo, Type)
Attribute.IsDefined(ParameterInfo, Type, bool)
Attribute.Match(object)
Attribute.TypeId
object.Equals(object, object)
object.GetType()
object.ReferenceEquals(object, object)
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 Source

ServerAttribute(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 port is less than 1 or greater than 65535.

Properties

| Edit this page View Source

Port

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 port is less than 1 or greater than 65535.

| Edit this page View Source

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 port is less than 1 or greater than 65535.

| Edit this page View Source

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 port is less than 1 or greater than 65535.

Methods

| Edit this page View Source

ToString()

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
object.ToString()
Exceptions
Type Condition
ArgumentException

Thrown if the server is a malformed path.

ArgumentOutOfRangeException

Thrown if port is less than 1 or greater than 65535.

Implements

IValueAttribute<T>

Extension Methods

Objects.ShallowCopyTo(object, object, Type)
ObjectExtensions.FieldsOf<T>(object)
ObjectExtensions.GetAttribute<T>(object)
ObjectExtensions.GetAttributes<T>(object)
ObjectExtensions.HasAttrValue<TAttribute, TValue>(object, out TValue)
ObjectExtensions.HasAttribute<T>(object)
ObjectExtensions.HasAttribute<T>(object, out T?)
ObjectExtensions.HasAttributes<T>(object, out IEnumerable<T>?)
ObjectExtensions.Is(object?, object?)
ObjectExtensions.IsEither(object, IEnumerable)
ObjectExtensions.IsEither(object, params object[])
ObjectExtensions.IsNeither(object, IEnumerable)
ObjectExtensions.IsNeither(object, params object[])
ObjectExtensions.IsNot(object?, object?)
ObjectExtensions.PropertiesOf<T>(object)
ObjectExtensions.WhichAre(object, IEnumerable<object>)
ObjectExtensions.WhichAre(object, params object[])
Common.IfNotNull<T>(T?, Action<T>)
Objects.Itself<T>(T)
Objects.ShallowCopyTo<T>(T, T)
CollectionExtensions.PushInto<TItem, TCollection>(TItem, ICollection<TCollection>)
DictionaryExtensions.PushInto<TKey, TValue>(TValue, TKey, IDictionary<TKey, TValue>)
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX