示例#1
0
        // combine properties to create final message that will be sent
        private static SlackMessage MergeMessageProperties(SlackMessage item, SlackConfiguration config, SlackAttribute attr)
        {
            var result = new SlackMessage();

            result.Text       = FirstOrDefault(item.Text, attr.Text);
            result.Channel    = FirstOrDefault(item.Channel, attr.Channel, config.Channel);
            result.Username   = FirstOrDefault(item.Username, attr.Username, config.Username);
            result.IconEmoji  = FirstOrDefault(item.IconEmoji, attr.IconEmoji, config.IconEmoji);
            result.IsMarkdown = item.IsMarkdown;
            result.AsUser     = item.AsUser;

            return(result);
        }
示例#2
0
 public SlackAsyncCollector(SlackConfiguration config, SlackAttribute attr)
 {
     this.config = config;
     this.attr   = attr;
 }