Exemplo n.º 1
0
 public CodeNameMustBeUnique(
     ICodeNameCheckerUniqueness iCodeNameCheckerUniqueness,
     CodeName codeName)
 {
     _iCodeNameCheckerUniqueness = iCodeNameCheckerUniqueness;
     _codeName = codeName;
 }
Exemplo n.º 2
0
        //factories
        public static BussinessWarehouse Create(
            string warehouseName,
            CodeName codeName,
            ICodeNameCheckerUniqueness iCodeNameCheckerUniqueness)
        {
            Guard.Against.InvalidInput(codeName, nameof(codeName), iCodeNameCheckerUniqueness.IsUnique);

            return(new BussinessWarehouse(warehouseName, codeName));
        }