C# Class CodeSharp.EventSourcing.Address

Inheritance: ISerializable
Show file Open project: tangxuehua/eventsourcing Class Usage Examples

Public Methods

Method Description
Address ( string queueName, string machineName ) : System

Instantiate a new Address for a known queue on a given machine.

Equals ( Address other ) : bool

Check this is equal to other Address

Equals ( object obj ) : bool

Determines whether the specified T:System.Object is equal to the current T:System.Object.

GetHashCode ( ) : int

Provides a hash code of the Address.

InitializeAddressMode ( AddressMode mode ) : void

Sets the name of the machine to be used when none is specified in the address.

InitializeLocalAddress ( string address ) : void

Sets the address of this endpoint. Will throw an exception if overwriting a previous value (but value will still be set).

OverrideDefaultMachine ( string machineName ) : void

Sets the address mode, can only be done as long as the local address is not been initialized.By default the default machine equals Environment.MachineName

Parse ( string address ) : Address

Parses a string and returns an Address.

SubScope ( string qualifier ) : Address

Creates a new Address whose Queue is derived from the Queue of the existing Address together with the provided qualifier. For example: queue.qualifier@machine

ToString ( ) : string

Returns a string representation of the address.

operator ( ) : bool

Overloading for the != for the class Address

Protected Methods

Method Description
Address ( SerializationInfo info, StreamingContext context ) : System

Deserializes an Address.

Private Methods

Method Description
ISerializable ( SerializationInfo info, StreamingContext context ) : void

Method Details

Address() protected method

Deserializes an Address.
protected Address ( SerializationInfo info, StreamingContext context ) : System
info System.Runtime.Serialization.SerializationInfo
context System.Runtime.Serialization.StreamingContext
return System

Address() public method

Instantiate a new Address for a known queue on a given machine.
public Address ( string queueName, string machineName ) : System
queueName string
machineName string
return System

Equals() public method

Check this is equal to other Address
public Equals ( Address other ) : bool
other Address refrence addressed to be checked with this
return bool

Equals() public method

Determines whether the specified T:System.Object is equal to the current T:System.Object.
public Equals ( object obj ) : bool
obj object The to compare with the current .
return bool

GetHashCode() public method

Provides a hash code of the Address.
public GetHashCode ( ) : int
return int

InitializeAddressMode() public static method

Sets the name of the machine to be used when none is specified in the address.
public static InitializeAddressMode ( AddressMode mode ) : void
mode AddressMode
return void

InitializeLocalAddress() public static method

Sets the address of this endpoint. Will throw an exception if overwriting a previous value (but value will still be set).
public static InitializeLocalAddress ( string address ) : void
address string
return void

OverrideDefaultMachine() public static method

Sets the address mode, can only be done as long as the local address is not been initialized.By default the default machine equals Environment.MachineName
public static OverrideDefaultMachine ( string machineName ) : void
machineName string
return void

Parse() public static method

Parses a string and returns an Address.
public static Parse ( string address ) : Address
address string
return Address

SubScope() public method

Creates a new Address whose Queue is derived from the Queue of the existing Address together with the provided qualifier. For example: queue.qualifier@machine
public SubScope ( string qualifier ) : Address
qualifier string
return Address

ToString() public method

Returns a string representation of the address.
public ToString ( ) : string
return string

operator() public static method

Overloading for the != for the class Address
public static operator ( ) : bool
return bool