Пример #1
0
 public object GetService(Type type)
 {
     if (ServiceLocator.Current.IsRegistered(type))
     {
         return(ServiceLocator.GetService(type));
     }
     else
     {
         return(ServiceLocator.GetService <IServiceProxyFactory>().CreateProxy(type));
     }
 }
Пример #2
0
 public T GetService <T>() where T : class
 {
     if (ServiceLocator.Current.IsRegistered <T>())
     {
         return(ServiceLocator.GetService <T>());
     }
     else
     {
         return(ServiceLocator.GetService <IServiceProxyFactory>().CreateProxy <T>());
     }
 }
Пример #3
0
 public object GetService(string key, Type type)
 {
     if (ServiceLocator.Current.IsRegisteredWithKey(key, type))
     {
         return(ServiceLocator.GetService(key, type));
     }
     else
     {
         return(ServiceLocator.GetService <IServiceProxyFactory>().CreateProxy(key, type));
     }
 }
Пример #4
0
 public T CreateProxy <T>() where T : class
 {
     return(ServiceLocator.GetService <IServiceProxyFactory>().CreateProxy <T>());
 }
Пример #5
0
 public object CreateProxy(string key, Type type)
 {
     return(ServiceLocator.GetService <IServiceProxyFactory>().CreateProxy(key, type));
 }
Пример #6
0
 public object CreateProxy(Type type)
 {
     return(ServiceLocator.GetService <IServiceProxyFactory>().CreateProxy(type));
 }