# TraconContentGuardOptions

> 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.traconcontentguardoptions/
> Summary: TraconContentGuardOptions: Settings for the content inspection pipeline.

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

Settings for the content inspection pipeline.

```csharp
public sealed class TraconContentGuardOptions
```

<dl class="api-relations"><dt>Inheritance</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object">object</a> ← <a href="/api/tracon.traconcontentguardoptions/">TraconContentGuardOptions</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>

## Remarks

Read from the `Tracon:ContentGuard` configuration section.

None of the settings in this class **have any effect while no guard
is registered**: the inspection wrapper is not added to the pipeline and
this object is never read. The gate is not a flag, it
*is* the registration itself — the built-in guard is added by an
explicit choice, either via `AddPatternContentGuard` or by populating
the `Tracon:ContentGuard:Pattern` section.

## Constructors

### <a id="Tracon_TraconContentGuardOptions__ctor"></a> TraconContentGuardOptions\(\)

```csharp
public TraconContentGuardOptions()
```

## Fields

### <a id="Tracon_TraconContentGuardOptions_SectionName"></a> SectionName

The configuration section name.

```csharp
public const string SectionName = "Tracon:ContentGuard"
```

#### Field Value

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

### <a id="Tracon_TraconContentGuardOptions_BufferStreamingOutput"></a> BufferStreamingOutput

While output inspection is on, the streaming response is
**buffered**. Default [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool).

```csharp
public bool BufferStreamingOutput { get; set; }
```

#### Property Value

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

A frame cannot be recalled once it has been sent to the client. A pattern
does not match on a partial piece of text: `4539-` is seen and passes
through before the card number is complete. Buffering costs the
liveliness of the stream but inspects correctly.

Setting this to [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) leaves output inspection
*half done*: the guard only ever sees each frame on its own.
Silently doing half an inspection is worse than doing none — the user
believes they are protected. That is why the choice is an explicit
setting, not a hidden behavior.

### <a id="Tracon_TraconContentGuardOptions_InspectInput"></a> InspectInput

Inspects content sent to the model. Default [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool).

```csharp
public bool InspectInput { get; set; }
```

#### Property Value

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

Tool results are covered too: a tool result enters the model on the
*second* call and is seen because inspection sits at the
`IChatClient` layer.

### <a id="Tracon_TraconContentGuardOptions_InspectOutput"></a> InspectOutput

Inspects content coming from the model. Default [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool).

```csharp
public bool InspectOutput { get; set; }
```

#### Property Value

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