Class ServerState
Holds information about the state of a server
Inheritance
Implements
Namespace: EPiServer.Events.Clients.Internal
Assembly: EPiServer.Events.dll
Version: 12.0.3Syntax
public class ServerState : Object, IEquatable<ServerState>
Constructors
ServerState(String, String)
Initializes a new instance of the Server
Declaration
public ServerState(string serverName, string applicationName)
Parameters
Type | Name | Description |
---|---|---|
System. |
serverName | Name of the server. |
System. |
applicationName | Name of the application. |
ServerState(String, String, DateTime, DateTime, Boolean)
Initializes a new instance of the Server
Declaration
public ServerState(string serverName, string applicationName, DateTime firstContact, DateTime lastContact, bool active)
Parameters
Type | Name | Description |
---|---|---|
System. |
serverName | Name of the server. |
System. |
applicationName | Name of the application. |
System. |
firstContact | The time of the first contact. |
System. |
lastContact | The time of the last contact. |
System. |
active | A value indicating if the server is currently active. |
Fields
ServerAndApplicationNameComparer
Gets an equality comparer instance that only compare the server name of Server
Declaration
public static readonly IEqualityComparer<ServerState> ServerAndApplicationNameComparer
Field Value
Type | Description |
---|---|
System. |
ServerNameComparer
Gets an equality comparer instance that only compare the server name of Server
Declaration
public static readonly IEqualityComparer<ServerState> ServerNameComparer
Field Value
Type | Description |
---|---|
System. |
Properties
Active
Gets a value indicating whether this server is active.
Declaration
public bool Active { get; }
Property Value
Type | Description |
---|---|
System. |
ApplicationName
Gets the name of the IIS application that this state represents.
Declaration
public string ApplicationName { get; }
Property Value
Type | Description |
---|---|
System. |
FirstContact
Gets the time of the first contact between this server and the current one.
Declaration
public DateTime FirstContact { get; }
Property Value
Type | Description |
---|---|
System. |
LastContact
Gets the time of the last contact between this server and the current one.
Declaration
public DateTime LastContact { get; }
Property Value
Type | Description |
---|---|
System. |
ServerName
Gets the name of the server that this state represents.
Declaration
public string ServerName { get; }
Property Value
Type | Description |
---|---|
System. |
Methods
Equals(ServerState)
Indicates whether the current Server
Declaration
public bool Equals(ServerState other)
Parameters
Type | Name | Description |
---|---|---|
Server |
other | A Server |
Returns
Type | Description |
---|---|
System. |
true if the current object is equal to the |
Equals(Object)
Determines whether the specified System.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System. |
obj | The System. |
Returns
Type | Description |
---|---|
System. |
|
GetHashCode()
Returns a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System. |
A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. |
Matches(String, String)
Checks if the current instance matches the specified server and application name.
Declaration
public bool Matches(string serverName, string applicationName)
Parameters
Type | Name | Description |
---|---|---|
System. |
serverName | Name of the server to match against. |
System. |
applicationName | Name of the application to match against. |
Returns
Type | Description |
---|---|
System. |
True if the current instance matches the provided names; otherwise false. |
ToString()
Returns a System.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System. |
A System. |