Open bruno-brant opened 4 years ago
Workbench seems to be responsible for calling Initialize on each service it provides, as it can be seen from the method GetRegisteredService:
GetRegisteredService
https://github.com/Avanade/Liquid-Application-Framework/blob/8f03b94252db859c61992662bc7c84fced8fee64/src/Liquid.Base/WorkBench.cs#L93-L99
However, for some reason, there's a very similar method called GetService that doesn't call initialization, and that method is the one used by the public static properties like Telemetry, Repository, etc.
GetService
Telemetry
Repository
https://github.com/Avanade/Liquid-Application-Framework/blob/8f03b94252db859c61992662bc7c84fced8fee64/src/Liquid.Base/WorkBench.cs#L108-L118
This can lead to some bugs.
Workbench seems to be responsible for calling Initialize on each service it provides, as it can be seen from the method
GetRegisteredService
:https://github.com/Avanade/Liquid-Application-Framework/blob/8f03b94252db859c61992662bc7c84fced8fee64/src/Liquid.Base/WorkBench.cs#L93-L99
However, for some reason, there's a very similar method called
GetService
that doesn't call initialization, and that method is the one used by the public static properties likeTelemetry
,Repository
, etc.https://github.com/Avanade/Liquid-Application-Framework/blob/8f03b94252db859c61992662bc7c84fced8fee64/src/Liquid.Base/WorkBench.cs#L108-L118
This can lead to some bugs.