示例#1
0
        static void Main()
        {
            var client = new SlackClient("https://hooks.slack.com/services/Your/WebHook/Url");
            var msg    = new Message($"Test Message for slack channel", "channel name", "username", "https://a.slack-edge.com/9c217/img/loading_hash_animation.gif");

            client.Send(msg);
        }
示例#2
0
        public void MoreTalking()
        {
            DataTable dtable = new DataTable();

            dtable.Columns.Add("Class");
            dtable.Columns.Add("Errors/Failures/Totals");

            dtable.Rows.Add("BusinessObjects.Domains.Tests-nunitTestResults", "0/0/64");
            dtable.Rows.Add("BusinessObjects.Domains.Tests-nunitTestResults", "0/6/6");

            sut = new SlackClient(new Uri("https://hooks.slack.com/services/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").ToString());
            var msg = new SlackMessage();

            //msg.Attach(new SlackAttachment());
            msg.AddData(dtable)
            //.UsingLeftBarColor(Color.White)
            ;

            sut.Send(msg);
        }
示例#3
0
 public void Talks()
 {
     sut.Send("testing send " + Guid.NewGuid());
 }