public void Setup() { userInput = new Test2(); testObject = ProxyBuilder <ITest, ClientDispatch> .CreateInstanceAndUnwrap(alc, Assembly.GetAssembly(typeof(Test)).GetName(), "Benchmarks.ALCProxy.Test"); genericObject = ProxyBuilder <IGeneric <Test2>, ClientDispatch> .CreateGenericInstanceAndUnwrap(alc, Assembly.GetAssembly(typeof(GenericClass <>)).GetName(), "Benchmarks.ALCProxy.GenericClass`1", new Type[] { typeof(Test2) }); string path = Assembly.GetAssembly(typeof(Test)).Location.Split("Benchmarks")[0] + "ALCProxy.TestAssembly\\bin\\Release\\netcoreapp3.0\\ALCProxy.TestAssembly.dll"; name = AssemblyName.GetAssemblyName(path); alc2 = new TestAssemblyLoadContext("BenchmarkExternalContext", path, isCollectible: true); }
public object CreateExternalAssemblyProxyObject() { return(ProxyBuilder <IExternalClass, ClientDispatch> .CreateInstanceAndUnwrap(alc2, name, "ALCProxy.TestAssembly.ExternalClass", new object[] { })); }
public object CreateProxyObject() { return(ProxyBuilder <ITest, ClientDispatch> .CreateInstanceAndUnwrap(alc, assemblyName, "Benchmarks.ALCProxy.Test")); }