protected DashboardContext(DashboardOptions options, IMonitoringApi storage) { if (options == null) { throw new ArgumentNullException(nameof(options)); } Options = options; _isReadOnlyLazy = new Lazy <bool>(() => options.IsReadOnlyFunc(this)); Storage = storage; }
protected DashboardContext([NotNull] JobStorage storage, [NotNull] DashboardOptions options) { if (storage == null) { throw new ArgumentNullException(nameof(storage)); } if (options == null) { throw new ArgumentNullException(nameof(options)); } Storage = storage; Options = options; _isReadOnlyLazy = new Lazy <bool>(() => options.IsReadOnlyFunc(this)); }