Update ElementHandlerRegistry.cs

This commit is contained in:
Eilon Lipton 2022-05-27 16:57:42 -07:00
Родитель 6c69b03808
Коммит 19189a7fa0
1 изменённых файлов: 0 добавлений и 7 удалений

Просмотреть файл

@ -44,13 +44,6 @@ namespace Microsoft.MobileBlazorBindings.Core
ElementHandlers.Add(key, new ElementHandlerFactory((renderer, parent, component) => factory(renderer, parent, component)));
}
public static void RegisterPropertyContentHandler<TComponent>(string propertyName,
Func<NativeComponentRenderer, IElementHandler> factory) where TComponent : NativeControlComponentBase
{
var key = $"p-{typeof(TComponent).FullName}.{propertyName}";
ElementHandlers.Add(key, new ElementHandlerFactory((renderer, _) => factory(renderer)));
}
public static void RegisterElementHandler<TComponent, TControlHandler>() where TComponent : NativeControlComponentBase where TControlHandler : class, IElementHandler, new()
{
RegisterElementHandler<TComponent>((_, __) => new TControlHandler());