Skip to main content

Motion Standalone Preprocessor C# library 2025 R2

Class Link<T, TUpdate, TDestroy, TOwnerDestroy\>

Last update: 16.07.2025

Namespace: VM.Managed
Assembly: VMAppCore.dll

This class is to represent the linked object relationship with its container object.

public class Link<t townerdestroy> : ITypedLink<t>, ILink, IChangeReference where TUpdate : struct, ILinkContainerEvent.ILinkEventBuilder where TDestroy : struct, ILinkContainerEvent.ILinkEventBuilder where TOwnerDestroy : struct, ILinkContainerEvent.ILinkEventBuilder

Type Parameters

T

TUpdate

TDestroy

TOwnerDestroy

Inheritance

objectLink

Implements

ITypedLink, ILink, IChangeReference

Extension Methods

LinkPropertyItemCache.GetLinkProperties(object, LinkPropertyType), LinkPropertyItemCache.GetLinkPropertiesAndValues(object, LinkPropertyType), LinkPropertyItemCache.GetLinkedObjects(object, LinkPropertyType)

Constructors

protected Link()

Initializes a new instance of the class.

public Link(ILinkContainer objParent)

Parameters

objParent ILinkContainer

The linked object's container object.

Initializes a new instance of the class.

public Link(ILinkContainer objParent, T obj)

Parameters

objParent ILinkContainer

The linked object's container object.

obj T

The linked object.

Link(SerializationInfo, StreamingContext)

protected Link(SerializationInfo info, StreamingContext context)

Parameters

info SerializationInfo

context StreamingContext

Fields

m_obj

protected ObjectEventCore m_obj

Field Value

ObjectEventCore

m_objLinkOwner

protected ILinkContainer m_objLinkOwner

Field Value

ILinkContainer

Properties

FullName

Gets the linked object's full name.

public string FullName { get; }

Property Value

string

IsReference

Gets a value indicating whether linked object is the reference.

public bool IsReference { get; }

Property Value

bool

LinkedObj

Gets the object container that has a relation with this.

override sealed ILinkContainer LinkedObj { get; }

Property Value

ILinkContainer

Name

Gets the linked object's name.

public string Name { get; }

Property Value

string

Object

Gets or sets the linked object.

public virtual T Object { get; set; }

Property Value

T

Prototype

Gets the linked object's prototype.

public T Prototype { get; }

Property Value

T

Methods

ClearBeforeDeserialize()

Disconnect the link relation before deserialize.

virtual void ClearBeforeDeserialize()

ClearBeforeSwap()

Disconnect the link relation before undo/redo.

virtual void ClearBeforeSwap()

DestroyObject(object, LinkEventArgs)

Destroy this link

virtual void DestroyObject(object objNotifier, LinkEventArgs arg)

Parameters

objNotifier object

The linked object.

arg LinkEventArgs

The instance containing the event data.

Dispose(bool)

protected virtual void Dispose(bool A_0)

Parameters

A_0 bool

Dispose()

destroy a instance of the class.

public override sealed void Dispose()

GetChilds(HashSet)

virtual void GetChilds(HashSet<ilinkcontainer> A_0)

Parameters

A_0 HashSet

GetFirstDesignEntities()

Get first design entities.

virtual IEnumerable<iobject> GetFirstDesignEntities()

Returns

IEnumerable

GetObjectData(SerializationInfo, StreamingContext)

virtual void GetObjectData(SerializationInfo info, StreamingContext __unnamed001)

Parameters

info SerializationInfo

__unnamed001 StreamingContext

RegisterEvent(bool)

protected virtual void RegisterEvent(bool bBackup)

Parameters

bBackup bool

Reserve(LinkEventArgs)

Reserve link.

virtual bool Reserve(LinkEventArgs args)

Parameters

args LinkEventArgs

The event argument.

Returns

bool

true if succeess to reserve, otherwise false.

SetModified()

set modified link for undo/redo

virtual void SetModified()

UnregisterEvent(bool)

protected virtual void UnregisterEvent(bool bBackup)

Parameters

bBackup bool

Operators

public static implicit operator Linker<t>(Link<t townerdestroy> lnk)

Parameters

lnk Link

Returns

Linker

Connect with Ansys