Refactor ActionService: DI, CancellationToken support
Refactored ActionService to use constructor injection for IRepository<History>. Updated all public methods to accept optional CancellationToken parameters for improved cancellation support. Added necessary using directives. Class remains a placeholder with [Obsolete] attributes and NotImplementedException.
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
using DigitalData.Core.Abstraction.Application.Repository;
|
||||||
using EnvelopeGenerator.Domain.Entities;
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.ServiceHost.Jobs;
|
namespace EnvelopeGenerator.ServiceHost.Jobs;
|
||||||
@@ -6,28 +7,28 @@ namespace EnvelopeGenerator.ServiceHost.Jobs;
|
|||||||
/// migrate from EnvelopeGenerator.CommonServices.Services.ActionService
|
/// migrate from EnvelopeGenerator.CommonServices.Services.ActionService
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Obsolete("This is a placeholder service added by copilot. Migrate the actual logic from CommonServices.Jobs")]
|
[Obsolete("This is a placeholder service added by copilot. Migrate the actual logic from CommonServices.Jobs")]
|
||||||
public class ActionService
|
public class ActionService(IRepository<History> histRepo)
|
||||||
{
|
{
|
||||||
[Obsolete("This is a placeholder service added by copilot. Migrate the actual logic from CommonServices.Jobs")]
|
[Obsolete("This is a placeholder service added by copilot. Migrate the actual logic from CommonServices.Jobs")]
|
||||||
public bool CreateReport(Envelope envelope)
|
public bool CreateReport(Envelope envelope, CancellationToken cancel = default)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
[Obsolete("This is a placeholder service added by copilot. Migrate the actual logic from CommonServices.Jobs")]
|
[Obsolete("This is a placeholder service added by copilot. Migrate the actual logic from CommonServices.Jobs")]
|
||||||
public bool FinalizeEnvelope(Envelope envelope)
|
public bool FinalizeEnvelope(Envelope envelope, CancellationToken cancel = default)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
[Obsolete("This is a placeholder service added by copilot. Migrate the actual logic from CommonServices.Jobs")]
|
[Obsolete("This is a placeholder service added by copilot. Migrate the actual logic from CommonServices.Jobs")]
|
||||||
public bool CompleteEnvelope(Envelope envelope)
|
public bool CompleteEnvelope(Envelope envelope, CancellationToken cancel = default)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
[Obsolete("This is a placeholder service added by copilot. Migrate the actual logic from CommonServices.Jobs")]
|
[Obsolete("This is a placeholder service added by copilot. Migrate the actual logic from CommonServices.Jobs")]
|
||||||
public bool CompleteEnvelope(Envelope envelope, Receiver receiver)
|
public bool CompleteEnvelope(Envelope envelope, Receiver receiver, CancellationToken cancel = default)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user