Ejemplo n.º 1
0
 public CacheGrain(
     IOptions <CacheOptions> options,
     ISystemClock clock,
     [PersistentState("State", OutkeepProviderNames.OutkeepCache)] IPersistentState <CacheGrainState> state,
     [PersistentState("Flags", OutkeepProviderNames.OutkeepCache)] IPersistentState <CacheGrainFlags> flags,
     [WeakActivationState(OutkeepProviderNames.OutkeepMemoryResourceGovernor)] IWeakActivationState <ActivityState> activity)
 {
     _options  = options?.Value ?? throw new ArgumentNullException(nameof(options));
     _clock    = clock ?? throw new ArgumentNullException(nameof(clock));
     _state    = state?.AsConflater() ?? throw new ArgumentNullException(nameof(state));
     _flags    = flags?.AsConflater() ?? throw new ArgumentNullException(nameof(flags));
     _activity = activity ?? throw new ArgumentNullException(nameof(activity));
 }