Click or drag to resize

RegistrationOptionsExtensionsHasOption Method

Tests whether a given flag (or combined set of flags) is present in the specified options enumeration.

Namespace:  Autofac.Core.Registration
Assembly:  Autofac (in Autofac.dll) Version: 6.0.0+39696a967e8826f7f1ebc8c1ff4523c9dd75abe0
public static bool HasOption(
	this RegistrationOptions options,
	RegistrationOptions flag


Type: Autofac.Core.RegistrationRegistrationOptions
The option to test.
Type: Autofac.Core.RegistrationRegistrationOptions
The flag (or flags) to test for.

Return Value

Type: Boolean
True if the specified flag (or flags) are enabled for the registration.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type RegistrationOptions. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also