You are not logged in.
Pages: 1
Is there any way to access dependency resolution on an object that has been resolved as a dependency?
In other words, the "resolver" to be passed at constructor of the injected objects.
IInjectedTestA = interface(IInvokable)
['{F06677DE-8781-479B-B40E-92B96E46799E}']
procedure TestA;
end;
IInjectedTestB = interface(IInvokable)
['{0FA0367B-67F7-45E2-9BDC-8DF14558C580}']
procedure TestBCallTestA;
end;
TInjectedTestA = class(TInterfacedObject, IInjectedTestA)
public
procedure TestA;
end;
TInjectedTestB = class(TInterfacedObject, IInjectedTestB)
public
procedure TestB;
procedure TestBCallTestA;
end;
procedure TInjectedTestB.TestB;
begin
ShowMessage('TestB');
end;
procedure TInjectedTestB.TestBCallTestA;
var
AInjected : IInjectedTestA;
begin
Resolve(TypeInfo(IInjectedTestA), AInjected); //<<< Are one Way to this?
AInjected.TestA.
end;
Offline
See https://synopse.info/files/html/Synopse … #TITLE_369
and the referring classes.
Offline
Thanks, for reply.
I are using this classes.
I thought there was some way to access the resolver (inside of an resolved object) without using RegisterGlobal.
Last edited by macfly (2018-07-06 13:28:48)
Offline
Pages: 1