コード例 #1
0
        public static object Create(this TypeRef t, params object[] parameter)
        {
            if (t == null)
            {
                throw new ArgumentNullException("t");
            }

            return(Activator.CreateInstance(t.AsType(true), parameter));
        }
コード例 #2
0
        public static void UpdateParent(TypeRef obj)
        {
            var baseType = obj.AsType(true).BaseType;

            if (baseType == null)
            {
                obj.Parent = null;
            }
            else
            {
                obj.Parent = baseType.ToRef(obj.Context);
            }
        }
コード例 #3
0
ファイル: TypeRefActions.cs プロジェクト: jrgcubano/zetbox
 public static void UpdateParent(TypeRef obj)
 {
     var baseType = obj.AsType(true).BaseType;
     if (baseType == null)
     {
         obj.Parent = null;
     }
     else
     {
         obj.Parent = baseType.ToRef(obj.Context);
     }
 }