Skip to content

IRequestCondition

Troy Willmot edited this page Sep 25, 2016 · 2 revisions

IRequestCondition

Summary

IRequestCondition is a common interface for conditional objects. Conditional objects are used with some handlers/filters to determine whether a particular request will be handled, by inspecting properties of the request and returning a boolean indicating what to do.

Custom request conditions can be built using this interface. However a number of conditional objects already exist, such as the AuthorityRequestCondition. For combining existing conditional objects together easily you can use the AndRequestCondition and OrRequestCondition.

Methods

ShouldProcess

bool ShouldProcess(System.Net.Http.HttpRequestMessage requestMessage)

This method returns a boolean indicating if the specified requestMessage should be handled (true if it should be handled, otherwise false). This method should be thread-safe in implementations.

Clone this wiki locally