# InMemoryToolAuthenticationProbeStore

Thread-safe in-memory probe store suitable for host-local execution.

Class 

`IntelligenceX.Tools`

**Namespace**

`IntelligenceX.Tools`

**Assembly**

`IntelligenceX`

**Source**

[ToolAuthenticationProbeStore.cs:73](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Tools/ToolAuthenticationProbeStore.cs#L73)

**Implements**

`IToolAuthenticationProbeStore`

**Modifiers**

sealed

Thread-safe in-memory probe store suitable for host-local execution.

## Inheritance

- object
- InMemoryToolAuthenticationProbeStore

Filter members 

Show inherited

## Constructors

`public InMemoryToolAuthenticationProbeStore(int maxRecords = 1000, TimeSpan? maxRecordAge = null, Func<DateTimeOffset>? utcNowProvider = null)` [#](#constructor-ctor-int32-nullable-system-timespan-func-system-datetimeoffset)

[ToolAuthenticationProbeStore.cs:73](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Tools/ToolAuthenticationProbeStore.cs#L73)

Initializes a new instance of the [InMemoryToolAuthenticationProbeStore](/api/intelligencex-tools-inmemorytoolauthenticationprobestore/) class.

Parameters

**maxRecords int = 1000 optional**

Maximum number of records retained in memory.

**maxRecordAge System.TimeSpan? = null optional**

Maximum age for retained records.

**utcNowProvider System.Func<System.DateTimeOffset>? = null optional**

Optional UTC clock provider used for retention checks.

Exceptions

- `ArgumentOutOfRangeException` – Thrown when maxRecords or maxRecordAge is invalid.

## Methods

`public bool TryGet(string probeId, out ToolAuthenticationProbeRecord record)` [#](#method-tryget-string-intelligencex-tools-toolauthenticationproberecord)

[ToolAuthenticationProbeStore.cs:119](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Tools/ToolAuthenticationProbeStore.cs#L119)

Looks up a probe record by id.

Parameters

**probeId string required**

Probe identifier.

**record IntelligenceX.Tools.ToolAuthenticationProbeRecord required**

Resolved record when found.

Returns

`bool` True when record exists.

`public void Upsert(ToolAuthenticationProbeRecord record)` [#](#method-upsert-intelligencex-tools-toolauthenticationproberecord)

[ToolAuthenticationProbeStore.cs:106](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Tools/ToolAuthenticationProbeStore.cs#L106)

Inserts or replaces a probe record.

Parameters

**record IntelligenceX.Tools.ToolAuthenticationProbeRecord required**

Probe record to persist.

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

<!-- PowerForge markdown artifact sha256:674E25B72209E5F6657CB87A4483451CC0B845E1A1D163EFD98341AB3488799B -->
