/// <summary> /// /// </summary> /// <param name="context"></param> public void Start(IBundleContext context) { context.ServiceChanged += ContextOnServiceChanged; var serviceReference = context.GetServiceReference <IHelloWord>(); var service = context.GetService <IHelloWord>(serviceReference); log.Info(service.SayHi("BundleDemoB" + ReferenceClass.GetName())); var serviceRef1 = context.GetServiceReferences <IMutilImplement>(new Dictionary <string, object>() { { "id", "1" } }).FirstOrDefault(); var service1 = context.GetService <IMutilImplement>(serviceRef1); log.Info(service1.TestMethod()); var serviceRef2 = context.GetServiceReferences <IMutilImplement>(new Dictionary <string, object>() { { "id", "2" } }).FirstOrDefault(); var service2 = context.GetService <IMutilImplement>(serviceRef2); log.Info(service2.TestMethod()); var serviceRef3 = context.GetServiceReferences <IMutilImplement>(new Dictionary <string, object>() { { "id", "3" } }).FirstOrDefault(); var service3 = context.GetService <IMutilImplement>(serviceRef3); log.Info(service3.TestMethod()); }