示例#1
0
 private void button2_Click(object sender, EventArgs e)
 {
     var jsonObject = new JsonEventObject()
     {
         Application = "TFS",
         Name = "New bug",
         Parameters = new List<Parameter>()
         {
             new Parameter()
             {
                 Name = "Tag",
                 Value = "Screens are shown double"
             },
             new Parameter()
             {
                 Name = "Product Backlog Item",
                 Value = "12345"
             },
             new Parameter()
             {
                 Name = "LoggedBy",
                 Value = "Langhoor, B"
             }
         }
     };
     HttpCall(jsonObject);
 }
示例#2
0
        private void button1_Click(object sender, EventArgs e)
        {
            var jsonObject = new JsonEventObject()
            {
                Application = "TFS",
                Name = "Build Completed",
                Parameters = new List<Parameter>()
                {
                    new Parameter()
                    {
                        Name = "LogicalName",
                        Value = "TORO"
                    },
                    new Parameter()
                    {
                        Name = "State",
                        Value = "FAILED"
                    }
                }

            };
            HttpCall(jsonObject);
        }
示例#3
0
 private void button4_Click(object sender, EventArgs e)
 {
     var jsonObject = new JsonEventObject()
     {
         Application = "XLDeploy",
         Name = "Application deployed",
         Parameters = new List<Parameter>()
         {
             new Parameter()
             {
                 Name = "Name",
                 Value = "TORO"
             },
             new Parameter()
             {
                 Name = "Environment",
                 Value = "DEV1"
             }
         }
     };
     HttpCall(jsonObject);
 }
示例#4
0
 private void button3_Click(object sender, EventArgs e)
 {
     var jsonObject = new JsonEventObject()
     {
         Application = "TFS",
         Name = "New story",
         Parameters = new List<Parameter>()
         {
             new Parameter()
             {
                 Name = "Tag",
                 Value = "Add feature makeIceCream"
             },
             new Parameter()
             {
                 Name = "Product Backlog Item",
                 Value = "54321"
             },
             new Parameter()
             {
                 Name = "LoggedBy",
                 Value = "Vliet van, S"
             }
         }
     };
     HttpCall(jsonObject);
 }
示例#5
0
        private void HttpCall(JsonEventObject jsonEventObject)
        {
            //post naar /api/event 
            // met json object, property: Application, type string, parameters (name string, value string)
            var client = new RestClient(ConfigurationManager.AppSettings["goForItWebUrl"]);
            var request = new RestRequest(ConfigurationManager.AppSettings["eventApiUrl"], Method.POST);

            request.AddJsonBody(jsonEventObject);

            var response = client.Execute(request);

            return;
        }
示例#6
0
 private void button8_Click(object sender, EventArgs e)
 {
     var jsonObject = new JsonEventObject()
     {
         Application = "News feed",
         Name = "New Article",
         Parameters = new List<Parameter>()
         {
             new Parameter()
             {
                 Name = "MessageContains",
                 Value = "Jo the plumber"
             }
         }
     };
     HttpCall(jsonObject);
 }
示例#7
0
 private void button7_Click(object sender, EventArgs e)
 {
     var jsonObject = new JsonEventObject()
     {
         Application = "Exchange",
         Name = "Reminder",
         Parameters = new List<Parameter>()
         {
             new Parameter()
             {
                 Name = "Name",
                 Value = "Refinement Session"
             },
         }
     };
     HttpCall(jsonObject);
 }
示例#8
0
 private void button6_Click(object sender, EventArgs e)
 {
     var jsonObject = new JsonEventObject()
     {
         Application = "Exchange",
         Name = "Mail received",
         Parameters = new List<Parameter>()
         {
             new Parameter()
             {
                 Name = "From",
                 Value = "ServiceDesk"
             },
             new Parameter()
             {
                 Name = "Subject",
                 Value = "Notification"
             }
         }
     };
     HttpCall(jsonObject);
 }
示例#9
0
 private void button5_Click(object sender, EventArgs e)
 {
     var jsonObject = new JsonEventObject()
     {
         Application = "RAM+",
         Name = "Run completed",
         Parameters = new List<Parameter>()
         {
             new Parameter()
             {
                 Name = "LogicalName",
                 Value = "Calculate VATR"
             }
         }
     };
     HttpCall(jsonObject);
 }