/// <summary> /// Create a target object populated from a source document /// </summary> /// <param name="source"></param> /// <returns></returns> public static TTarget CreateTarget(XDocument source) { var map = new XDocumentAutoMap <TTarget>(); return(map.Create(source)); }
/// <summary> /// Create a collection of target objects from a source document /// </summary> /// <param name="sourceList"></param> /// <returns></returns> public static List <TTarget> CreateTargetList(XDocument sourceList) { var map = new XDocumentAutoMap <TTarget>(); return(map.CreateList(sourceList)); }
/// <summary> /// Populate an existing target object from a source document /// </summary> /// <param name="source"></param> /// <param name="target"></param> public static void PopulateTarget(XDocument source, TTarget target) { var map = new XDocumentAutoMap <TTarget>(); map.Populate(source, target); }