예제 #1
0
 // ファクトリとして機能するメソッド
 public Circle CreateCircle(CircleName circleName)
 {
     return(new Circle(
                id,
                circleName
                ));
 }
예제 #2
0
        public Circle(UserId ownerId, CircleName name)
        {
            if (ownerId == null)
            {
                throw new ArgumentNullException(nameof(ownerId));
            }
            if (name == null)
            {
                throw new ArgumentNullException(nameof(name));
            }

            OwnerId = ownerId;
            Name    = name;
        }