예제 #1
0
 private Organization ToOrganization(OrganizationElement organization)
 {
     if (organization == null)
     {
         return(null);
     }
     return(new Organization
     {
         DisplayName = organization.DisplayName,
         Name = organization.Name,
         Url = organization.Url
     });
 }
 private Organization ToOrganization(OrganizationElement organization)
 {
     if (organization == null) return null;
     return new Organization
     {
         DisplayName = organization.DisplayName,
         Name = organization.Name,
         Url = organization.Url
     };
 }
예제 #3
0
        /// <summary>
        ///异步验证
        /// </summary>
        public static async Task DoValidationAsync(IOrganizationElementRespository organizationElementRespository, OrganizationElement organizationElement, string validatorType)
        {
            var organizationElementValidator = new OrganizationElementValidator(organizationElementRespository);
            var validatorReresult            = await organizationElementValidator.DoValidateAsync(organizationElement, validatorType);

            if (!validatorReresult.IsValid)
            {
                throw new DomainException(validatorReresult);
            }
        }