Edit

Share via


ServiceProviderOptions.ValidateScopes Property

Definition

true to perform check verifying that scoped services never gets resolved from root provider; otherwise false. Defaults to false.

public:
 property bool ValidateScopes { bool get(); void set(bool value); };
public bool ValidateScopes { get; set; }
member this.ValidateScopes : bool with get, set
Public Property ValidateScopes As Boolean

Property Value

true if validation is performed to ensure that scoped services aren't resolved from the root provider; otherwise, false. The default is the value of IsDevelopment(IHostingEnvironment).

Applies to