Moved signal interfaces inside records
This commit is contained in:
@@ -9,14 +9,14 @@ uses
|
||||
type
|
||||
IMycTaskManager = interface
|
||||
// TOD Dokumentation
|
||||
function CreateTask(const Gate: TState; const Proc: TProc): TSubscription;
|
||||
function CreateTask(const Gate: TState; const Proc: TProc): TSignal.TSubscription;
|
||||
|
||||
// Waits for the operation associated with State to complete.
|
||||
// Must not be called from a worker thread of this factory.
|
||||
// After waiting, or if the state is already set, any first stored exception
|
||||
// from any worker thread of this factory will be re-raised in the calling (main) thread.
|
||||
// Raises ETaskException if called from within a worker thread.
|
||||
procedure WaitFor(State: IMycState);
|
||||
procedure WaitFor(State: TState.IState);
|
||||
end;
|
||||
|
||||
var
|
||||
@@ -41,8 +41,8 @@ type
|
||||
TMycTaskManagerMock = class(TInterfacedObject, IMycTaskManager)
|
||||
public
|
||||
// IMycTaskManager
|
||||
function CreateTask(const Gate: TState; const Proc: TProc): TSubscription;
|
||||
procedure WaitFor(State: IMycState);
|
||||
function CreateTask(const Gate: TState; const Proc: TProc): TSignal.TSubscription;
|
||||
procedure WaitFor(State: TState.IState);
|
||||
|
||||
constructor Create;
|
||||
end;
|
||||
@@ -72,12 +72,12 @@ begin
|
||||
inherited Create;
|
||||
end;
|
||||
|
||||
function TMycTaskManagerMock.CreateTask(const Gate: TState; const Proc: TProc): TSubscription;
|
||||
function TMycTaskManagerMock.CreateTask(const Gate: TState; const Proc: TProc): TSignal.TSubscription;
|
||||
begin
|
||||
Result := Gate.Subscribe(TMycExecMock.Create(Proc));
|
||||
end;
|
||||
|
||||
procedure TMycTaskManagerMock.WaitFor(State: IMycState);
|
||||
procedure TMycTaskManagerMock.WaitFor(State: TState.IState);
|
||||
begin
|
||||
Assert(State.IsSet);
|
||||
end;
|
||||
|
||||
Reference in New Issue
Block a user