using System; using System.IO; using Artemis.Core.JsonConverters; using Artemis.Storage.Entities.Profile; using Newtonsoft.Json; namespace Artemis.Core { /// /// A model that can be used to serialize a profile configuration, it's profile and it's icon /// public class ProfileConfigurationExportModel : IDisposable { /// /// Gets or sets the storage entity of the profile configuration /// public ProfileConfigurationEntity? ProfileConfigurationEntity { get; set; } /// /// Gets or sets the storage entity of the profile /// [JsonProperty(Required = Required.Always)] public ProfileEntity ProfileEntity { get; set; } = null!; /// /// Gets or sets a stream containing the profile image /// [JsonConverter(typeof(StreamConverter))] public Stream? ProfileImage { get; set; } /// public void Dispose() { ProfileImage?.Dispose(); } } }