Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Slack"/> class.
        /// </summary>
        /// <param name="slackConfiguration">The Slack configuration.</param>
        /// <param name="poster">The Slack message poster.</param>
        public Slack(ISlackConfiguration slackConfiguration, ISlackMessagePoster poster)
        {
            this.poster = poster;

            // Set default values...
            messageLevel = SlackMessageLevel.Info;

            pendingSlackMessage = new SlackMessage(slackConfiguration.DefaultChannel);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Assigns a message level to the Slack message.
        /// </summary>
        /// <param name="messageLevel">The message level.</param>
        /// <returns>The client.</returns>
        public ISlackOptionalValues WithMessageLevel(SlackMessageLevel messageLevel)
        {
            this.messageLevel = messageLevel;

            return(this);
        }