Example #1
0
 public object GetService(Type type)
 {
     if (ServiceLocator.Current.IsRegistered(type))
     {
         return(ServiceLocator.GetService(type));
     }
     else
     {
         return(ServiceLocator.GetService <IServiceProxyFactory>().CreateProxy(type));
     }
 }
Example #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>());
     }
 }
Example #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));
     }
 }
Example #4
0
 public T CreateProxy <T>() where T : class
 {
     return(ServiceLocator.GetService <IServiceProxyFactory>().CreateProxy <T>());
 }
Example #5
0
 public object CreateProxy(string key, Type type)
 {
     return(ServiceLocator.GetService <IServiceProxyFactory>().CreateProxy(key, type));
 }
Example #6
0
 public object CreateProxy(Type type)
 {
     return(ServiceLocator.GetService <IServiceProxyFactory>().CreateProxy(type));
 }