# RunEventDraft

> Tracon documentation. Tracon is a .NET package family that adds a control
> plane on Microsoft Agent Framework, published as NuGet packages that run
> inside your own ASP.NET Core application.
>
> Page: https://tracon.dev/api/tracon.runeventdraft/
> Summary: RunEventDraft: Represents the information an event carries before its sequence number and timestamp are assigned.

<div class="api-provenance">Namespace Tracon · Assembly <code>Tracon.Core.dll</code></div>

Represents the information an event carries before its sequence number and
timestamp are assigned.

```csharp
public readonly struct RunEventDraft : IEquatable<RunEventDraft>
```

<dl class="api-relations"><dt>Implements</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.iequatable-1">IEquatable&lt;RunEventDraft&gt;</a></dd><dt>Inherited Members</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a></dd></dl>

## Constructors

### <a id="Tracon_RunEventDraft__ctor_Tracon_RunEventType_"></a> RunEventDraft\(RunEventType\)

Represents the information an event carries before its sequence number and
timestamp are assigned.

```csharp
public RunEventDraft(RunEventType Type)
```

#### Parameters

`Type` [RunEventType](/api/tracon.runeventtype/)

The event type.

## Properties

### <a id="Tracon_RunEventDraft_CustomType"></a> CustomType

Gets the namespaced type that qualifies a [RunEventType.Custom](/api/tracon.runeventtype/)
event.

```csharp
public string? CustomType { get; init; }
```

#### Property Value

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

Required when [RunEventDraft.Type](/api/tracon.runeventdraft/#Tracon_RunEventDraft_Type) is [RunEventType.Custom](/api/tracon.runeventtype/);
must be [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) otherwise. 1-128 characters: lowercase
ASCII letters, digits, `.`, `_`, or `-`, starting with a
letter or digit — the same shape as a job handler key. The
`"tracon."` prefix is reserved; pick your own namespace
(e.g. `"contoso.preview-ready"`). [RunEventWriter.AppendAsync](/api/tracon.runeventwriter/#Tracon_RunEventWriter_AppendAsync_Tracon_RunEventDraft_System_Threading_CancellationToken_)
throws [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) for a draft that violates either rule.

### <a id="Tracon_RunEventDraft_Payload"></a> Payload

Gets the free-form JSON payload.

```csharp
public string? Payload { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)?

### <a id="Tracon_RunEventDraft_Text"></a> Text

Gets the text content.

```csharp
public string? Text { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)?

### <a id="Tracon_RunEventDraft_ToolCallId"></a> ToolCallId

Gets the tool call identity.

```csharp
public string? ToolCallId { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)?

### <a id="Tracon_RunEventDraft_ToolName"></a> ToolName

Gets the tool name.

```csharp
public string? ToolName { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)?

### <a id="Tracon_RunEventDraft_Type"></a> Type

The event type.

```csharp
public RunEventType Type { get; init; }
```

#### Property Value

 [RunEventType](/api/tracon.runeventtype/)

## Methods

### <a id="Tracon_RunEventDraft_Deconstruct_Tracon_RunEventType__"></a> Deconstruct\(out RunEventType\)

```csharp
public void Deconstruct(out RunEventType Type)
```

#### Parameters

`Type` [RunEventType](/api/tracon.runeventtype/)

### <a id="Tracon_RunEventDraft_Equals_System_Object_"></a> Equals\(object\)

```csharp
public override bool Equals(object obj)
```

#### Parameters

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

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_RunEventDraft_Equals_Tracon_RunEventDraft_"></a> Equals\(RunEventDraft\)

```csharp
public bool Equals(RunEventDraft other)
```

#### Parameters

`other` [RunEventDraft](/api/tracon.runeventdraft/)

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_RunEventDraft_GetHashCode"></a> GetHashCode\(\)

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

 [int](https://learn.microsoft.com/dotnet/api/system.int32)

### <a id="Tracon_RunEventDraft_ToString"></a> ToString\(\)

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

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

### <a id="Tracon_RunEventDraft_op_Equality_Tracon_RunEventDraft_Tracon_RunEventDraft_"></a> operator ==\(RunEventDraft, RunEventDraft\)

```csharp
public static bool operator ==(RunEventDraft left, RunEventDraft right)
```

#### Parameters

`left` [RunEventDraft](/api/tracon.runeventdraft/)

`right` [RunEventDraft](/api/tracon.runeventdraft/)

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_RunEventDraft_op_Inequality_Tracon_RunEventDraft_Tracon_RunEventDraft_"></a> operator \!=\(RunEventDraft, RunEventDraft\)

```csharp
public static bool operator !=(RunEventDraft left, RunEventDraft right)
```

#### Parameters

`left` [RunEventDraft](/api/tracon.runeventdraft/)

`right` [RunEventDraft](/api/tracon.runeventdraft/)

#### Returns

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