Exemplo n.º 1
0
        public void InjectTo(object target)
        {
            if (target == null)
            {
                return;
            }

            InjectReflectionTypeInfo typeInfo = InjectReflection.GetTypeInfo(target.GetType());

            typeInfo.InjectTo(this, target);
        }
Exemplo n.º 2
0
        public void ExtractFrom(object target)
        {
            if (target == null)
            {
                return;
            }

            InjectReflectionTypeInfo typeInfo = InjectReflection.GetTypeInfo(target.GetType());

            typeInfo.ExtractFrom(this, target);
        }
 public static void RegisterTypeInfo(Type type, bool isDelayReflect = true)
 {
     if (!typeInfoDic.ContainsKey(type))
     {
         InjectReflectionTypeInfo typeInfo = new InjectReflectionTypeInfo(type);
         if (!isDelayReflect)
         {
             typeInfo.ReflectMemebers();
         }
         typeInfoDic.Add(type, typeInfo);
     }
 }