Example #1
0
 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>));
     }
 }
Example #2
0
    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)));
    }
Example #3
0
 public TrackedProperty <string, DateTime> Convert(string source, TrackedProperty <string, DateTime> destination, ResolutionContext context)
 {
     // implement your logic here...
     throw new NotImplementedException();
 }