public void GenerateCode(IConceptInfo conceptInfo, ICodeBuilder codeBuilder) { var info = (UserRequiredPropertyInfo)conceptInfo; if (UserRequiredPropertyCodeGenerator.IsSupported(info.Property) && (info.Property is ShortStringPropertyInfo || info.Property is LongStringPropertyInfo)) { codeBuilder.InsertCode("|| string.IsNullOrWhiteSpace(item." + info.Property.Name + ") ", UserRequiredPropertyCodeGenerator.OrCondition, info); } }
public void GenerateCode(IConceptInfo conceptInfo, ICodeBuilder codeBuilder) { var info = (UserRequiredPropertyInfo)conceptInfo; if (UserRequiredPropertyCodeGenerator.IsSupported(info.Property) && (info.Property is ShortStringPropertyInfo || info.Property is LongStringPropertyInfo)) { codeBuilder.InsertCode(CheckDataSnippet(info), WritableOrmDataStructureCodeGenerator.ArgumentValidationTag, info.Property.DataStructure); codeBuilder.AddReferencesFromDependency(typeof(UserException)); } }