public InMemoryKeyValuePairWithExpirationService(IOptions <KeyValuePairWithExpirationOptions> keyValuePairWithExpirationOptions)
        {
            if (keyValuePairWithExpirationOptions == null)
            {
                throw new ArgumentNullException(nameof(keyValuePairWithExpirationOptions));
            }

            this.keyValuePairWithExpirationOptions = keyValuePairWithExpirationOptions.Value;
        }
        public DbKeyValuePairWithExpirationService(
            IOptions <KeyValuePairWithExpirationOptions> keyValuePairWithExpirationOptions,
            IKeyValuePairWithExpirationRepository keyValuePairWithExpirationRepository)
        {
            if (keyValuePairWithExpirationOptions == null)
            {
                throw new ArgumentNullException(nameof(keyValuePairWithExpirationOptions));
            }

            if (keyValuePairWithExpirationRepository == null)
            {
                throw new ArgumentNullException(nameof(keyValuePairWithExpirationRepository));
            }

            this.keyValuePairWithExpirationOptions    = keyValuePairWithExpirationOptions.Value;
            this.keyValuePairWithExpirationRepository = keyValuePairWithExpirationRepository;
        }