using DigitalData.Core.Contracts.Application; namespace DigitalData.Core.Application { /// /// Represents the outcome of a service operation, encapsulating the success or failure status, /// and any associated messages. /// public class ServiceMessage : IServiceMessage { /// /// Initializes a new instance of the ServiceMessage class with specified success status, and messages. /// /// Indicates whether the service operation was successful. /// The data associated with a successful operation. /// An array of messages related to the operation's outcome. public ServiceMessage(bool isSuccess, params string[] messages) { IsSuccess = isSuccess; Messages = messages.ToList(); } /// /// Gets or sets a value indicating whether the service operation was successful. /// public bool IsSuccess { get; set; } /// /// Gets or sets a collection of messages associated with the service operation. /// public List Messages { get; set; } = new List(); } }