public void AddService(System.Type serviceType, System.ComponentModel.Design.ServiceCreatorCallback callback)
 {
     if (IsServiceMissing(serviceType))
     {
         serviceContainer.AddService(serviceType, callback);
     }
 }
 public void AddService(Type serviceType, System.ComponentModel.Design.ServiceCreatorCallback callback)
 {
     if (_services == null)
     {
         _services = new Dictionary <Type, object>();
     }
     if (!_services.ContainsKey(serviceType))
     {
         _services.Add(serviceType, Activator.CreateInstance(serviceType));
     }
 }
Ejemplo n.º 3
0
 public void AddService(Type serviceType, System.ComponentModel.Design.ServiceCreatorCallback callback, bool promote)
 {
     if (promote && parentServiceContainer != null)
     {
         parentServiceContainer.AddService(serviceType, callback, true);
     }
     else
     {
         localServiceTypes[serviceType.FullName] = serviceType;
         localServices[serviceType.FullName]     = callback;
     }
 }
Ejemplo n.º 4
0
 public void AddService(Type serviceType, System.ComponentModel.Design.ServiceCreatorCallback callback)
 {
     serviceContainer.AddService(serviceType, callback);
 }
Ejemplo n.º 5
0
 // IServiceContainer.AddService implementation for a linked
 // service container architecture.
 public void AddService(System.Type serviceType,
                        System.ComponentModel.Design.ServiceCreatorCallback callback)
 {
     AddService(serviceType, callback, true);
 }
Ejemplo n.º 6
0
 void System.ComponentModel.Design.IServiceContainer.AddService(Type serviceType, System.ComponentModel.Design.ServiceCreatorCallback callback)
 {
     AddService(serviceType, callback, true);
 }
Ejemplo n.º 7
0
 public void AddService(System.Type serviceType, System.ComponentModel.Design.ServiceCreatorCallback callback, bool promote)
 {
     parent.AddService(serviceType, callback, promote);
 }