I have the following classes:
public class AllowanceManager : IAllowanceManager
{
public AllowanceManager(ITranslationManager t_Manager, ISessionManager s_Manager)
{...}
}
public class TranslationManager : ITranslationManager
{
public TranslationManager(string culture)
{...}
}
public class SessionManager : ISessionManager
{
public SessionManager(string key)
{...}
}
How to initialize these classes in ObjectFactory to get an instance of IAllowanceManager is also autwires and initializes (with constructor arguments) StateManager and TranslationManager. So I only need to restore the IAllowanceDeduction instance as follows:
IAllowanceManager a_Manager = ObjectFactory....// Gets Allowancemanager configured with initialized instances of IStateManager and ITranslationManager
source
share