private async Task LoadServices() { var services = Instatiate <IServicePlugin>(_pendingServices); foreach (var s in services) { if (await s.Initialize()) { s.Implements.ForEach(e => _injector.RegisterService(e, s.GetType(), s.LifeCycle)); _rip.Register(s.GetType(), true); _success.Add(s); _logger.Debug($"Service Plugin loaded: {s.Info.Name}"); } else { _failed.Add(s); _logger.Warning($"Failed to load Service Plugin: {s.Info.Name}"); } } }
public RemoteInterfaceProtocolPlugin(IInjectorService injector) : base(injector) { _rip = Injector.GetService <IRIPService>(); Injector.RegisterService <HelperService>(LifeCycle.Singleton); _rip.Register <HelperService>(); }