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

# PrincipalReference

> A field value another principal of the read holds.

```csharp
public sealed record PrincipalReference : IEquatable<PrincipalReference>
```

**Implements:** `IEquatable<PrincipalReference>`

## Constructors

```csharp
public PrincipalReference(string Path, PrincipalKey Key, string TargetKeyName)
```

A field value another principal of the read holds.

### Parameters

**Path** `string` *required*

Where it goes, as a JSON Pointer into the fields.

**Key** `PrincipalKey` *required*

The key of the principal holding it.

**TargetKeyName** `string` *required*

The name that principal holds it under.

## Properties

**Key** `PrincipalKey` *required*

The key of the principal holding it.

**Object** `string`

The manifest object the value is a link to, or [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when it is a plain value.

**Path** `string` *required*

Where it goes, as a JSON Pointer into the fields.

**TargetKeyName** `string` *required*

The name that principal holds it under.

## Methods

### Deconstruct()

```csharp
public void Deconstruct(out string Path, out PrincipalKey Key, out string TargetKeyName)
```

#### Parameters

**Path** `string` *required*

**Key** `PrincipalKey` *required*

**TargetKeyName** `string` *required*

### Equals()

```csharp
public bool Equals(PrincipalReference? other)
```

#### Parameters

**other** `PrincipalReference` *required*

#### Returns

`bool`

```csharp
public override bool Equals(object? obj)
```

#### Parameters

**obj** `object` *required*

#### Returns

`bool`

### GetHashCode()

```csharp
public override int GetHashCode()
```

#### Returns

`int`

### IdOf()

```csharp
public static PrincipalReference IdOf(string path, PrincipalKey key)
```

Refers to the id of another principal.

#### Parameters

**path** `string` *required*

**key** `PrincipalKey` *required*

#### Returns

`PrincipalReference`

### KeyOf()

```csharp
public static PrincipalReference KeyOf(string path, string keyName, PrincipalKey key)
```

Refers to another principal's named key.

#### Parameters

**path** `string` *required*

**keyName** `string` *required*

**key** `PrincipalKey` *required*

#### Returns

`PrincipalReference`

### LinkTo()

```csharp
public static PrincipalReference LinkTo(string path, string linked, PrincipalKey key)
```

Links to another principal, which is an object of `linked`.

#### Parameters

**path** `string` *required*

**linked** `string` *required*

**key** `PrincipalKey` *required*

#### Returns

`PrincipalReference`

### operator !=()

```csharp
public static bool operator !=(PrincipalReference? left, PrincipalReference? right)
```

#### Parameters

**left** `PrincipalReference` *required*

**right** `PrincipalReference` *required*

#### Returns

`bool`

### operator ==()

```csharp
public static bool operator ==(PrincipalReference? left, PrincipalReference? right)
```

#### Parameters

**left** `PrincipalReference` *required*

**right** `PrincipalReference` *required*

#### Returns

`bool`

### ToString()

```csharp
public override string ToString()
```

#### Returns

`string`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.