-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathContextManager.cs
77 lines (73 loc) · 1.29 KB
/
ContextManager.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
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
using LumosLIB.Kernel.Log;
using System;
namespace MidiPlugin
{
internal static class ContextManager
{
private static MidiInformation info;
private static DeviceInformation dev;
private static AssemblyHelper asm;
public static MidiInformation MidiInformation
{
get
{
return ContextManager.info;
}
set
{
if (ContextManager.info != null)
{
throw new Exception("MidiInformation already set");
}
ContextManager.info = value;
}
}
public static DeviceInformation DeviceInformation
{
get
{
return ContextManager.dev;
}
set
{
if (ContextManager.dev != null)
{
throw new Exception("DeviceInformation already set");
}
ContextManager.dev = value;
}
}
public static AssemblyHelper AssemblyHelper
{
get
{
return ContextManager.asm;
}
set
{
if (ContextManager.asm != null)
{
throw new Exception("AssemblyHelper already set");
}
ContextManager.asm = value;
}
}
public static MidiForm MidiForm
{
get;
set;
}
public static ILumosLog log
{
get;
set;
}
static ContextManager()
{
log = LumosLogger.getInstance(typeof(MidiPluginLog));
}
}
public class MidiPluginLog
{
}
}