public VaultFileBackupRepositoryDecorator(IVaultRepository decoratedVaultRepository, string vaultBackupFolder, string vaultFileExtension, ISerializer serializer, IFileSystem fileSystem, ISymetricCryptographer symetricCryptographer, IClockProvider clockProvider, IVaultFileMetadataHandler vaultFileMetadataHandler) { GuardClauses.ArgumentIsNotNull(nameof(decoratedVaultRepository), decoratedVaultRepository); GuardClauses.ArgumentIsNotNull(nameof(vaultBackupFolder), vaultBackupFolder); GuardClauses.ArgumentIsNotNull(nameof(vaultFileExtension), vaultFileExtension); if (vaultFileExtension.StartsWith(".") == false) { throw new ArgumentException("File extension string must start with a dot. E.g. \".extension\"", nameof(vaultFileExtension)); } GuardClauses.ArgumentIsNotNull(nameof(symetricCryptographer), symetricCryptographer); GuardClauses.ArgumentIsNotNull(nameof(clockProvider), clockProvider); GuardClauses.ArgumentIsNotNull(nameof(vaultFileMetadataHandler), vaultFileMetadataHandler); this.VaultRepository = decoratedVaultRepository; this.VaultBackupFolder = vaultBackupFolder; this.VaultFileExtension = vaultFileExtension; this.Serializer = serializer; this.FileSystem = fileSystem; this.SymetricCryptographer = symetricCryptographer; this.ClockProvider = clockProvider; this.VaultFileMetadataHandler = vaultFileMetadataHandler; }
public VaultFileRepositoryFactory(IFileSystem fileSystem, ISymetricCryptographer symetricCryptographer, ISerializer serializer, IClockProvider clockProvider, IVaultFileMetadataHandler vaultFileMetadataHandler) { GuardClauses.ArgumentIsNotNull(nameof(fileSystem), fileSystem); GuardClauses.ArgumentIsNotNull(nameof(symetricCryptographer), symetricCryptographer); GuardClauses.ArgumentIsNotNull(nameof(serializer), serializer); GuardClauses.ArgumentIsNotNull(nameof(clockProvider), clockProvider); GuardClauses.ArgumentIsNotNull(nameof(vaultFileMetadataHandler), vaultFileMetadataHandler); this.FileSystem = fileSystem; this.SymetricCryptographer = symetricCryptographer; this.Serializer = serializer; this.ClockProvider = clockProvider; this.VaultFileMetadataHandler = vaultFileMetadataHandler; }