public void LoadExtension() { ExtensionLoader el = new ExtensionLoader(new LayerFactory(), new GeometryFactory()); SetByTest = 0; el.LoadExtension("utest1", "skins/utest1/", new String[] { "utest1.cs", "file2.cs" }); Assert.AreEqual(this.SetByTest, 123); }
public void TestLayerInExtension() { TestElementFactory lf = new TestElementFactory(); lf.SearchAssembly(Assembly.GetCallingAssembly()); ExtensionLoader sl = new ExtensionLoader(new ElementFactory[] { lf }); sl.LoadExtension("utest4", "skins/utest4/", new String[] { "layer.cs" }); TestElement l = lf.CreateLayer("test-element-ext", 10); }
public void CompileError() { ExtensionLoader el = new ExtensionLoader(new LayerFactory(), new GeometryFactory()); el.LoadExtension("utest2", "skins/utest2/", new String[] { "error.cs" }); }
public void MissingFile() { ExtensionLoader el = new ExtensionLoader(new LayerFactory(), new GeometryFactory()); el.LoadExtension("not-existing", "not-existing", new String[] { "non-existant.cs" }); }
/// <summary> /// Gets an instance of the API of an extension to the API. /// </summary> /// <typeparam name="TExtension">The extension type.</typeparam> /// <returns>The extension.</returns> public TExtension GetExtension <TExtension>() where TExtension : ExtensionBase { return(ExtensionLoader.LoadExtension <TExtension>(this)); }