public static object Create(this TypeRef t, params object[] parameter) { if (t == null) { throw new ArgumentNullException("t"); } return(Activator.CreateInstance(t.AsType(true), parameter)); }
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); } }