More abstractions
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Wino.Core.Integration
|
||||
{
|
||||
public abstract class BaseCalendarIntegrator<TNativeRequestType, TCalendarEventType>
|
||||
{
|
||||
public abstract Task<TCalendarEventType> CreateCalendarEventAsync(TNativeRequestType request);
|
||||
}
|
||||
}
|
||||
12
Wino.Core/Synchronizers/BaseCalendarSynchronizer.cs
Normal file
12
Wino.Core/Synchronizers/BaseCalendarSynchronizer.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using Wino.Core.Domain.Entities.Shared;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
|
||||
namespace Wino.Core.Synchronizers
|
||||
{
|
||||
public abstract class BaseCalendarSynchronizer<TBaseRequest, TMessageType> : BaseSynchronizer<TBaseRequest>, IBaseCalendarSynchronizer
|
||||
{
|
||||
protected BaseCalendarSynchronizer(MailAccount account) : base(account)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ using Wino.Messaging.UI;
|
||||
|
||||
namespace Wino.Core.Synchronizers
|
||||
{
|
||||
public abstract class BaseSynchronizer<TBaseRequest>
|
||||
public abstract class BaseSynchronizer<TBaseRequest> : IBaseSynchronizer
|
||||
{
|
||||
protected SemaphoreSlim synchronizationSemaphore = new(1);
|
||||
protected CancellationToken activeSynchronizationCancellationToken;
|
||||
@@ -38,7 +38,6 @@ namespace Wino.Core.Synchronizers
|
||||
Account = account;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Queues a single request to be executed in the next synchronization.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
using Wino.Core.Integration;
|
||||
|
||||
namespace Wino.Core.Synchronizers.Calendar
|
||||
{
|
||||
public abstract class BaseCalendarSynchronizer<TNativeRequestType, TCalendarEventType> : BaseCalendarIntegrator<TNativeRequestType, TCalendarEventType>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,21 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Graph.Models;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using Wino.Core.Domain.Entities.Shared;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
|
||||
namespace Wino.Core.Synchronizers.Calendar
|
||||
{
|
||||
public class OutlookCalendarSynchronizer : BaseCalendarSynchronizer<RequestInformation, Event>
|
||||
public class OutlookCalendarSynchronizer : BaseSynchronizer<RequestInformation>
|
||||
{
|
||||
public OutlookCalendarSynchronizer(MailAccount account)
|
||||
public OutlookCalendarSynchronizer(MailAccount account) : base(account)
|
||||
{
|
||||
Account = account;
|
||||
}
|
||||
|
||||
public MailAccount Account { get; }
|
||||
|
||||
public override Task<Event> CreateCalendarEventAsync(RequestInformation request)
|
||||
public override Task ExecuteNativeRequestsAsync(List<IRequestBundle<RequestInformation>> batchedRequests, CancellationToken cancellationToken = default)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user