예제 #1
0
파일: IoC.cs 프로젝트: JunaidAK/MvvmCore
 private static object GetSingleton(Type service)
 {
     try { return(Singletons.FirstOrDefault(x => x.Key == service).Value); }
     catch { }
     return(null);
 }
예제 #2
0
파일: IoC.cs 프로젝트: JunaidAK/MvvmCore
 private static Service GetSingleton <Service>()
 {
     try { return((Service)Singletons.FirstOrDefault(x => x.Key == typeof(Service)).Value); }
     catch { }
     return(default(Service));
 }