internal MemberMappingDefinition(string fromName, string toName) { this.aFromName = fromName; this.aToName = toName; this.aRules = null; }
public TRules Rules <TRules>() where TRules : class, IMappingRules, new() { TRules ret = new TRules(); this.aRules = ret; return(ret); }
internal UntypedTypeMappingDefinitionBuilder(Type from, Type to) { this.aFrom = from; this.aTo = to; this.aVisitable = true; this.aPriority = 0; this.aRules = new ObjectMappingRules(); }
internal UntypedTypeMappingDefinition(Type from, Type to, int priority, bool visitable, IMappingRules rules) { this.From = from; this.To = to; this.Priority = priority; this.Visitable = visitable; this.aRules = rules; }
/// <summary> /// Loads an IEnumerable<typeparamref name="T"> type of model </typeparamref> from the given xml file /// <para> String -> Property mappings are not supported </para> /// </summary> /// <param name="fileInfo"> The information for the csv file from which the data will be loaded </param> /// <param name="rules"> Rules mapping - should contain only int -> property mappings. Where the integer key is the index of the column </param> /// <exception cref="System.ArgumentException"> Thrown if the given file or mapping is null </exception> public CsvDataLoader(CsvFileInfo fileInfo, IMappingRules <T, int> rules) { if (rules == null) { throw new DataImportException("A proper rules mapping should be specified!"); } this.file = fileInfo; this.rules = rules; }
/// <summary> /// Loads an IEnumerable<typeparamref name="T"> type of model </typeparamref> from the given xml file /// </summary> /// <param name="xmlFile"> The information for the xml file from which the data will be loaded </param> /// <param name="itemExpression"> The XPath expression for selecting the items whose properties will be mapped </param> /// <param name="propertyRules"> Rules mapping - should contain only XPath -> property mappings. The xml items will be located by XPath and assigned to the property </param> /// <exception cref="System.ArgumentException"> Thrown if the given file or mapping is null </exception> public XmlDataLoader(FileInfo xmlFile, XPathExpression itemExpression, IMappingRules <T, XPathExpression> propertyRules) { if (propertyRules == null) { throw new ArgumentException("A proper rules mapping should be specified"); } this.file = xmlFile; this.itemExpression = itemExpression; this.rules = propertyRules; }
internal PatternTypeMappingDefinitionBuilder(IPattern patternFrom, IPattern patternTo) { this.aPatterns = new PatternGroup(patternFrom, patternTo); this.aPriority = 0; this.aRules = null; }
internal ExactTypeMappingDefinitionBuilder() { this.aPriority = 0; this.aVisitable = true; this.aRules = new ObjectMappingRules <TFrom, TTo>(); }
public PostprocessRules() { this.aPostprocessDelegate = null; this.aRules = new ObjectMappingRules <TFrom, TTo>(); }
public NullableRules() { this.aRules = new ObjectMappingRules(); }
/// <summary> /// Loads the excel data from the given file and maps them to the model according to the mapping rules /// </summary> /// <param name="excelFile"> Dataholder for information for the excel file </param> /// <param name="intRules"> Mapping rules - specifies how the excel file columns will be mapped to the properties of the model. Using the index of the column (int) </param> public ExcelDataLoader(SpreadheetInfo excelFile, IMappingRules <T, int> intRules) { this.excelFile = excelFile; this.intRules = intRules; }
public EqualityRules() { this.aRules = new ObjectMappingRules <TFrom, TTo>(); }
public ExactTypeMappingDefinition(int priority, bool visitable, IMappingRules <TFrom, TTo> rules) { this.Priority = priority; this.Visitable = visitable; this.aRules = rules; }
public NullableRules() { this.aRules = new ObjectMappingRules <TFrom, TTo>(); }
public EqualityRules() { this.aRules = new ObjectMappingRules(); }
public PatternTypeMappingDefinition(PatternGroup patternFromTo, int priority, IMappingRules rules) { this.aPatterns = patternFromTo; this.Priority = priority; this.aRules = rules; }