Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
RgbDeviceGroup.cs
Go to the documentation of this file.
1using System;
4
6
7public abstract class RgbDeviceGroup : IDisposable, IEnumerable<RgbDevice>, IEnumerable
8{
9 private bool _isDisposed;
10
11 public bool IsEnabled { get; private set; }
12
13 public void Enable()
14 {
15 IsEnabled = true;
16 Initialize();
17 }
18
19 public void Disable()
20 {
21 IsEnabled = false;
23 }
24
25 protected abstract void Initialize();
26
27 protected abstract void Uninitialize();
28
29 public virtual void OnceProcessed()
30 {
31 }
32
33 public virtual void LoadSpecialRules(object specialRulesObject)
34 {
35 }
36
38
43
44 protected virtual void Dispose(bool disposing)
45 {
46 if (!_isDisposed)
47 {
48 Disable();
49 _isDisposed = true;
50 }
51 }
52
54 {
55 Dispose(disposing: false);
56 }
57
58 public void Dispose()
59 {
60 Dispose(disposing: true);
61 GC.SuppressFinalize(this);
62 }
63}
IEnumerator< RgbDevice > GetEnumerator()
virtual void LoadSpecialRules(object specialRulesObject)
virtual void Dispose(bool disposing)
static void SuppressFinalize(object obj)
Definition GC.cs:202
Definition GC.cs:8
new IEnumerator< T > GetEnumerator()