Ejemplo n.º 1
0
 /// <summary>
 /// Specify a method to be run before an existing property mapping.
 /// </summary>
 /// <typeparam name="TVirtualView">The cross-platform type.</typeparam>
 /// <typeparam name="TViewHandler">The handler type.</typeparam>
 /// <param name="propertyMapper">The property mapper in which to change the mapping.</param>
 /// <param name="key">The name of the property.</param>
 /// <param name="method">The method to call before the existing mapping begins.</param>
 public static void PrependToMapping <TVirtualView, TViewHandler>(this IPropertyMapper <TVirtualView, TViewHandler> propertyMapper,
                                                                  string key, Action <TViewHandler, TVirtualView> method)
     where TVirtualView : IElement where TViewHandler : IElementHandler
 {
     propertyMapper.ModifyMapping(key, (handler, view, action) =>
     {
         method(handler, view);
         action?.Invoke(handler, view);
     });
 }