using System.ComponentModel; using OliverBooth.Data; namespace OliverBooth.Services; /// /// Represents a service which communicates with the CDN server. /// public interface ICdnService { /// /// Asynchronously uploads a new asset to the CDN server. /// /// A stream containing the data to upload. /// The type of the asset. /// The URI of the newly-created asset. /// is . /// The is not readable. /// /// is not a valid . /// Task CreateAssetAsync(FileStream stream, CdnAssetType assetType); /// /// Asynchronously uploads a new asset to the CDN server. /// /// The filename of the asset. /// A stream containing the data to upload. /// The type of the asset. /// The URI of the newly-created asset. /// /// is . /// -or- /// is . /// /// /// is empty, or contains only whitespace. /// -or- /// The is not readable. /// /// /// is not a valid . /// Task CreateAssetAsync(string filename, Stream stream, CdnAssetType assetType); /// /// Gets the resolved asset URI for the specified date and filename. /// /// The date of the asset. /// The filename of the asset. /// The type of the asset. /// The resolved asset URI. /// is . /// /// is empty, or contains only whitespace. /// /// /// is not a valid . /// Uri GetUri(DateOnly date, string filename, CdnAssetType assetType); /// /// Gets the resolved asset URI for the specified date and filename. /// /// The date of the asset. /// The filename of the asset. /// The type of the asset. /// The resolved asset URI. /// is . /// /// is empty, or contains only whitespace. /// /// /// is not a valid . /// Uri GetUri(DateTimeOffset date, string filename, CdnAssetType assetType); }