forked from mosoto/Caffeinated
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSettings.cs
24 lines (23 loc) · 797 Bytes
/
Settings.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using System;
using System.Collections.Generic;
using System.Linq;
namespace Caffeinated.Properties {
internal sealed partial class Settings {
private IList<int> realDurations;
public IList<int> RealDurations {
get {
if (realDurations == null) {
realDurations = Durations.Split(',')
.Select(s => Convert.ToInt32(s))
.ToList();
}
return realDurations;
}
set {
this.realDurations = value;
var strDurations = value.Select(s => s.ToString()).ToArray();
this.Durations = string.Join(",", strDurations);
}
}
}
}