/// <summary> /// Get data map of specified model type. /// </summary> /// <param name="modelType"> /// Type of model object. /// </param> /// <returns> /// GlobalTranz.Framework.Common.Models.ModelDataMap object. /// </returns> public static ModelDataMap GetDataMap(Type modelType) { if (mappingTable == null) { mappingTable = new Hashtable(); } ModelDataMap mapping = (ModelDataMap)mappingTable[modelType.FullName]; if (mapping == null) { mapping = new ModelDataMap(modelType); mappingTable[modelType.FullName] = mapping; } return(mapping); }
/// <summary> /// Create instance of ModelConverter /// </summary> /// <param name="modelType"> /// Model Type /// </param> public ModelConverter(Type modelType) { this.mapping = ModelDataMap.GetDataMap(modelType); }