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 CreateGenericProxy() { return(ProxyBuilder <IGeneric <Test2>, ClientDispatch> .CreateGenericInstanceAndUnwrap(alc, Assembly.GetExecutingAssembly().GetName(), "Benchmarks.ALCProxy.GenericClass`1", new Type[] { typeof(Test2) })); }