Refactoring

This commit is contained in:
Michael Schimmel
2025-06-03 18:20:02 +02:00
parent 561a3c6bb5
commit 556690fa5e
12 changed files with 152 additions and 155 deletions
+4 -5
View File
@@ -9,7 +9,7 @@ uses
type
IMycTaskManager = interface
// TOD Dokumentation
function CreateTask( const Gate: IMycState; const Proc: TProc ): TMycSubscription;
function CreateTask( const Gate: TState; const Proc: TProc ): TState.TSubscription;
// Waits for the operation associated with State to complete.
// Must not be called from a worker thread of this factory.
@@ -41,7 +41,7 @@ type
TMycTaskManagerMock = class(TInterfacedObject, IMycTaskManager)
public
// IMycTaskManager
function CreateTask(const Gate: IMycState; const Proc: TProc): TMycSubscription;
function CreateTask(const Gate: TState; const Proc: TProc): TState.TSubscription;
procedure WaitFor(State: IMycState);
constructor Create;
@@ -71,10 +71,9 @@ begin
inherited Create;
end;
function TMycTaskManagerMock.CreateTask(const Gate: IMycState; const Proc: TProc): TMycSubscription;
function TMycTaskManagerMock.CreateTask(const Gate: TState; const Proc: TProc): TState.TSubscription;
begin
var s: IMycState := TState(Gate);
Result := s.Subscribe( TMycExecMock.Create( Proc ) );
Result := Gate.Subscribe( TMycExecMock.Create( Proc ) );
end;
procedure TMycTaskManagerMock.WaitFor(State: IMycState);