public CreateChannelCommand(
            Fifthweek.Api.Identity.Shared.Membership.Requester requester,
            Fifthweek.Api.Channels.Shared.ChannelId newChannelId,
            Fifthweek.Api.Blogs.Shared.BlogId blogId,
            Fifthweek.Api.Channels.Shared.ValidChannelName name,
            Fifthweek.Api.Channels.Shared.ValidChannelPrice price,
            System.Boolean isVisibleToNonSubscribers)
        {
            if (requester == null)
            {
                throw new ArgumentNullException("requester");
            }

            if (newChannelId == null)
            {
                throw new ArgumentNullException("newChannelId");
            }

            if (blogId == null)
            {
                throw new ArgumentNullException("blogId");
            }

            if (name == null)
            {
                throw new ArgumentNullException("name");
            }

            if (price == null)
            {
                throw new ArgumentNullException("price");
            }

            if (isVisibleToNonSubscribers == null)
            {
                throw new ArgumentNullException("isVisibleToNonSubscribers");
            }

            this.Requester    = requester;
            this.NewChannelId = newChannelId;
            this.BlogId       = blogId;
            this.Name         = name;
            this.Price        = price;
            this.IsVisibleToNonSubscribers = isVisibleToNonSubscribers;
        }
Beispiel #2
0
        public static bool TryParse(string value, out ValidChannelName channelName)
        {
            IReadOnlyCollection <string> errorMessages;

            return(TryParse(value, out channelName, out errorMessages));
        }