Microsoft.ApplicationInsights.Web.RequestTrackingTelemetryModule.NeedProcessRequest C# (CSharp) Method

NeedProcessRequest() private method

Verifies context to detect whether or not request needs to be processed.
private NeedProcessRequest ( HttpContext httpContext ) : bool
httpContext System.Web.HttpContext Current http context.
return bool
        internal bool NeedProcessRequest(HttpContext httpContext)
        {
            if (httpContext == null)
            {
                WebEventSource.Log.NoHttpContextWarning();
                return false;
            }

            if (httpContext.Response.StatusCode < 400)
            {
                if (this.IsHandlerToFilter(httpContext.Handler))
                {
                    return false;
                }
            }

            return true;
        }

Usage Example

 public void NeedProcessRequestReturnsFalseOnNullHttpContext()
 {
     var module = new RequestTrackingTelemetryModule();
     {
         Assert.False(module.NeedProcessRequest(null));
     }
 }
All Usage Examples Of Microsoft.ApplicationInsights.Web.RequestTrackingTelemetryModule::NeedProcessRequest