Skip to content

AttachmentUriReference

Namespace AgentPrism · Assembly AgentPrism.Core.dll

Converts an attachment to a AI.UriContent reference and resolves that reference back.

public static class AttachmentUriReference

objectAttachmentUriReference

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Recognition only checks the /api/attachments/{id} route. It does not need to know the path prefix, {prefix}, and recognizes relative and absolute URIs. This keeps AgentPrism.Core fully independent from endpoint configuration.

Converts an attachment identifier to its reference URI.

public static Uri Create(string prefix, Guid attachmentId)

prefix string

The path prefix for AgentPrism endpoints, for example /agentprism.

attachmentId Guid

The attachment identifier.

Uri

A relative URI.

Determines whether a URI is an attachment reference and extracts its identifier.

public static bool TryParse(Uri uri, out Guid attachmentId)

uri Uri

The URI to inspect.

attachmentId Guid

The attachment identifier when found.

bool

true if the URI is an attachment reference.