/// <summary>
 /// Standard CTOR for CouchbaseCache
 /// </summary>
 /// <param name="provider"></param>
 /// <param name="options"></param>
 public CouchbaseCache(ICouchbaseCacheCollectionProvider provider, IOptions <CouchbaseCacheOptions> options)
 {
     Options            = options.Value;
     CollectionProvider = provider ?? throw new ArgumentNullException(nameof(provider));
 }
Пример #2
0
 /// <summary>
 /// Constructor for <see cref="CouchbaseCache"/> - if the <see cref="CouchbaseCacheOptions.Bucket"/> field is null,
 /// the bucket will attempted to be retrieved from <see cref="ClusterHelper"/>. If <see cref="ClusterHelper"/> has
 /// not been initialized, then an exception will be thrown.
 /// </summary>
 /// <param name="provider"></param>
 /// <param name="options"></param>
 public CouchbaseCache(ICouchbaseCacheBucketProvider provider, IOptions <CouchbaseCacheOptions> options)
 {
     Options = options.Value;
     Bucket  = provider.GetBucket();
 }