public DbJobRepository(IJobDataContextFactory dataContextFactory, ICredentialEncryptor credentialEncryptor,
     IClock clock)
 {
     this.dataContextFactory = dataContextFactory;
     this.credentialEncryptor = credentialEncryptor;
     this.clock = clock;
 }
 public BusinessToCustomerPaymentRequester(
     ITokenizedApiCaller tokenizedApiCaller,
     ICredentialEncryptor credentialEncryptor,
     IValidationResponseHelper validationResponseHelper
     )
 {
     this.tokenizedApiCaller       = tokenizedApiCaller;
     this.credentialEncryptor      = credentialEncryptor;
     this.validationResponseHelper = validationResponseHelper;
 }
 public TokenFetcher(
     IOptions <MPesaSettings> mPesaKeysOptions,
     IHttpCaller httpCaller,
     ILoggedExceptionFetcher loggedExceptionFetcher,
     IMemoryCache memoryCache,
     ICredentialEncryptor credentialEncryptor
     )
 {
     this.httpCaller             = httpCaller;
     this.loggedExceptionFetcher = loggedExceptionFetcher;
     this.memoryCache            = memoryCache;
     this.credentialEncryptor    = credentialEncryptor;
 }
 internal BuildServer ToBuildServer(ICredentialEncryptor credentialEncryptor)
 {
     return new BuildServer()
     {
         Id = Id,
         Credential = (Credential == null)
                          ? null
                          : credentialEncryptor.Decrypt(Credential),
         Name = Name,
         Provider = Provider,
         Uri = new Uri(Uri, UriKind.Absolute),
     };
 }
 internal static BuildServerEntity FromBuildServer(BuildServer buildServer, ICredentialEncryptor credentialEncryptor)
 {
     return new BuildServerEntity
     {
         Id = buildServer.Id,
         Credential = (buildServer.Credential == null)
                          ? null
                          : credentialEncryptor.Encrypt(buildServer.Credential),
         Name = buildServer.Name,
         Provider = buildServer.Provider,
         Uri = buildServer.Uri.AbsoluteUri,
     };
 }