Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 4
0
 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),
     };
 }
Ejemplo n.º 5
0
 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,
     };
 }