public static void UnloadPlugins() { if (_plugin != null) { _plugin.UnLoad(); _plugin = null; } }
public void Setup() { _sut = new AdvancedAnalizer(); var fakeSimpleAnalizer = Isolate.Fake.Instance <SimpleAnalizer>(); Isolate.WhenCalled(() => fakeSimpleAnalizer.Analize(0)).WillReturn(new Models.FizzBuzzResult()); Isolate.NonPublic.InstanceField(_sut, "_simpleAnalizer").Value = fakeSimpleAnalizer; }
public static void LoadPlugin(string file, Panel panelC, Panel panelV) { if (File.Exists(file)) { UnloadPlugins(); Assembly assembly = Assembly.LoadFrom(file); Type pluginType = typeof(IAnalizer); Type[] types = assembly.GetTypes(); foreach (Type t in types) { if (t.GetInterface(pluginType.FullName) != null) { _plugin = (IAnalizer)Activator.CreateInstance(t); _plugin.Load(panelC, panelV); } } } }
public Engine(IAnalizer analizer) { _analizer = analizer; }
public AdvancedAnalizer() { _simpleAnalizer = new SimpleAnalizer(); }
internal void Analize(IAnalizer analizer) { if (analizer != null) analizer.Analize(_Numbers); }
public void Setup() { _sut = new SimpleAnalizer(); }