コード例 #1
0
        public Task <IResponseContainer> IsSatisfiedBy(Group entity)
        {
            var result = new ResponseContainer();

            if (capacityInAmps <= 0)
            {
                result.AddErrorMessage($"Capacity has to be greater than 0.");
            }

            var nameSpecificationResponseContainer = new NameSpecification().IsSatisfiedBy(name).Result;

            result.JoinWith(nameSpecificationResponseContainer);

            return(Task.FromResult(result.AsInterface()));
        }