コード例 #1
0
        public static IFile BuildFileFromPath(string filePath, IDiskIOWrapper diskIoWrapper)
        {
            var fileContent = diskIoWrapper.ReadAllLinesFromFile(filePath);

            return(new File(Path.GetFileName(filePath) ?? throw new FileBuilderException(filePath),
                            Path.GetExtension(filePath) !,
                            Path.GetDirectoryName(filePath) !,
                            SourceLineBuilder.BuildSourceLineFromLineOfCode(fileContent.ToArray()),
                            Option <IFileGitStats> .None,
                            Option <IFileCoverageStats> .None));
        }
コード例 #2
0
 public StatsEnricher(IDiskIOWrapper ioWrapper,
                      IGitCommands gitCommands,
                      ILogger logger,
                      ICommandLineExecutor executor,
                      ICoverageProviderFactory providerFactory,
                      IPathValidator pathValidator,
                      ICoverageReportConverter converter)
 {
     _ioWrapper       = ioWrapper;
     _gitCommands     = gitCommands;
     _logger          = logger;
     _executor        = executor;
     _providerFactory = providerFactory;
     _pathValidator   = pathValidator;
     _converter       = converter;
 }
コード例 #3
0
 public RepositorySnapshotBuilderArguments(string snapshotId,
                                           string rootPath,
                                           string sourceRoot,
                                           string[] sourceExtensions,
                                           string coveragePath,
                                           Option <string> atHash,
                                           Option <DateTime> commitCreationDate,
                                           IDiskIOWrapper diskIoWrapper,
                                           IPathValidator pathValidator)
 {
     SnapshotId         = snapshotId;
     RootPath           = rootPath;
     SourceRoot         = sourceRoot;
     SourceExtensions   = sourceExtensions;
     CoveragePath       = coveragePath;
     AtHash             = atHash;
     CommitCreationDate = commitCreationDate;
     DiskIoWrapper      = diskIoWrapper;
     PathValidator      = pathValidator;
 }
コード例 #4
0
ファイル: Runner.cs プロジェクト: marczinusd/hestia
 public Runner(IDiskIOWrapper ioWrapper,
               IPathValidator pathValidator,
               IRepositorySnapshotBuilderWrapper builder,
               IStatsEnricher statsEnricher,
               ICoverageReportConverter converter,
               ILogger log,
               ISnapshotPersistence persistence,
               IProgressBarFactory progressBarFactory,
               ICommandLineExecutor executor,
               ISpinner spinner)
 {
     _ioWrapper          = ioWrapper;
     _pathValidator      = pathValidator;
     _builder            = builder;
     _statsEnricher      = statsEnricher;
     _converter          = converter;
     _log                = log;
     _persistence        = persistence;
     _progressBarFactory = progressBarFactory;
     _executor           = executor;
     _spinner            = spinner;
 }
コード例 #5
0
 public JsonCovCoverageProvider(IDiskIOWrapper diskIoWrapper) => _diskIoWrapper = diskIoWrapper;
コード例 #6
0
 public CoverageReportConverter(IDiskIOWrapper ioWrapper, IReportGeneratorWrapper reportGeneratorWrapper)
 {
     _ioWrapper = ioWrapper;
     _reportGeneratorWrapper = reportGeneratorWrapper;
 }
コード例 #7
0
 public CoverageProviderFactory(IDiskIOWrapper ioWrapper,
                                IXmlFileSerializationWrapper xmlFileSerializationWrapper)
 {
     _ioWrapper = ioWrapper;
     _xmlFileSerializationWrapper = xmlFileSerializationWrapper;
 }