コード例 #1
0
        private void btnAssemblyReflection_Click(object sender, RoutedEventArgs e)
        {
            var assemblyPath = txtAssemblyPath.Text;
            var manager      = new AssemblyReflectionManager();
            var success      = manager.LoadAssembly(assemblyPath, "VNCReflectionDomain");

            var results = manager.Reflect(assemblyPath, (a) =>
            {
                var names = new List <String>();
                var types = a.GetTypes();

                foreach (var t in types)
                {
                    names.Add(t.Name);
                }

                return(names);
            });

            txtOutput.Clear();

            foreach (var name in results)
            {
                txtOutput.Text += (System.Environment.NewLine + name.ToString());
            }

            manager.UnloadAssembly(assemblyPath);
        }
コード例 #2
0
        private void btnDomainReflection_Click(object sender, RoutedEventArgs e)
        {
            var assemblyPath = txtAssemblyPath.Text;
            var manager      = new AssemblyReflectionManager();
            var success      = manager.LoadAssembly(assemblyPath, "VNCReflectionDomain");

            var results = manager.GetTypeInformation(assemblyPath);

            txtOutput.Clear();

            foreach (TypeInformation info in results)
            {
                txtOutput.Text += (System.Environment.NewLine + info.FullName);
            }

            manager.UnloadAssembly(assemblyPath);
        }