public static void IgnoreAllByDefault(this JsonMap jsonMap) { jsonMap.Actions.Insert( 0, (member, property, mode) => { property.ShouldSerialize = instance => false; }); }
public static void NamingConvention <T>(this JsonMap <T> jsonMap, Func <string, string> renamer) { jsonMap.Actions.Add((member, property, mode) => { { property.PropertyName = renamer(member.Name); property.ShouldSerialize = instance => true; } }); }
public static void Map <T, TProp>(this JsonMap <T> jsonMap, Expression <Func <T, TProp> > expr, string name) { jsonMap.Map((LambdaExpression)expr, name); }
public static void Ignore <T, TProp>(this JsonMap <T> jsonMap, Expression <Func <T, TProp> > expr) { jsonMap.Ignore((LambdaExpression)expr); }