Click or drag to resize

ObjectWithExternalInterfaceHasInterfaceClassReference(IObjectWithExternalInterface, InterfaceFamilyType, Boolean) Method

Determines whether an object with ExternalInterfaces has an associated reference to the specified InterfaceClass. If inheritance relations between InterfaceClasses should be regarded, the optional parameter 'regardInheritance' should be set. In this case the specified InterfaceClass is either identical to a referenced InterfaceClass or a referenced InterfaceClass is derived from the specified InterfaceClass.

Namespace: Aml.Engine.CAEX.Extensions
Assembly: Aml.Engine (in Aml.Engine.dll) Version: 3.2
Syntax
public static bool HasInterfaceClassReference(
	this IObjectWithExternalInterface objectWithExternalInterface,
	InterfaceFamilyType interfaceClass,
	bool regardInheritance = false
)

Parameters

objectWithExternalInterface  IObjectWithExternalInterface
the CAEX object with external interfaces
interfaceClass  InterfaceFamilyType
The InterfaceClass object.
regardInheritance  Boolean  (Optional)
if set to true inheritance relations are regarded (default is false).

Return Value

Boolean
true if this CAEX Element object has an associated reference to the specified InterfaceClass; otherwise, false.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IObjectWithExternalInterface. 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).
Exceptions
ExceptionCondition
ArgumentNullExceptionInterfaceClass
Example
This sample shows how to call the HasInterfaceClassReference(IObjectWithExternalInterface, InterfaceFamilyType, Boolean) method using a standard base InterfaceClass from the InterfaceClassLib(CAEXDocument)
C#
var amlInterfaceClassLib = AutomationMLInterfaceClassLibType.InterfaceClassLib (myDocument);
InternalElementType internalElement;
...
internalElement.HasInterfaceClassReference (amlInterfaceClassLib.COLLADAInterface);
See Also