Esempio n. 1
0
 public WebhooksHelper(IMarshaller marshaller, ISecretKeyStore secretKeyStore)
 {
     if (marshaller == null)
     {
         throw new ArgumentNullException("marshaller is required");
     }
     if (secretKeyStore == null)
     {
         throw new ArgumentNullException("secretKeyStore is required");
     }
     _marshaller     = marshaller;
     _secretKeyStore = secretKeyStore;
 }
Esempio n. 2
0
        /// <summary>
        /// Creates a <see cref="WebhooksHelper"/> that will use the given <see cref="ISecretKeyStore"/>.
        /// </summary>
        public static WebhooksHelper CreateHelper(ISecretKeyStore secretKeyStore)
        {
            WebhooksHelperBuilder webhooksHelperBuilder = CreateHelperBuilder(secretKeyStore);

            return(webhooksHelperBuilder.Build());
        }
Esempio n. 3
0
 /// <summary>
 /// Creates a <see cref="WebhooksHelperBuilder"/> that will use the given <see cref="ISecretKeyStore"/>.
 /// </summary>
 public static WebhooksHelperBuilder CreateHelperBuilder(ISecretKeyStore secretKeyStore)
 {
     return(new WebhooksHelperBuilder().WithMarshaller(DefaultMarshaller.Instance).WithSecretKeyStore(secretKeyStore));
 }
Esempio n. 4
0
 /// <summary>
 /// Sets the <see cref="ISecretKeyStore"/> to use.
 /// </summary>
 public WebhooksHelperBuilder WithSecretKeyStore(ISecretKeyStore secretKeyStore)
 {
     this.SecretKeyStore = secretKeyStore;
     return(this);
 }
Esempio n. 5
0
 public WebhooksHelper(IMarshaller marshaller, ISecretKeyStore secretKeyStore)
 {
     _marshaller     = marshaller ?? throw new ArgumentNullException("marshaller is required");
     _secretKeyStore = secretKeyStore ?? throw new ArgumentNullException("secretKeyStore is required");
 }