public static IAppHostBuilder RegisterHandler <TType, TTypeRender>(this IAppHostBuilder builder)
            where TType : IFrameworkElement
            where TTypeRender : IViewHandler
        {
            builder.ConfigureHandlers((context, handlersCollection) => handlersCollection.AddTransient(typeof(TType), typeof(TTypeRender)));

            return(builder);
        }
        public static IAppHostBuilder RegisterHandlers(this IAppHostBuilder builder, Dictionary <Type, Type> handlers)
        {
            foreach (var handler in handlers)
            {
                builder?.ConfigureHandlers((context, handlersCollection) => handlersCollection.AddTransient(handler.Key, handler.Value));
            }

            return(builder);
        }
 public static IAppHostBuilder RegisterHandler(this IAppHostBuilder builder, Type viewType, Type handlerType)
 {
     builder.ConfigureHandlers((context, handlersCollection) => handlersCollection.AddTransient(viewType, handlerType));
     return(builder);
 }