Пример #1
0
    /// <summary>
    /// Initializes a new instance of the <see cref="DbWebHookStore{TContext,TRegistration}"/> class with the given <paramref name="logger"/>.
    /// Using this constructor, the data will not be encrypted while persisted to the database.
    /// </summary>
    protected DbWebHookStore(ILogger <DbWebHookStore <TContext, TRegistration> > logger, WebHookStoreContext context)
    {
        if (logger == null)
        {
            throw new ArgumentNullException(nameof(logger));
        }
        if (context == null)
        {
            throw new ArgumentNullException(nameof(context));
        }

        _logger  = logger;
        _context = context;
    }
Пример #2
0
    /// <summary>
    /// Initializes a new instance of the <see cref="DbWebHookStore{TContext,TRegistration}"/> class with the given <paramref name="protector"/>
    /// and <paramref name="logger"/>.
    /// Using this constructor, the data will be encrypted using the provided <paramref name="protector"/>.
    /// </summary>
    protected DbWebHookStore(IDataProtector protector, ILogger <DbWebHookStore <TContext, TRegistration> > logger, WebHookStoreContext context)
        : this(logger, context)
    {
        if (protector == null)
        {
            throw new ArgumentNullException(nameof(protector));
        }

        _protector = protector;
    }