Skip to main content

IModel.As(IPackage,string,bool) Method

Namespace: NextDesign.Core

Description

Checks whether this instance is compatible with the specified class type.
The specified class is identified from the package specified by the scope.
Returns True if this instance is an instance of the specified class or its subclass.

See the IModel description for how to specify the class name and the fuzzy match option.

Arguments

NameTypeDescription
scopeIPackageScope (Package that is the base of the search range)
classNamestringClass name
Specify the name or fully qualified name of the class.
If null or an empty string is specified, this method will evaluate to False.
If a class with the specified name cannot be found, this method will evaluate to False.
fuzzyboolFuzzy match option
Whether to treat the className argument as the name of a class rather than a fully qualified name.
If False, it will be evaluated as specifying a class whose fully qualified name matches className.
If True, it will be evaluated as specifying a class whose class name matches className.
If multiple matches are found, this method will evaluate to True if the instance is any one of them.

The default value is True.

Return value

  • bool