コード例 #1
0
        public void InjectTo(object target)
        {
            if (target == null)
            {
                return;
            }

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

            typeInfo.InjectTo(this, target);
        }
コード例 #2
0
        public void ExtractFrom(object target)
        {
            if (target == null)
            {
                return;
            }

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

            typeInfo.ExtractFrom(this, target);
        }
コード例 #3
0
 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);
     }
 }