File tree Expand file tree Collapse file tree 2 files changed +68
-0
lines changed Expand file tree Collapse file tree 2 files changed +68
-0
lines changed Original file line number Diff line number Diff line change 1+ using System ;
2+
3+ namespace MemPlus . Classes . LOG
4+ {
5+ internal class Log
6+ {
7+ private readonly DateTime _time ;
8+ private readonly string _value ;
9+
10+ internal Log ( string data )
11+ {
12+ _time = DateTime . Now ;
13+ _value = data ;
14+ }
15+
16+ internal DateTime GetDate ( )
17+ {
18+ return _time ;
19+ }
20+
21+ internal string GetValue ( )
22+ {
23+ return _value ;
24+ }
25+ }
26+ }
Original file line number Diff line number Diff line change 1+ using System ;
2+ using System . Collections . Generic ;
3+
4+ namespace MemPlus . Classes . LOG
5+ {
6+ internal class LogController
7+ {
8+ private readonly List < Log > _logList ;
9+
10+ internal LogController ( )
11+ {
12+ _logList = new List < Log > ( ) ;
13+ }
14+
15+ internal void AddLog ( Log l )
16+ {
17+ _logList . Add ( l ) ;
18+ }
19+
20+ internal void RemoveLog ( Log l )
21+ {
22+ if ( _logList . Contains ( l ) )
23+ {
24+ _logList . Remove ( l ) ;
25+ }
26+ else
27+ {
28+ throw new ArgumentException ( "Log could not be found!" ) ;
29+ }
30+ }
31+
32+ internal void ClearLogs ( )
33+ {
34+ _logList . Clear ( ) ;
35+ }
36+
37+ internal List < Log > GetLogs ( )
38+ {
39+ return _logList ;
40+ }
41+ }
42+ }
You can’t perform that action at this time.
0 commit comments