| | 1 | | using System.Collections.Generic; |
| | 2 | |
|
| | 3 | | namespace DCL |
| | 4 | | { |
| | 5 | | public class PluginGroup |
| | 6 | | { |
| 11 | 7 | | public Dictionary<PluginBuilder, PluginInfo> plugins = new Dictionary<PluginBuilder, PluginInfo>(); |
| | 8 | |
|
| | 9 | | public bool Add(PluginBuilder plugin, PluginInfo pluginInfo) |
| | 10 | | { |
| 17 | 11 | | if ( plugins.ContainsKey(plugin) ) |
| 0 | 12 | | return false; |
| | 13 | |
|
| 17 | 14 | | plugins.Add(plugin, pluginInfo); |
| 17 | 15 | | return true; |
| | 16 | | } |
| | 17 | |
|
| | 18 | | public bool Remove(PluginBuilder plugin) |
| | 19 | | { |
| 0 | 20 | | if ( !plugins.ContainsKey(plugin)) |
| 0 | 21 | | return false; |
| | 22 | |
|
| 0 | 23 | | plugins.Remove(plugin); |
| 0 | 24 | | return true; |
| | 25 | | } |
| | 26 | | } |
| | 27 | | } |