public IPropertyModel Create(Type type, string title) { var propertyType = TypeRecognizer.ParseType(type); if (!type.IsPublic && !type.IsNestedPublic) { throw new ArgumentException($"型 {type.FullName} がパブリックではありませんでした。", nameof(type)); } var model = Create(propertyType, type); model.Title.Value = title; return(model); }
private IPropertyModel CreateMultiLine(Type type, string title) { var propertyType = TypeRecognizer.ParseType(type); switch (propertyType) { case PropertyKind.String: return(new StringProperty(true) { Title = { Value = title } }); default: throw new Exception(); } }