> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

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

Namespace: [VM.Managed](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed)\
Assembly: VMAppCore.dll

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

```csharp theme={null}
public class Link<T, TUpdate, TDestroy, 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

[object](https://learn.microsoft.com/dotnet/api/system.object) ←
[Link\<T, TUpdate, TDestroy, TOwnerDestroy>](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.Link-4.md)

#### Implements

[ITypedLink\<T>](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.ITypedLink-1.md),
[ILink](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.ILink.md),
[IChangeReference](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.IChangeReference.md)

#### Extension Methods

[LinkPropertyItemCache.GetLinkProperties(object, LinkPropertyType)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkProperties_System_Object_VM_Models_Pre_LinkPropertyType_),
[LinkPropertyItemCache.GetLinkPropertiesAndValues(object, LinkPropertyType)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkPropertiesAndValues_System_Object_VM_Models_Pre_LinkPropertyType_),
[LinkPropertyItemCache.GetLinkedObjects\<T>(object, LinkPropertyType)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkedObjects__1_System_Object_VM_Models_Pre_LinkPropertyType_)

## Constructors

### Link()

```csharp theme={null}
protected Link()
```

### Link(ILinkContainer)

Initializes a new instance of the Link\`4 class.

```csharp theme={null}
public Link(ILinkContainer objParent)
```

#### Parameters

`objParent` ILinkContainer

The linked object's container object.

### Link(ILinkContainer, T)

Initializes a new instance of the Link\`4 class.

```csharp theme={null}
public Link(ILinkContainer objParent, T obj)
```

#### Parameters

`objParent` ILinkContainer

The linked object's container object.

`obj` T

The linked object.

### Link(SerializationInfo, StreamingContext)

```csharp theme={null}
protected Link(SerializationInfo info, StreamingContext context)
```

#### Parameters

`info` [SerializationInfo](https://learn.microsoft.com/dotnet/api/system.runtime.serialization.serializationinfo)

`context` [StreamingContext](https://learn.microsoft.com/dotnet/api/system.runtime.serialization.streamingcontext)

## Fields

### m\_obj

```csharp theme={null}
protected ObjectEventCore m_obj
```

#### Field Value

[ObjectEventCore](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.ObjectEventCore.md)

### m\_objLinkOwner

```csharp theme={null}
protected ILinkContainer m_objLinkOwner
```

#### Field Value

ILinkContainer

## Properties

### FullName

Gets the linked object's full name.

```csharp theme={null}
public string FullName { get; }
```

#### Property Value

[string](https://learn.microsoft.com/dotnet/api/system.string)

### IsReference

Gets a value indicating whether linked object is the reference.

```csharp theme={null}
public bool IsReference { get; }
```

#### Property Value

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### LinkedObj

Gets the object container that has a relation with this.

```csharp theme={null}
override sealed ILinkContainer LinkedObj { get; }
```

#### Property Value

ILinkContainer

### Name

Gets the linked object's name.

```csharp theme={null}
public string Name { get; }
```

#### Property Value

[string](https://learn.microsoft.com/dotnet/api/system.string)

### Object

Gets or sets the linked object.

```csharp theme={null}
public virtual T Object { get; set; }
```

#### Property Value

T

### Prototype

Gets the linked object's prototype.

```csharp theme={null}
public T Prototype { get; }
```

#### Property Value

T

## Methods

### ClearBeforeDeserialize()

Disconnect the link relation before deserialize.

```csharp theme={null}
virtual void ClearBeforeDeserialize()
```

### ClearBeforeSwap()

Disconnect the link relation before undo/redo.

```csharp theme={null}
virtual void ClearBeforeSwap()
```

### DestroyObject(object, LinkEventArgs)

Destroy this link

```csharp theme={null}
virtual void DestroyObject(object objNotifier, LinkEventArgs arg)
```

#### Parameters

`objNotifier` [object](https://learn.microsoft.com/dotnet/api/system.object)

The linked object.

`arg` [LinkEventArgs](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.LinkEventArgs.md)

The [LinkEventArgs](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.LinkEventArgs.md) instance containing the event data.

### Dispose(bool)

```csharp theme={null}
protected virtual void Dispose(bool A_0)
```

#### Parameters

`A_0` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### Dispose()

destroy a instance of the Link\`4 class.

```csharp theme={null}
public override sealed void Dispose()
```

### GetChilds(HashSet\<ILinkContainer>)

```csharp theme={null}
virtual void GetChilds(HashSet<ILinkContainer> A_0)
```

#### Parameters

`A_0` [HashSet](https://learn.microsoft.com/dotnet/api/system.collections.generic.hashset-1)\<ILinkContainer>

### GetFirstDesignEntities()

Get first design entities.

```csharp theme={null}
virtual IEnumerable<IObject> GetFirstDesignEntities()
```

#### Returns

[IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)\<IObject>

### GetObjectData(SerializationInfo, StreamingContext)

```csharp theme={null}
virtual void GetObjectData(SerializationInfo info, StreamingContext __unnamed001)
```

#### Parameters

`info` [SerializationInfo](https://learn.microsoft.com/dotnet/api/system.runtime.serialization.serializationinfo)

`__unnamed001` [StreamingContext](https://learn.microsoft.com/dotnet/api/system.runtime.serialization.streamingcontext)

### RegisterEvent(bool)

```csharp theme={null}
protected virtual void RegisterEvent(bool bBackup)
```

#### Parameters

`bBackup` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### Reserve(LinkEventArgs)

Reserve link.

```csharp theme={null}
virtual bool Reserve(LinkEventArgs args)
```

#### Parameters

`args` [LinkEventArgs](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.LinkEventArgs.md)

The event argument.

#### Returns

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

true if succeess to reserve, otherwise false.

### SetModified()

set modified link for undo/redo

```csharp theme={null}
virtual void SetModified()
```

### UnregisterEvent(bool)

```csharp theme={null}
protected virtual void UnregisterEvent(bool bBackup)
```

#### Parameters

`bBackup` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

## Operators

### implicit operator Linker\<T>(Link\<T, TUpdate, TDestroy, TOwnerDestroy>)

```csharp theme={null}
public static implicit operator Linker<T>(Link<T, TUpdate, TDestroy, TOwnerDestroy> lnk)
```

#### Parameters

`lnk` [Link](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.Link-4.md)\<T, TUpdate, TDestroy, TOwnerDestroy>

#### Returns

[Linker](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.Linker-1.md)\<T>
