public static TypeConfig BeforeSerialize <T>(this TypeConfig config, Func <T, Object> beforeSerialize, double weight = 1.0)
 {
     if (beforeSerialize == null)
     {
         return(config);
     }
     return(config.BeforeSerialize((t, o) => beforeSerialize(o.AssertCast <T>()), weight));
 }
 public static TypeConfig BeforeSerialize(this TypeConfig config, IEnumerable <Action <Type, Object> > beforeSerializes)
 {
     (beforeSerializes ?? Seq.Empty <Action <Type, Object> >()).ForEach(beforeSerialize => config.BeforeSerialize(beforeSerialize));
     return(config);
 }
 public static TypeConfig BeforeSerialize(this TypeConfig config, params Action <Type, Object>[] beforeSerializes)
 {
     return(config.BeforeSerialize((IEnumerable <Action <Type, Object> >)beforeSerializes));
 }