Separation of messages. Introducing Wino.Messages library.

This commit is contained in:
Burak Kaan Köse
2024-07-16 14:56:46 +02:00
parent 76375c9471
commit 3b8454269e
60 changed files with 505 additions and 120 deletions

View File

@@ -1,10 +0,0 @@
namespace Wino.Core.Domain.Models.Requests
{
/// <summary>
/// Interface for all messages to report UI changes from synchronizers to UI.
/// None of these messages can't run a code that manipulates database.
/// They are sent either from processor or view models to signal some other
/// parts of the application.
/// </summary>
public interface IUIMessage;
}

View File

@@ -1,15 +0,0 @@
using System;
using Wino.Core.Domain.Enums;
using Wino.Core.Domain.Models.MailItem;
namespace Wino.Core.Domain.Models.Requests
{
/// <summary>
/// Defines a single rule for toggling user actions if needed.
/// For example: If user wants to mark a mail as read, but it's already read, then it should be marked as unread.
/// </summary>
/// <param name="SourceAction"></param>
/// <param name="TargetAction"></param>
/// <param name="Condition"></param>
public record ToggleRequestRule(MailOperation SourceAction, MailOperation TargetAction, Func<IMailItem, bool> Condition);
}

View File

@@ -1,9 +0,0 @@
namespace Wino.Core.Domain.Models.Requests
{
// Used to pass messages from the webview to the app.
public class WebViewMessage
{
public string type { get; set; }
public string value { get; set; }
}
}