Class FromRequestBindingSource
- Namespace
- Cratis.Applications.ModelBinding
- Assembly
- Cratis.Applications.dll
Represents a binding source for a binding type that allows an object to be bound in a combination of values on the HTTP body, route and querystring.
public class FromRequestBindingSource : BindingSource, IEquatable<BindingSource?>
- Inheritance
-
FromRequestBindingSource
- Implements
- Inherited Members
Constructors
FromRequestBindingSource()
Initializes a new instance of the FromRequestBindingSource class.
public FromRequestBindingSource()
Fields
FromRequest
Gets the FromRequestBindingSource singleton instance.
public static readonly BindingSource FromRequest
Field Value
Methods
CanAcceptDataFrom(BindingSource)
Gets a value indicating whether or not the BindingSource can accept
data from bindingSource
.
public override bool CanAcceptDataFrom(BindingSource bindingSource)
Parameters
bindingSource
BindingSourceThe BindingSource to consider as input.
Returns
- bool
True
if the source is compatible, otherwisefalse
.
Remarks
When using this method, it is expected that the left-hand-side is metadata specified on a property or parameter for model binding, and the right hand side is a source of data used by a model binder or value provider.
This distinction is important as the left-hand-side may be a composite, but the right may not.