forked from MeowBot/OpenQuant.API
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathScriptSettings.cs
More file actions
50 lines (50 loc) · 975 Bytes
/
Copy pathScriptSettings.cs
File metadata and controls
50 lines (50 loc) · 975 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using System;
using System.Collections;
using System.Collections.Generic;
namespace OpenQuant.API
{
public class ScriptSettings : IEnumerable<KeyValuePair<string, object>>, IEnumerable
{
private Dictionary<string, object> settings;
public int Count
{
get
{
return this.settings.Count;
}
}
public object this[string name]
{
get
{
object result = null;
this.settings.TryGetValue(name, out result);
return result;
}
set
{
this.settings[name] = value;
}
}
internal ScriptSettings()
{
this.settings = new Dictionary<string, object>();
}
public IEnumerator<KeyValuePair<string, object>> GetEnumerator()
{
return this.settings.GetEnumerator();
}
public void Add(string name, object data)
{
this.settings.Add(name, data);
}
public void Remove(string name)
{
this.settings.Remove(name);
}
IEnumerator IEnumerable.GetEnumerator()
{
return this.settings.GetEnumerator();
}
}
}