Here's an example code:
var setup = new AppDomainSetup(); setup.PrivateBinPath = $"{Directory.GetCurrentDirectory()}\\Libs"; var appDomain = AppDomain.CreateDomain( "ΠΈΠΌΡ Π΄ΠΎΠΌΠ΅Π½Π°", null, setup ); appDomain.DoCallBack ( AssemblyLoad );
An example of a method in Kalbek:
private static void AssemblyLoad() { var assembly = Assembly.Load( "Test" ); var type = assembly.GetTypes().Single( t => typeof( ΠΡΠΆΠ½ΡΠΉΠ’ΠΈΠΏ).IsAssignableFrom( t ) ); Console.WriteLine( type.FullName ); _typeName = type.FullName; }
The _typeName
variable _typeName
also static and remains empty. If you make the method not static, then the callback domain will cause an error. How to find out the name of the required type?