//TODO pass assembly names instead of whole config
 public ReflectionFinder(Configuration configuration, NotificationsHandler notificationsHandler)
 {
     this.configuration        = configuration;
     this.notificationsHandler = notificationsHandler;
     userTypes             = GetUserTypes().ToArray();
     userClassesAndStructs = userTypes.Where(x => x.IsClass || x.IsValueType && !x.IsEnum).ToArray();
 }
        internal CommandExecuter(List <Command> commands, ParsedCommand parsedCommand, ArgumentsParser parser, NotificationsHandler notificationsHandler)
        {
            this.commands             = commands;
            this.parsedCommand        = parsedCommand;
            this.notificationsHandler = notificationsHandler;

            FilterOverloads();
            FilterMatches(parser);
        }
 public CommandsBuilder(Type type, NotificationsHandler notificationsHandler)
 {
     this.type = type;
     this.notificationsHandler = notificationsHandler;
     className          = type.Name;
     fieldsSettings     = new PropertyBuilderSettings();
     propertiesSettings = new PropertyBuilderSettings();
     methodsSettings    = new MemberBuilderSettings();
 }
Esempio n. 4
0
        public ArgumentsParser(ReflectionFinder finder, NotificationsHandler notificationsHandler, bool allowThreading)
        {
            this.finder = finder;
            this.notificationsHandler = notificationsHandler;

            if (allowThreading)
            {
                new Thread(FindParsers).Start();
            }
            else
            {
                FindParsers();
            }
        }
Esempio n. 5
0
 public CommandAttributeLoader(ReflectionFinder finder, NotificationsHandler notificationsHandler)
 {
     this.notificationsHandler = notificationsHandler;
     types = finder.userClassesAndStructs;
 }