public MidiInformation() { ContextManager.MidiInformation = this; this.RuleSets = new MidiInformation.RuleSetCollection(); this.RuleSets.Added += new EventHandler <MidiInformation.RuleSetEventArgs>(this.OnRuleSetAdded); this.RuleSets.Deleted += new EventHandler <MidiInformation.RuleSetEventArgs>(this.OnRuleSetDeleted); }
public void Dispose() { if (!this.disposed) { this.disposed = true; this.RuleSets.Clear(); this.RuleSets.Added -= new EventHandler <MidiInformation.RuleSetEventArgs>(this.OnRuleSetAdded); this.RuleSets.Deleted -= new EventHandler <MidiInformation.RuleSetEventArgs>(this.OnRuleSetDeleted); this.RuleSets = null; } }