public PropertyVersion <TValue, TVersion> Convert(TrackedProperty <TValue, TVersion> source, PropertyVersion <TValue, TVersion> destination, ResolutionContext context) { if (source != null && source.Count > 0) { return(source.Last()); } else { return(default(PropertyVersion <TValue, TVersion>)); } }
public TValue Convert(TrackedProperty <TValue, TVersion> source, TValue destination, ResolutionContext context) { var vers = context.Mapper.Map(source, typeof(TrackedProperty <TValue, TVersion>), typeof(PropertyVersion <TValue, TVersion>)); return((TValue)context.Mapper.Map(vers, typeof(PropertyVersion <TValue, TVersion>), typeof(TValue))); }
public TrackedProperty <string, DateTime> Convert(string source, TrackedProperty <string, DateTime> destination, ResolutionContext context) { // implement your logic here... throw new NotImplementedException(); }