Skip to main content

IModel.FindOwnerByClass(string,bool) Method

Namespace: NextDesign.Core

Description

Gets the first owner instance of the specified class that holds this instance.

Traces the instances that own this instance toward the parent, and returns the first instance of the specified class found.
If no matching instance is found even after searching up to the top-level parent element, returns null.

Note that if the class specified in the class name is not found, returns null.
In addition, when performing a fuzzy match, if there are multiple matching classes, returns the instance of the first class found.

Arguments

NameTypeDescription
classNamestringClass name
Specify the name of the class or the fully qualified name.
If null or an empty string is specified, the return value of this method will be null.
fuzzyboolFuzzy match option
Whether to treat the className argument as the name of the class instead of the fully qualified name.
If False, it is evaluated as specifying a class whose fully qualified name matches className.
If True, it is evaluated as specifying a class whose class name matches className.

The default value is True.

Return value