public override void Process(string path, string basePath, LocalizableStringCollection strings)
        {
            var codeMetadataProvider = new CodeMetadataProvider(basePath);
            var csharpWalker         = new ExtractingCodeWalker(
                new IStringExtractor <SyntaxNode>[] {
                new SingularStringExtractor(codeMetadataProvider),
                new PluralStringExtractor(codeMetadataProvider),
                new DataAnnotationStringExtractor(codeMetadataProvider)
            }, strings);

            foreach (var file in Directory.EnumerateFiles(path, "*.cs", SearchOption.AllDirectories).OrderBy(file => file))
            {
                if (Path.GetFileName(file).EndsWith(".cshtml.g.cs"))
                {
                    continue;
                }

                using (var stream = File.OpenRead(file)) {
                    using (var reader = new StreamReader(stream)) {
                        var syntaxTree = CSharpSyntaxTree.ParseText(reader.ReadToEnd(), path: file);

                        csharpWalker.Visit(syntaxTree.GetRoot());
                    }
                }
            }

            base.Process(path, basePath, strings);
        }
        public void Process(string path, string basePath, LocalizableStringCollection strings)
        {
            if (string.IsNullOrEmpty(path))
            {
                path = _defaultPath;
            }

            if (string.IsNullOrEmpty(basePath))
            {
                basePath = _defaultPath;
            }

            var codeMetadataProvider = new CodeMetadataProvider(basePath);
            var csharpWalker         = new ExtractingCodeWalker(
                new IStringExtractor <SyntaxNode>[] {
                new SingularStringExtractor(codeMetadataProvider),
                new PluralStringExtractor(codeMetadataProvider),
                new DataAnnotationStringExtractor(codeMetadataProvider)
            }, strings);

            foreach (var file in Directory.EnumerateFiles(path, "*.cs", SearchOption.AllDirectories).OrderBy(file => file))
            {
                using (var stream = File.OpenRead(file))
                {
                    using (var reader = new StreamReader(stream))
                    {
                        var syntaxTree = CSharpSyntaxTree.ParseText(reader.ReadToEnd(), path: file);

                        csharpWalker.Visit(syntaxTree.GetRoot());
                    }
                }
            }
        }
        public virtual void Process(string path, string basePath, LocalizableStringCollection strings)
        {
            var razorMetadataProvider = new RazorMetadataProvider(basePath);
            var razorWalker           = new ExtractingCodeWalker(GetStringExtractors(razorMetadataProvider), strings);
            var compiledViews         = ViewCompiler.CompileViews(path);

            foreach (var view in compiledViews)
            {
                try
                {
                    var syntaxTree = CSharpSyntaxTree.ParseText(view.GeneratedCode, path: view.FilePath);
                    razorWalker.Visit(syntaxTree.GetRoot());
                }
                catch
                {
                    Console.WriteLine("Process failed for: {0}", view.FilePath);
                }
            }
        }