Esempio n. 1
0
        internal object GetValue(int index, ObjectMetaData metaData)
        {
            if (PropertyValues[index] == null)
            {
                PropertyValues[index] = metaData.DefaultValueForWritablePropertyList[index];
            }

            return(PropertyValues[index]);
        }
Esempio n. 2
0
        public static ObjectMetaData GetEntityMetaData(Type entityType)
        {
            ObjectMetaData entityInfo = null;

            if (!ObjectMetaData.EntityMetaDataDic.TryGetValue(entityType, out entityInfo))
            {
                lock (EntityMetaDataDic)
                {
                    if (!ObjectMetaData.EntityMetaDataDic.TryGetValue(entityType, out entityInfo))
                    {
                        entityInfo = new ObjectMetaData(entityType);
                        ObjectMetaData.EntityMetaDataDic[entityType] = entityInfo;
                    }
                }
            }

            return(entityInfo);
        }
 public ReflectionEmitPropertyAccessor(Type targetType, ObjectMetaData objectMetaData)
 {
     this.targetType = targetType;
     ObjectMetaData  = objectMetaData;
     Init();
 }