예제 #1
0
 public BinderConverterDelegateWrapper(BinderConverterDelegate <TResult, TValue> converterDelegate)
 {
     _converterDelegate = converterDelegate;
 }
예제 #2
0
 /// <summary>
 /// Creates a converter around a delegate, that can be used in <see cref="AddCompiledBinding"/> method
 /// </summary>
 /// <typeparam name="TResult">type of conversion result</typeparam>
 /// <typeparam name="TValue">typeo of  value to convert</typeparam>
 /// <param name="converterDelegate">delegate that implements the conversion</param>
 /// <returns>an object, that wrap delegate</returns>
 public static IBinderConverter CreateConverter <TResult, TValue>(BinderConverterDelegate <TResult, TValue> converterDelegate)
 {
     return(new BinderConverterDelegateWrapper <TResult, TValue>(converterDelegate));
 }