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; }
/// <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()); }
/// <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)); }
/// <summary> /// Sets the <see cref="ISecretKeyStore"/> to use. /// </summary> public WebhooksHelperBuilder WithSecretKeyStore(ISecretKeyStore secretKeyStore) { this.SecretKeyStore = secretKeyStore; return(this); }
public WebhooksHelper(IMarshaller marshaller, ISecretKeyStore secretKeyStore) { _marshaller = marshaller ?? throw new ArgumentNullException("marshaller is required"); _secretKeyStore = secretKeyStore ?? throw new ArgumentNullException("secretKeyStore is required"); }