protected override async Task <HttpResponseMessage> SendAsync(EastFive.Api.HttpApplication httpApp, HttpRequestMessage request, CancellationToken cancellationToken, Func <HttpRequestMessage, CancellationToken, Task <HttpResponseMessage> > continuation)
        {
            if (!request.RequestUri.IsDefaultOrNull())
            {
                if (request.RequestUri.PathAndQuery.HasBlackSpace())
                {
                    if (request.RequestUri.PathAndQuery.Contains("apple-app-site-association"))
                    {
                        return(await continuation(request, cancellationToken));
                    }
                }
            }

            if (lookupSpaFile.IsDefaultNullOrEmpty())
            {
                return(await continuation(request, cancellationToken));
            }

            var    context  = httpApp.Context;
            string filePath = context.Request.FilePath;
            string fileName = VirtualPathUtility.GetFileName(filePath);

            if (!(httpApp is AzureApplication))
            {
                return(await continuation(request, cancellationToken));
            }

            if (lookupSpaFile.ContainsKey(fileName))
            {
                return(request.CreateContentResponse(lookupSpaFile[fileName],
                                                     fileName.EndsWith(".js")?
                                                     "text/javascript"
                        :
                                                     fileName.EndsWith(".css")?
                                                     "text/css"
                            :
                                                     request.Headers.Accept.Any()?
                                                     request.Headers.Accept.First().MediaType
                                :
                                                     string.Empty));
            }

            var requestStart = request.RequestUri.AbsolutePath.ToLower();

            if (!firstSegments
                .Where(firstSegment => requestStart.StartsWith($"/{firstSegment}"))
                .Any())
            {
                return(request.CreateHtmlResponse(EastFive.Azure.Properties.Resources.indexPage));
            }

            return(await continuation(request, cancellationToken));
        }
 protected virtual TResult InterceptResult <TResult>(
     HttpApplication httpApp, IHttpRequest request, ParameterInfo parameterInfo,
     TResult result)
 {
     return(result);
 }