public bool HasDefaultConstructor(bool supportInternal) { if (this.type == null) { return(true); } return(TypeUtilities.HasDefaultConstructor(this.type, supportInternal)); }
public static bool CanCreateTypeInXaml(ITypeResolver typeResolver, Type type) { IType type1 = typeResolver.GetType(type); if (typeResolver.PlatformMetadata.IsNullType(type1) || !TypeHelper.IsAccessibleType(typeResolver, type1) || Nullable.GetUnderlyingType(type) != null) { return(false); } if (type == typeof(string) || TypeUtilities.HasDefaultConstructor(type, typeResolver.InTargetAssembly(type1))) { return(true); } return(type1.TypeConverter.CanConvertFrom(typeof(string))); }