예제 #1
0
 public MigrationFileService( IHashCalculator HashCalculator, IMigrationFileRepository MigrationFileRepository, IMigrationFileParser MigrationFileParser )
 {
     if ( HashCalculator == null ) {
         throw new ArgumentNullException( "HashCalculator" );
     }
     if ( MigrationFileRepository == null ) {
         throw new ArgumentNullException( "MigrationFileRepository" );
     }
     if ( MigrationFileParser == null ) {
         throw new ArgumentNullException( "MigrationFileParser" );
     }
     this.hashCalculator = HashCalculator;
     this.migrationFileRepository = MigrationFileRepository;
     migrationFileParser = MigrationFileParser;
 }
예제 #2
0
 public FileHasher(IHashCalculator hashProvider)
 {
     if (hashProvider == null) throw new ArgumentNullException(nameof(hashProvider));
     _hashProvider = hashProvider;
 }
예제 #3
0
 public FileManager(IFileSystem fileSystem)
 {
     _fileSystem = fileSystem;
     _hashCalc = new QuickHashCalculator(fileSystem);
 }
예제 #4
0
        public RepositoryManager(ILogger <RepositoryManager> logger, FileContentObtainer fileContentObtainer, IHashCalculator hashCalculator, IHashingService hashingService, ITriplestoreRepository repository, StoreConfiguration sConfig)
        {
            _logger = logger;
            _fileContentObtainer = fileContentObtainer;
            _hashCalculator      = hashCalculator;
            _hashingService      = hashingService;
            _repository          = repository;
            _chainGraphIri       = sConfig.ChainGraphIri;

            _dotNetRdfMapper = new DotNetRdfMapper();
            _dotNetRdfSerializationHandler = new DotNetRdfSerializationHandler();
            Init();
        }