コード例 #1
0
 public ScmBackup(IApiCaller apiCaller, IScmValidator validator, IBackupMaker backupMaker, IConfigBackupMaker configBackupMaker)
 {
     this.apiCaller         = apiCaller;
     this.validator         = validator;
     this.backupMaker       = backupMaker;
     this.configBackupMaker = configBackupMaker;
 }
コード例 #2
0
ファイル: Client.cs プロジェクト: jaybyrrd/backupbot
 public Client()
 {
     SocketClient = new DiscordSocketClient();
     _commands    = new CommandService();
     _services    = new ServiceCollection()
                    .AddSingleton(SocketClient)
                    .AddSingleton(_commands)
                    .BuildServiceProvider();
     _backupHandler = new BackupMaker(new DirectoryInfo("D:/backup"));
 }
コード例 #3
0
 public BitbucketHoster(
     IConfigSourceValidator <BitbucketHoster> validator,
     IHosterApi <BitbucketHoster> api,
     IBackupMaker <BitbucketHoster> backupMaker)
 {
     if (validator == null)
     {
         throw new ArgumentNullException("validator");
     }
     if (api == null)
     {
         throw new ArgumentNullException("api");
     }
     if (backupMaker == null)
     {
         throw new ArgumentNullException("backupMaker");
     }
     this.Validator   = validator;
     this.Api         = api;
     this.BackupMaker = backupMaker;
 }