public PluginManager() { _plugins = new Dictionary <string, IPlugin>(); _wrapper = new FileSystem.PathWrapper(); _path = _wrapper.GetPathForCurrentOS("data/plugins"); if (!Directory.Exists(_path)) { Directory.CreateDirectory(_path); } _watcher = new FileSystemWatcher(_path); _watcher.Changed += PluginsChanged; _watcher.Renamed += PluginsRenamed; LoadAllPlugins(); }
public PluginManager() { _plugins = new Dictionary<string, IPlugin>(); _wrapper = new FileSystem.PathWrapper(); _path = _wrapper.GetPathForCurrentOS("data/plugins"); if (!Directory.Exists(_path)) { Directory.CreateDirectory(_path); } _watcher = new FileSystemWatcher(_path); _watcher.Changed += PluginsChanged; _watcher.Renamed += PluginsRenamed; LoadAllPlugins(); }
private void GetAITypes() { _wrapper = new FileSystem.PathWrapper(); _path = _wrapper.GetPathForCurrentOS("data/plugins/ki"); Assembly asm = Assembly.GetExecutingAssembly(); AITypes = new List<Type>(asm.GetTypes().Where<Type>(t => t.IsSubclassOf(typeof(AI.AbstractAI)))); if (!Directory.Exists(_path)) { Directory.CreateDirectory(_path); } else { GetAITypesFromOuterAssemblie(Directory.GetFiles(_path)); } }
private void GetAITypes() { _wrapper = new FileSystem.PathWrapper(); _path = _wrapper.GetPathForCurrentOS("data/plugins/ki"); Assembly asm = Assembly.GetExecutingAssembly(); AITypes = new List <Type>(asm.GetTypes().Where <Type>(t => t.IsSubclassOf(typeof(AI.AbstractAI)))); if (!Directory.Exists(_path)) { Directory.CreateDirectory(_path); } else { GetAITypesFromOuterAssemblie(Directory.GetFiles(_path)); } }