AttachmentUriReference
AgentPrism.Core.dllConverts an attachment to a AI.UriContent
reference and resolves that reference back.
public static class AttachmentUriReferenceInheritance
Section titled “Inheritance”object ← AttachmentUriReference
Inherited Members
Section titled “Inherited Members”object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”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.
Methods
Section titled “Methods”Create(string, Guid)
Section titled “ Create(string, Guid)”Converts an attachment identifier to its reference URI.
public static Uri Create(string prefix, Guid attachmentId)Parameters
Section titled “Parameters”prefix string
The path prefix for AgentPrism endpoints, for example /agentprism.
attachmentId Guid
The attachment identifier.
Returns
Section titled “Returns”Uri
A relative URI.
TryParse(Uri, out Guid)
Section titled “ TryParse(Uri, out Guid)”Determines whether a URI is an attachment reference and extracts its identifier.
public static bool TryParse(Uri uri, out Guid attachmentId)Parameters
Section titled “Parameters”uri Uri
The URI to inspect.
attachmentId Guid
The attachment identifier when found.
Returns
Section titled “Returns”true if the URI is an attachment reference.