C# Class ServerNetworkConnections.ClientID

Class representing an ID for a client connection. A connection is identified in one of two ways: Either by a given EndPoint or by a given username. The application has been implemented in such a way that if the username is not null, the given client is authenticated to the server.
Inheritance: IXmlable, INotifyPropertyChanged
显示文件 Open project: bakacaptain/istalkapp Class Usage Examples

Public Methods

Method Description
ClientID ( ) : System
ClientID ( String username ) : System

Constructor for ClientID.

Equals ( object obj ) : bool

Equals method that returns true if the usernames are the same. If they are not the same the EndPoints will be compared instead, if those are the same, true will be returned. If none of this is the case, false is returned.

GetHashCode ( ) : int
ToXML ( ) : string

Method Details

ClientID() public method

public ClientID ( ) : System
return System

ClientID() public method

Constructor for ClientID.
public ClientID ( String username ) : System
username String A String with the username that identifies the Client.
return System

Equals() public method

Equals method that returns true if the usernames are the same. If they are not the same the EndPoints will be compared instead, if those are the same, true will be returned. If none of this is the case, false is returned.
public Equals ( object obj ) : bool
obj object
return bool

GetHashCode() public method

public GetHashCode ( ) : int
return int

ToXML() public method

public ToXML ( ) : string
return string