예제 #1
0
 public static IMauiHandlersCollection TryAddHandler <TType, TTypeRender>(this IMauiHandlersCollection handlersCollection)
     where TType : IView
     where TTypeRender : IViewHandler
 {
     handlersCollection.TryAddTransient(typeof(TType), typeof(TTypeRender));
     return(handlersCollection);
 }
예제 #2
0
 public static IMauiHandlersCollection TryAddHandler <TType, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TTypeRender>(
     this IMauiHandlersCollection handlersCollection)
     where TType : IView
     where TTypeRender : IViewHandler
 {
     handlersCollection.TryAddTransient(typeof(TType), typeof(TTypeRender));
     return(handlersCollection);
 }
예제 #3
0
 public static IMauiHandlersCollection TryAddHandlers(this IMauiHandlersCollection handlersCollection, Dictionary <Type, Type> handlers)
 {
     foreach (var handler in handlers)
     {
         handlersCollection.TryAddTransient(handler.Key, handler.Value);
     }
     return(handlersCollection);
 }
예제 #4
0
 public static IMauiHandlersCollection TryAddHandler(
     this IMauiHandlersCollection handlersCollection,
     Type viewType,
     [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type handlerType)
 {
     handlersCollection.TryAddTransient(viewType, handlerType);
     return(handlersCollection);
 }
예제 #5
0
 public static IMauiHandlersCollection TryAddHandler(this IMauiHandlersCollection handlersCollection, Type viewType, Type handlerType)
 {
     handlersCollection.TryAddTransient(viewType, handlerType);
     return(handlersCollection);
 }