feat: first take of adding caching support

This commit is contained in:
Stevan Freeborn
2024-08-15 23:04:45 -05:00
parent c0dec5f7de
commit ed97ea95dc
10 changed files with 293 additions and 46 deletions
@@ -33,4 +33,20 @@ public class ImageContent : Content
Source = new(mediaType, data);
}
/// <summary>
/// Initializes a new instance of the <see cref="ImageContent"/> class.
/// </summary>
/// <param name="mediaType">The media type of the image.</param>
/// <param name="data">The data of the image.</param>
/// <param name="cacheControl">The cache control to be used for the content.</param>
/// <returns>A new instance of the <see cref="ImageContent"/> class.</returns>
/// <exception cref="ArgumentNullException">Thrown when the media type, data, or cache control is null.</exception>
public ImageContent(string mediaType, string data, CacheControl cacheControl) : base(ContentType.Image, cacheControl)
{
ArgumentValidator.ThrowIfNull(mediaType, nameof(mediaType));
ArgumentValidator.ThrowIfNull(data, nameof(data));
Source = new(mediaType, data);
}
}