AgentClassSkill<TSelf>.GetResourceAsync Method

Definition

Gets a resource owned by this skill by name.

public override sealed System.Threading.Tasks.ValueTask<Microsoft.Agents.AI.AgentSkillResource?> GetResourceAsync(string name, System.Threading.CancellationToken cancellationToken = default);
override this.GetResourceAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<Microsoft.Agents.AI.AgentSkillResource>
Public Overrides NotOverridable Function GetResourceAsync (name As String, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of AgentSkillResource)

Parameters

name
String

The resource name (e.g. an identifier or a relative path referenced inside the skill content).

cancellationToken
CancellationToken

Cancellation token.

Returns

The AgentSkillResource, or null when no resource with the given name exists.

Applies to