using System.Collections.Generic;
using System.IO;
using Elsa.IO.Extensions;
namespace Elsa.IO.Models;
///
/// Represents normalized binary content with metadata.
///
public class BinaryContent
{
///
/// Gets or sets the name of the content.
///
public string? Name { get; set; }
///
/// Gets the content type (MIME type) based on file extension.
///
public string? ContentType => !string.IsNullOrWhiteSpace(Name)
? Path.GetExtension(Name).GetContentTypeFromExtension()
: null;
///
/// Gets or sets optional metadata headers.
///
public IDictionary Headers { get; set; } = new Dictionary();
///
/// Gets or sets the content stream.
///
public Stream Stream { get; init; } = null!;
}