Exemple #1
0
        public void reflectionTest()
        {
            var typeName = "LogAnalyzer.Analyzers, LogAnalyzer.Analyzers.Bookings.BookingAnalyzer`1[LogAnalyzer.Analyzers.Bookings.Models.BookingAnalysis]";
            var fte      = new FullTypeNameEntry(typeName);

            try {
                var y = Activator.CreateInstance(fte.AssemblyName, fte.TypeName);
            }
            catch (Exception exc) {
                System.Diagnostics.Debug.Print(exc.Message);
            }
        }
Exemple #2
0
        private TreeNode createTreeNodeFromCommand(CommandConfiguration command)
        {
            var commandName        = new FullTypeNameEntry(command.TypeActivationName).TypeName;
            var commandDisplayText = commandName.Substring(commandName.LastIndexOf('.') + 1);

            if (!string.IsNullOrWhiteSpace(command.ShortDescription))
            {
                commandDisplayText += " - " + command.ShortDescription;
            }
            TreeNode cmdNode = new TreeNode(commandDisplayText);

            cmdNode.Checked = true;
            cmdNode.Tag     = command;
            return(cmdNode);
        }