Ejemplo n.º 1
0
        public async Task FormatAllFiles(CancellationToken cancellationToken = default)
        {
            var sourceFiles = new SourceFileCollection(root);

            var stopwatch = Stopwatch.StartNew();
            await Task.WhenAll(sourceFiles.Select(sourceFile => FormatSingleFile(sourceFile, cancellationToken)));

            stopwatch.Stop();

            Console.WriteLine($"Formatted {sourceFiles.Count()} file(s) in {(int)stopwatch.Elapsed.TotalMilliseconds}ms");
        }
 public SourceFileCollectionSurrogate(SourceFileCollection sourceFileCollection)
 {
     SourceFiles = sourceFileCollection.Select(x => new SourceFileSurrogate(x)).ToArray();
 }
 public SourceFileCollectionSurrogate(SourceFileCollection sourceFileCollection)
 {
     SourceFiles = sourceFileCollection.Select(x => new SourceFileSurrogate(x)).ToArray();
 }