Class Link<T, TUpdate, TDestroy, TOwnerDestroy\>
Last update: 16.07.2025Namespace: 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
Implements
ITypedLink
Extension Methods
LinkPropertyItemCache.GetLinkProperties(object, LinkPropertyType),
LinkPropertyItemCache.GetLinkPropertiesAndValues(object, LinkPropertyType),
LinkPropertyItemCache.GetLinkedObjects
Constructors
Link()
protected Link()
Link(ILinkContainer)
Initializes a new instance of the
public Link(ILinkContainer objParent)
Parameters
objParent ILinkContainer
The linked object's container object.
Link(ILinkContainer, T)
Initializes a new instance of the
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
m_objLinkOwner
protected ILinkContainer m_objLinkOwner
Field Value
ILinkContainer
Properties
FullName
Gets the linked object's full name.
public string FullName { get; }
Property Value
IsReference
Gets a value indicating whether linked object is the reference.
public bool IsReference { get; }
Property Value
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
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
Dispose(bool)
protected virtual void Dispose(bool A_0)
Parameters
A_0 bool
Dispose()
destroy a instance of the
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
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
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
implicit operator Linker(Link)
public static implicit operator Linker<t>(Link<t townerdestroy> lnk)
Parameters
lnk Link