Exemplo n.º 1
0
 /// <summary>
 /// Creates a new CacheKeyGenerator, that relies on a IServiceConsumptionOptions class, not requiring an HttpActionContext
 /// </summary>
 /// <exception cref="ArgumentNullException">If serviceOptions are null</exception>
 /// <param name="serviceOptions"></param>
 public GenericCacheKeyGenerator(IServiceConsumptionOptions serviceOptions)
 {
     if (serviceOptions == null)
     {
         throw new ArgumentNullException("serviceOptions");
     }
     _serviceOptions            = serviceOptions;
     _specificCacheKeyGenerator = new CustomCacheKeyGenerator();
 }
 public void SetServiceOptions(IServiceConsumptionOptions serviceOptions)
 {
     _serviceOptions = serviceOptions ?? throw new ArgumentNullException("serviceOptions");
 }