Ejemplo 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;
 }
Ejemplo 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());
        }
Ejemplo 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));
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Sets the <see cref="ISecretKeyStore"/> to use.
 /// </summary>
 public WebhooksHelperBuilder WithSecretKeyStore(ISecretKeyStore secretKeyStore)
 {
     this.SecretKeyStore = secretKeyStore;
     return(this);
 }
Ejemplo 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");
 }