コード例 #1
0
ファイル: ModelDataMap.cs プロジェクト: meridianww/M4PLBase
        /// <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);
        }
コード例 #2
0
ファイル: ModelConverter.cs プロジェクト: meridianww/M4PLBase
 /// <summary>
 ///		Create instance of ModelConverter
 /// </summary>
 /// <param name="modelType">
 ///		Model Type
 ///	</param>
 public ModelConverter(Type modelType)
 {
     this.mapping = ModelDataMap.GetDataMap(modelType);
 }