コード例 #1
0
 public static CreateBlogCommand NewCreateBlogCommand(
     UserId userId,
     BlogId blogId,
     ChannelId firstChannelId,
     NewBlogData data)
 {
     return(new CreateBlogCommand(
                Requester.Authenticated(userId),
                blogId,
                firstChannelId,
                ValidBlogName.Parse(data.Name),
                ValidChannelPrice.Parse(data.BasePrice)));
 }
コード例 #2
0
 public static UpdateBlogCommand NewUpdateBlogCommand(
     UserId userId,
     BlogId blogId,
     UpdatedBlogData data)
 {
     return(new UpdateBlogCommand(
                Requester.Authenticated(userId),
                blogId,
                ValidBlogName.Parse(data.Name),
                ValidIntroduction.Parse(data.Introduction),
                ValidBlogDescription.Parse(data.Description),
                data.HeaderImageFileId,
                ValidExternalVideoUrl.Parse(data.Video)));
 }