NTP Analyzer  0.8.2
Analyze the operation of time servers
Ntp.Analyzer.Objects.PeerActivity Class Reference
Inheritance diagram for Ntp.Analyzer.Objects.PeerActivity:
Collaboration diagram for Ntp.Analyzer.Objects.PeerActivity:

Public Member Functions

 PeerActivity (int id, Peer peer, Host host, DateTime lastActive, int zone, bool hide)
 
 PeerActivity (Peer peer, Host host, DateTime lastActive)
 
- Public Member Functions inherited from Ntp.Analyzer.Objects.PersistentObject
override bool Equals (object obj)
 
override int GetHashCode ()
 
void SetId (int id)
 Sets the identifier after the object have been stored in persistent storage. More...
 
override string ToString ()
 Returns a string that represents the current PersistentObject. More...
 

Public Attributes

bool IsActive => !Hide
 
string Name => Id.ToString(CultureInfo.InvariantCulture)
 

Properties

bool Hide [get]
 
Host Host [get]
 
DateTime LastActive [get, set]
 
Peer Peer [get]
 
int UtcOffset [get]
 
- Properties inherited from Ntp.Analyzer.Objects.PersistentObject
int Id [get, private set]
 Gets the identifier. More...
 
bool NewObject [get, protected set]
 Gets a value indicating whether this PersistentObject is a new object which does not yet exists in the peristing storage (database etc). More...
 

Additional Inherited Members

- Protected Member Functions inherited from Ntp.Analyzer.Objects.PersistentObject
 PersistentObject (int id)
 Initializes a new instance of the PersistentObject class. More...
 
 PersistentObject ()
 Initializes a new instance of the PersistentObject class. More...
 

Detailed Description

Definition at line 27 of file PeerActivity.cs.

Constructor & Destructor Documentation

Ntp.Analyzer.Objects.PeerActivity.PeerActivity ( int  id,
Peer  peer,
Host  host,
DateTime  lastActive,
int  zone,
bool  hide 
)
inline

Definition at line 29 of file PeerActivity.cs.

30  : base(id)
31  {
32  Peer = peer;
33  Host = host;
34  Hide = hide;
35 
36  var adjusted = new DateTime(
37  lastActive.Year, lastActive.Month, lastActive.Day,
38  lastActive.Hour, lastActive.Minute, lastActive.Second,
39  DateTimeKind.Utc);
40 
41  LastActive = adjusted.AddMinutes(zone);
42  }
Ntp.Analyzer.Objects.PeerActivity.PeerActivity ( Peer  peer,
Host  host,
DateTime  lastActive 
)
inline

Definition at line 44 of file PeerActivity.cs.

45  {
46  Peer = peer;
47  Host = host;
48  LastActive = lastActive;
49  }

Member Data Documentation

bool Ntp.Analyzer.Objects.PeerActivity.IsActive => !Hide

Definition at line 61 of file PeerActivity.cs.

string Ntp.Analyzer.Objects.PeerActivity.Name => Id.ToString(CultureInfo.InvariantCulture)

Definition at line 51 of file PeerActivity.cs.

Property Documentation

bool Ntp.Analyzer.Objects.PeerActivity.Hide
get
Host Ntp.Analyzer.Objects.PeerActivity.Host
get
DateTime Ntp.Analyzer.Objects.PeerActivity.LastActive
getset
Peer Ntp.Analyzer.Objects.PeerActivity.Peer
get
int Ntp.Analyzer.Objects.PeerActivity.UtcOffset
get

The documentation for this class was generated from the following file: