Refactoring
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user