public async Task <Modifiable> OnExpired(ICacheContext context, RequestValidationResult reason, IReadOnlyCollection <Uri> expiredUris) { CacheExpiredContext handlerContext = null; foreach (var handlerInfo in GetHandlerInfo(CacheHandlerType.Expired)) { if (handlerContext == null) { handlerContext = ((Func <ICacheContext, RequestValidationResult, IReadOnlyCollection <Uri>, CacheExpiredContext>)handlerInfo.InitialConstructor)(context, reason, expiredUris); } else { handlerContext = ((Func <CacheExpiredContext, CacheExpiredContext>)handlerInfo.ContinuationConstructor)(handlerContext); } await handlerInfo.Handler(handlerContext); } return((handlerContext ?? new CacheExpiredContext(context, 0, null)).GetHandlerResult()); }
public virtual Task OnExpired(CacheExpiredContext context) { return(Task.FromResult(true)); }
public CacheExpiredContext(CacheExpiredContext context) : base(context) { ExpiredUris = context.ExpiredUris; }