1
|
using System;
|
2
|
|
3
|
namespace ServerApp.Parser.OutputInfo
|
4
|
{
|
5
|
/// <summary>
|
6
|
/// Class representing the number of events in a given time interval a given faculty
|
7
|
/// - shortest possible interval is 1h
|
8
|
/// </summary>
|
9
|
/// <author>Alex Konig</author>
|
10
|
class ActivityInfo
|
11
|
{
|
12
|
/// <summary> Building </summary>
|
13
|
public string building;
|
14
|
/// <summary> Number of events </summary>
|
15
|
public int amount;
|
16
|
/// <summary> Start of interval </summary>
|
17
|
public DateTime startTime;
|
18
|
/// <summary> Length of interval in hours </summary>
|
19
|
public int intervalLength;
|
20
|
|
21
|
/// <summary>
|
22
|
/// Constructor
|
23
|
/// </summary>
|
24
|
/// <param name="faculty">Faculty</param>
|
25
|
/// <param name="amount">Number of events</param>
|
26
|
/// <param name="startTime">Start of recorded interval</param>
|
27
|
/// <param name="intervalLength">Length of recorded interval</param>
|
28
|
public ActivityInfo(string faculty, int amount, DateTime startTime, int intervalLength)
|
29
|
{
|
30
|
this.building = faculty;
|
31
|
this.amount = amount;
|
32
|
this.startTime = startTime;
|
33
|
this.intervalLength = intervalLength;
|
34
|
}
|
35
|
|
36
|
/// <summary>
|
37
|
/// To string
|
38
|
/// </summary>
|
39
|
/// <returns>"start time faculty number of events"</returns>
|
40
|
public override string ToString()
|
41
|
{
|
42
|
return $"{startTime} \t {building} \t {amount}";
|
43
|
}
|
44
|
}
|
45
|
}
|