本文整理汇总了C#中Microsoft.AddResult方法的典型用法代码示例。如果您正苦于以下问题:C# Microsoft.AddResult方法的具体用法?C# Microsoft.AddResult怎么用?C# Microsoft.AddResult使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft
的用法示例。
在下文中一共展示了Microsoft.AddResult方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Validate
public override void Validate(Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResults results)
{
base.ValidateBase(results);
string msg = string.Empty;
if (String.IsNullOrEmpty(BuildingCode))
{
msg = "BuildingCode cannot be empty";
results.AddResult(new ValidationResult(msg, this, "BuildingCodeSelfValidation", "", null));
}
if (String.IsNullOrEmpty(FloorCode))
{
msg = "FloorCode cannot be empty";
results.AddResult(new ValidationResult(msg, this, "FloorCodeSelfValidation", "", null));
}
}
示例2: ValidaNome
private void ValidaNome(Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResults results)
{
if (Nome != null && Nome.Length > 50)
{
Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult result =
new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(Resource.Mensagem.Perfil_NomeTamanho, this, "Nome", null, null);
results.AddResult(result);
}
}
示例3: ValidaCorpo
private void ValidaCorpo(Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResults results)
{
if (Corpo != null && Corpo.Length > 1000)
{
Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult result =
new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(Resource.Mensagem.Email_CorpoTamanho, this, "Corpo", null, null);
results.AddResult(result);
}
}
示例4: ValidaAssunto
private void ValidaAssunto(Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResults results)
{
if (Assunto != null && Assunto.Length > 50)
{
Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult result =
new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(Resource.Mensagem.Email_AssuntoTamanho, this, "Assunto", null, null);
results.AddResult(result);
}
}
示例5: ValidaDestinatario
private void ValidaDestinatario(Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResults results)
{
if (Destinatario != null && Destinatario.Length > 100)
{
Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult result =
new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(Resource.Mensagem.Email_DestinatarioTamanho, this, "Destinatario", null, null);
results.AddResult(result);
}
}
示例6: ValidaSenha
private void ValidaSenha(Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResults results)
{
if (Senha != null && Senha.Length > 300)
{
Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult result =
new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(Resource.Mensagem.Usuario_SenhaTamanho, this, "Senha", null, null);
results.AddResult(result);
}
}
示例7: ValidaEmail
private void ValidaEmail(Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResults results)
{
if (Email != null && Email.Length > 100)
{
Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult result =
new Microsoft.Practices.EnterpriseLibrary.Validation.ValidationResult(Resource.Mensagem.Usuario_EmailTamanho, this, "Email", null, null);
results.AddResult(result);
}
}