Example #1
0
        public static void Setup()
        {
            Logger = BetterEditor.Logger;

            StoredCommands.Clear();
            IEnumerable <Type> CommandTypes = Assembly.GetExecutingAssembly().GetTypes().Where(t => t.GetCustomAttribute <CommandInfo>() != null);

            foreach (Type CommandType in CommandTypes)
            {
                string CommandId = CommandType.GetCustomAttribute <CommandInfo>().Id;

                StoredCommands.Add(CommandId, (BECommand)CommandType.GetConstructors().First().Invoke(null, null));
            }
        }