Remove connection manager.

This commit is contained in:
Burak Kaan Köse
2025-10-03 21:55:23 +02:00
parent e42ebb49ae
commit accffe8ef6
26 changed files with 120 additions and 1091 deletions
@@ -30,11 +30,6 @@ public interface IPreferencesService : INotifyPropertyChanged
/// </summary>
bool IsNavigationPaneOpened { get; set; }
/// <summary>
/// Setting: Gets or sets what should happen to server app when the client is terminated.
/// </summary>
ServerBackgroundMode ServerTerminationBehavior { get; set; }
/// <summary>
/// Setting: Preferred time format for mail or calendar header display.
/// </summary>
@@ -1,11 +1,56 @@
using System;
using System.Threading;
using System.Threading.Tasks;
using Wino.Core.Domain.Enums;
using Wino.Core.Domain.Models.Server;
namespace Wino.Core.Domain.Interfaces;
/// <summary>
/// Simple wrapper class to maintain compatibility with the original WinoServerResponse structure.
/// </summary>
/// <typeparam name="T">Type of the expected response.</typeparam>
public class WinoServerResponse<T>
{
public bool IsSuccess { get; set; }
public string Message { get; set; }
public T Data { get; set; }
public static WinoServerResponse<T> CreateSuccessResponse(T data)
{
return new WinoServerResponse<T>
{
IsSuccess = true,
Data = data
};
}
public static WinoServerResponse<T> CreateErrorResponse(string message)
{
return new WinoServerResponse<T>
{
IsSuccess = false,
Message = message
};
}
public void ThrowIfFailed()
{
if (!IsSuccess)
throw new InvalidOperationException(Message);
}
}
/// <summary>
/// Connection status enum to maintain compatibility.
/// </summary>
public enum WinoServerConnectionStatus
{
None,
Connecting,
Connected,
Disconnected,
Failed
}
public interface IWinoServerConnectionManager
{
/// <summary>