 | InheritanceExtensionsCopyTreeAndChangeReferencesT Method |
Creates a copy of the source class and all its child classes and assigns the provided name to the copy.
Including references to objects in the original class tree are redirected to objects in the copied tree.
The copy is inserted into the provided parent object.
Namespace: Aml.Engine.CAEX.ExtensionsAssembly: Aml.Engine (in Aml.Engine.dll) Version: 3.2
Syntaxpublic static T CopyTreeAndChangeReferences<T>(
this IClassWithBaseClassReference<T> source,
CAEXObject parent,
string name
)
where T : CAEXObject
<ExtensionAttribute>
Public Shared Function CopyTreeAndChangeReferences(Of T As CAEXObject) (
source As IClassWithBaseClassReference(Of T),
parent As CAEXObject,
name As String
) As T
public:
[ExtensionAttribute]
generic<typename T>
where T : CAEXObject
static T CopyTreeAndChangeReferences(
IClassWithBaseClassReference<T>^ source,
CAEXObject^ parent,
String^ name
)
Parameters
- source IClassWithBaseClassReferenceT
- The source class to be copied
- parent CAEXObject
- The parent where the copy is appended
- name String
- The new name.
Type Parameters
- T
- caex object type of the copied class
Return Value
T
If the copy could be appended to the appropriate element collection of the parent, the
copied class with all child classes and redirected references;
otherwise
null.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IClassWithBaseClassReferenceT. 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