示例#1
0
        public static IEnumerable <string> GetImplementationFiles()
        {
            var classFiles = Directory.EnumerateFiles(Utils.GaugeProjectRoot, "*.cs", SearchOption.AllDirectories)
                             .ToList();

            var attributes = new AttributesLoader().GetRemovedAttributes();

            foreach (var attribute in attributes)
            {
                classFiles.Remove(Path.Combine(Utils.GaugeProjectRoot, attribute.Value));
            }

            var removedFiles = GetRemovedDirFiles();

            return(classFiles.Except(removedFiles));
        }
        public static IGaugeCommand GetExecutor(string phase)
        {
            switch (phase)
            {
            case "--init":
                return(new SetupCommand());

            default:
                return(new StartCommand(() =>
                {
                    var attributesLoader = new AttributesLoader();
                    var loader = new StaticLoader(attributesLoader);
                    loader.LoadImplementations();
                    return new GaugeListener(loader);
                },
                                        () => new GaugeProjectBuilder()));
            }
        }