コード例 #1
0
        //fits better in the lenguage
        public static Expense Produce(ProducerId producerId, DateTime occurred, Money cost, CategoryId categoryId)
        {
            Guard.ThrowIfItIsNull(producerId, nameof(producerId));
            Guard.ThrowIfItIsNull(occurred, nameof(occurred));
            Guard.ThrowIfItIsNull(cost, nameof(cost));
            Guard.ThrowIfItIsNull(categoryId, nameof(categoryId));

            return(new Expense(producerId, occurred, cost, categoryId));
        }
コード例 #2
0
 public Producer(ProducerId identifier)
 {
     Identifier = identifier;
 }