Clean up and add more comments (#2)

This commit is contained in:
Peder Holdgaard Pedersen 2025-01-02 19:02:24 +01:00 • committed by GitHub
commit 9a244f5770
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -37,48 +37,3 @@ public record Resource
[JsonPropertyName("annotations")]
public Annotations? Annotations { get; init; }
}
/// <summary>
/// Interface for resource contents.
/// </summary>
public interface IResourceContents
{
string Uri { get; }
string? MimeType { get; }
}
/// <summary>
/// Represents text-based resource contents.
/// </summary>
public record TextResourceContents : IResourceContents
{
[JsonPropertyName("uri")]
public required string Uri { get; init; }
[JsonPropertyName("mimeType")]
public string? MimeType { get; init; }
/// <summary>
/// The text content of the resource.
/// </summary>
[JsonPropertyName("text")]
public required string Text { get; init; }
}
/// <summary>
/// Represents binary resource contents.
/// </summary>
public record BlobResourceContents : IResourceContents
{
[JsonPropertyName("uri")]
public required string Uri { get; init; }
[JsonPropertyName("mimeType")]
public string? MimeType { get; init; }
/// <summary>
/// The base64-encoded binary content of the resource.
/// </summary>
[JsonPropertyName("blob")]
public required string Blob { get; init; }
}