コード例 #1
0
        private void ProcessWebHook(WebHooksPendingItem webhook)
        {
            UpdateHealth();
            webhook.IsProcessing = true;
            webhook.Collection.Save();

            //check what type of webhook it is:
            switch ((WebHookType)webhook.Type)
            {
            case WebHookType.Integration:
                //Right now only ServiceNow is integrated this way, so we only check for those links, however at some point we'll have to include more integrations here.
                ServiceNow serviceNow = new ServiceNow(webhook, LoginUser);
                serviceNow.Process(_threadNumber);
                break;

            default:
                Logs.WriteEvent("Unknown webhook type. Not implemented yet.");
                Logs.WriteData(webhook.Row);
                webhook.Delete();
                webhook.Collection.Save();
                break;
            }
        }