当前位置: 首页>>代码示例>>C#>>正文


C# Microsoft.AddResult方法代码示例

本文整理汇总了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));
            }
        }
开发者ID:KristerH,项目名称:TestRepo,代码行数:17,代码来源:RequestMessageGetRooms.cs

示例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);
     }
 }
开发者ID:lucasgiusti,项目名称:Giusti.Template,代码行数:9,代码来源:Perfil.cs

示例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);
     }
 }
开发者ID:lucasgiusti,项目名称:Giusti.Template,代码行数:9,代码来源:Email.cs

示例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);
     }
 }
开发者ID:lucasgiusti,项目名称:Giusti.Template,代码行数:9,代码来源:Email.cs

示例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);
     }
 }
开发者ID:lucasgiusti,项目名称:Giusti.Template,代码行数:9,代码来源:Email.cs

示例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);
     }
 }
开发者ID:lucasgiusti,项目名称:Giusti.Template,代码行数:9,代码来源:Usuario.cs

示例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);
     }
 }
开发者ID:lucasgiusti,项目名称:Giusti.Template,代码行数:9,代码来源:Usuario.cs


注:本文中的Microsoft.AddResult方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。