Esempio n. 1
0
        public static void Main()
        {
            var cxt = new LoadAllAssembliesContext();

            var assembly = cxt.LoadFromAssemblyPath(typeof(Program).Assembly.Location);
            var type     = assembly.GetType(typeof(Program).FullName);

            type.GetMethod(nameof(Program.DoXamlLoad)).Invoke(null, null);
        }
Esempio n. 2
0
        public static void Main()
        {
            // force the Library assembly into the current context/app domain;
            Debug.Assert(typeof(Properties) != null);

            var cxt      = new LoadAllAssembliesContext();
            var assembly = cxt.LoadFromAssemblyPath(typeof(Program).Assembly.Location);
            var type     = assembly.GetType(typeof(Program).FullName);

            using (cxt.EnterContextualReflection())
            {
                type.GetMethod(nameof(Program.DoXamlLoad)).Invoke(null, null);
            }
        }