();
19 |
20 | return Task.FromResult(true);
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/samples/GitHubReceiver/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Microsoft ASP.NET WebHooks GitHub Receiver
5 |
6 |
7 |
8 | Microsoft ASP.NET WebHooks GitHub Receiver
9 |
10 | This sample illustrates how to wire up a GitHub WebHooks receiver. A sample WebHook URI is:
11 |
12 | https://<host>/api/webhooks/incoming/github/{id}?code=83699ec7c1d794c0c780e49a5c72972590571fd8
13 |
14 |
15 | Set the 'MS_WebHookReceiverSecret_GitHub' application setting to the application secret, optionally using IDs
16 | to differentiate between multiple WebHooks, for example 'secret0, id1=secret1, id2=secret2'.
17 |
18 |
19 |
20 | Please see GitHub WebHooks
21 | for more information.
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/samples/GitHubReceiver/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/samples/InstagramReceiver/App_Start/FilterConfig.cs:
--------------------------------------------------------------------------------
1 | using System.Web;
2 | using System.Web.Mvc;
3 |
4 | namespace InstagramReceiver
5 | {
6 | public class FilterConfig
7 | {
8 | public static void RegisterGlobalFilters(GlobalFilterCollection filters)
9 | {
10 | filters.Add(new HandleErrorAttribute());
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/samples/InstagramReceiver/App_Start/RouteConfig.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Web;
5 | using System.Web.Mvc;
6 | using System.Web.Routing;
7 |
8 | namespace InstagramReceiver
9 | {
10 | public class RouteConfig
11 | {
12 | public static void RegisterRoutes(RouteCollection routes)
13 | {
14 | routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
15 |
16 | routes.MapRoute(
17 | name: "Default",
18 | url: "{controller}/{action}/{id}",
19 | defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
20 | );
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/samples/InstagramReceiver/App_Start/WebApiConfig.cs:
--------------------------------------------------------------------------------
1 | using System.Web.Http;
2 |
3 | namespace InstagramReceiver
4 | {
5 | public static class WebApiConfig
6 | {
7 | public static void Register(HttpConfiguration config)
8 | {
9 | // Web API configuration and services
10 |
11 | // Web API routes
12 | config.MapHttpAttributeRoutes();
13 |
14 | config.Routes.MapHttpRoute(
15 | name: "DefaultApi",
16 | routeTemplate: "api/{controller}/{id}",
17 | defaults: new { id = RouteParameter.Optional }
18 | );
19 |
20 | // Wire up dependencies
21 | Dependencies.Initialize(config);
22 |
23 | // Initialize Instagram WebHook receiver
24 | config.InitializeReceiveInstagramWebHooks();
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/samples/InstagramReceiver/Content/Site.css:
--------------------------------------------------------------------------------
1 | body {
2 | padding-top: 50px;
3 | padding-bottom: 20px;
4 | }
5 |
6 | /* Set padding to keep content from hitting the edges */
7 | .body-content {
8 | padding-left: 15px;
9 | padding-right: 15px;
10 | }
11 |
12 | /* Override the default bootstrap behavior where horizontal description lists
13 | will truncate terms that are too long to fit in the left column
14 | */
15 | .dl-horizontal dt {
16 | white-space: normal;
17 | }
18 |
19 | /* Set width on the form input elements since they're 100% wide by default */
20 | input,
21 | select,
22 | textarea {
23 | max-width: 280px;
24 | }
25 |
--------------------------------------------------------------------------------
/samples/InstagramReceiver/Controllers/HomeController.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Web;
5 | using System.Web.Mvc;
6 |
7 | namespace InstagramReceiver.Controllers
8 | {
9 | public class HomeController : Controller
10 | {
11 | public ActionResult Index()
12 | {
13 | return View();
14 | }
15 |
16 | public ActionResult About()
17 | {
18 | ViewBag.Message = "Your application description page.";
19 |
20 | return View();
21 | }
22 |
23 | public ActionResult Contact()
24 | {
25 | ViewBag.Message = "Your contact page.";
26 |
27 | return View();
28 | }
29 | }
30 | }
--------------------------------------------------------------------------------
/samples/InstagramReceiver/Global.asax:
--------------------------------------------------------------------------------
1 | <%@ Application Codebehind="Global.asax.cs" Inherits="InstagramReceiver.MvcApplication" Language="C#" %>
2 |
--------------------------------------------------------------------------------
/samples/InstagramReceiver/Global.asax.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Web;
5 | using System.Web.Http;
6 | using System.Web.Mvc;
7 | using System.Web.Optimization;
8 | using System.Web.Routing;
9 |
10 | namespace InstagramReceiver
11 | {
12 | public class MvcApplication : System.Web.HttpApplication
13 | {
14 | protected void Application_Start()
15 | {
16 | AreaRegistration.RegisterAllAreas();
17 | GlobalConfiguration.Configure(WebApiConfig.Register);
18 | FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
19 | RouteConfig.RegisterRoutes(RouteTable.Routes);
20 | BundleConfig.RegisterBundles(BundleTable.Bundles);
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/samples/InstagramReceiver/Scripts/_references.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aspnet/AspNetWebHooks/21b91e63279bf29224208c8ab5735e8345ec7926/samples/InstagramReceiver/Scripts/_references.js
--------------------------------------------------------------------------------
/samples/InstagramReceiver/Startup.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Owin;
2 | using Owin;
3 |
4 | [assembly: OwinStartupAttribute(typeof(InstagramReceiver.Startup))]
5 | namespace InstagramReceiver
6 | {
7 | public partial class Startup
8 | {
9 | public void Configuration(IAppBuilder app)
10 | {
11 | ConfigureAuth(app);
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/samples/InstagramReceiver/Views/Account/ConfirmEmail.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | ViewBag.Title = "Confirm Email";
3 | }
4 |
5 | @ViewBag.Title.
6 |
7 |
8 | Thank you for confirming your email. Please @Html.ActionLink("Click here to Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })
9 |
10 |
11 |
--------------------------------------------------------------------------------
/samples/InstagramReceiver/Views/Account/ExternalLoginFailure.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | ViewBag.Title = "Login Failure";
3 | }
4 |
5 |
6 | @ViewBag.Title.
7 | Unsuccessful login with service.
8 |
9 |
--------------------------------------------------------------------------------
/samples/InstagramReceiver/Views/Account/ForgotPasswordConfirmation.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | ViewBag.Title = "Forgot Password Confirmation";
3 | }
4 |
5 |
6 | @ViewBag.Title.
7 |
8 |
9 |
10 | Please check your email to reset your password.
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/samples/InstagramReceiver/Views/Account/ResetPasswordConfirmation.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | ViewBag.Title = "Reset password confirmation";
3 | }
4 |
5 |
6 | @ViewBag.Title.
7 |
8 |
9 |
10 | Your password has been reset. Please @Html.ActionLink("click here to log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })
11 |
12 |
13 |
--------------------------------------------------------------------------------
/samples/InstagramReceiver/Views/Account/SendCode.cshtml:
--------------------------------------------------------------------------------
1 | @model InstagramReceiver.Models.SendCodeViewModel
2 | @{
3 | ViewBag.Title = "Send";
4 | }
5 |
6 | @ViewBag.Title.
7 |
8 | @using (Html.BeginForm("SendCode", "Account", new { ReturnUrl = Model.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) {
9 | @Html.AntiForgeryToken()
10 | @Html.Hidden("rememberMe", @Model.RememberMe)
11 | Send verification code
12 |
13 |
14 |
15 | Select Two-Factor Authentication Provider:
16 | @Html.DropDownListFor(model => model.SelectedProvider, Model.Providers)
17 |
18 |
19 |
20 | }
21 |
22 | @section Scripts {
23 | @Scripts.Render("~/bundles/jqueryval")
24 | }
25 |
--------------------------------------------------------------------------------
/samples/InstagramReceiver/Views/Home/About.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | ViewBag.Title = "About";
3 | }
4 | @ViewBag.Title.
5 | @ViewBag.Message
6 |
7 | Use this area to provide additional information.
8 |
--------------------------------------------------------------------------------
/samples/InstagramReceiver/Views/Home/Contact.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | ViewBag.Title = "Contact";
3 | }
4 | @ViewBag.Title.
5 | @ViewBag.Message
6 |
7 |
8 | One Microsoft Way
9 | Redmond, WA 98052-6399
10 | P:
11 | 425.555.0100
12 |
13 |
14 |
15 | Support: Support@example.com
16 | Marketing: Marketing@example.com
17 |
--------------------------------------------------------------------------------
/samples/InstagramReceiver/Views/Shared/Error.cshtml:
--------------------------------------------------------------------------------
1 | @model System.Web.Mvc.HandleErrorInfo
2 |
3 | @{
4 | ViewBag.Title = "Error";
5 | }
6 |
7 | Error.
8 | An error occurred while processing your request.
9 |
10 |
--------------------------------------------------------------------------------
/samples/InstagramReceiver/Views/Shared/Lockout.cshtml:
--------------------------------------------------------------------------------
1 | @model System.Web.Mvc.HandleErrorInfo
2 |
3 | @{
4 | ViewBag.Title = "Locked Out";
5 | }
6 |
7 |
8 | Locked out.
9 | This account has been locked out, please try again later.
10 |
11 |
--------------------------------------------------------------------------------
/samples/InstagramReceiver/Views/Shared/_LoginPartial.cshtml:
--------------------------------------------------------------------------------
1 | @using Microsoft.AspNet.Identity
2 | @if (Request.IsAuthenticated)
3 | {
4 | using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" }))
5 | {
6 | @Html.AntiForgeryToken()
7 |
8 |
9 |
10 | @Html.ActionLink("Hello " + User.Identity.GetUserName() + "!", "Index", "Manage", routeValues: null, htmlAttributes: new { title = "Manage" })
11 |
12 | Log off
13 |
14 | }
15 | }
16 | else
17 | {
18 |
19 | @Html.ActionLink("Register", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" })
20 | @Html.ActionLink("Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/samples/InstagramReceiver/Views/_ViewStart.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | Layout = "~/Views/Shared/_Layout.cshtml";
3 | }
4 |
--------------------------------------------------------------------------------
/samples/InstagramReceiver/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aspnet/AspNetWebHooks/21b91e63279bf29224208c8ab5735e8345ec7926/samples/InstagramReceiver/favicon.ico
--------------------------------------------------------------------------------
/samples/InstagramReceiver/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aspnet/AspNetWebHooks/21b91e63279bf29224208c8ab5735e8345ec7926/samples/InstagramReceiver/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/samples/InstagramReceiver/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aspnet/AspNetWebHooks/21b91e63279bf29224208c8ab5735e8345ec7926/samples/InstagramReceiver/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/samples/InstagramReceiver/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aspnet/AspNetWebHooks/21b91e63279bf29224208c8ab5735e8345ec7926/samples/InstagramReceiver/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/samples/MailChimpReceiver.Selfhost/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/samples/MailChimpReceiver.Selfhost/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/samples/MyGetReceiver/App_Start/WebApiConfig.cs:
--------------------------------------------------------------------------------
1 | using System.Web.Http;
2 |
3 | namespace MyGetReceiver
4 | {
5 | public static class WebApiConfig
6 | {
7 | public static void Register(HttpConfiguration config)
8 | {
9 | // Web API configuration and services
10 |
11 | // Web API routes
12 | config.MapHttpAttributeRoutes();
13 |
14 | config.Routes.MapHttpRoute(
15 | name: "DefaultApi",
16 | routeTemplate: "api/{controller}/{id}",
17 | defaults: new { id = RouteParameter.Optional }
18 | );
19 |
20 | // Initialize MyGet WebHook receiver
21 | config.InitializeReceiveMyGetWebHooks();
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/samples/MyGetReceiver/Global.asax:
--------------------------------------------------------------------------------
1 | <%@ Application Codebehind="Global.asax.cs" Inherits="MyGetReceiver.WebApiApplication" Language="C#" %>
2 |
--------------------------------------------------------------------------------
/samples/MyGetReceiver/Global.asax.cs:
--------------------------------------------------------------------------------
1 | using System.Web.Http;
2 |
3 | namespace MyGetReceiver
4 | {
5 | public class WebApiApplication : System.Web.HttpApplication
6 | {
7 | protected void Application_Start()
8 | {
9 | GlobalConfiguration.Configure(WebApiConfig.Register);
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/samples/MyGetReceiver/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/samples/PayPalReceiver/App_Start/WebApiConfig.cs:
--------------------------------------------------------------------------------
1 | using System.Net;
2 | using System.Web.Http;
3 |
4 | namespace PayPalReceiver
5 | {
6 | public static class WebApiConfig
7 | {
8 | public static void Register(HttpConfiguration config)
9 | {
10 | // Web API configuration and services
11 | ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
12 |
13 | // Web API routes
14 | config.MapHttpAttributeRoutes();
15 |
16 | config.Routes.MapHttpRoute(
17 | name: "DefaultApi",
18 | routeTemplate: "api/{controller}/{id}",
19 | defaults: new { id = RouteParameter.Optional }
20 | );
21 |
22 | // Initialize PayPal WebHook receiver
23 | config.InitializeReceivePaypalWebHooks();
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/samples/PayPalReceiver/Global.asax:
--------------------------------------------------------------------------------
1 | <%@ Application Codebehind="Global.asax.cs" Inherits="PayPalReceiver.WebApiApplication" Language="C#" %>
2 |
--------------------------------------------------------------------------------
/samples/PayPalReceiver/Global.asax.cs:
--------------------------------------------------------------------------------
1 | using System.Web.Http;
2 |
3 | namespace PayPalReceiver
4 | {
5 | public class WebApiApplication : System.Web.HttpApplication
6 | {
7 | protected void Application_Start()
8 | {
9 | GlobalConfiguration.Configure(WebApiConfig.Register);
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/samples/PayPalReceiver/WebHooks/PayPalWebHookHandler.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 | using Microsoft.AspNet.WebHooks;
3 | using Newtonsoft.Json.Linq;
4 |
5 | namespace PayPalReceiver.WebHooks
6 | {
7 | public class PayPalWebHookHandler : WebHookHandler
8 | {
9 | public PayPalWebHookHandler()
10 | {
11 | this.Receiver = PaypalWebHookReceiver.ReceiverName;
12 | }
13 |
14 | public override Task ExecuteAsync(string generator, WebHookHandlerContext context)
15 | {
16 | // For more information about PayPal WebHook payloads, please see
17 | // 'https://developer.paypal.com/docs/integration/direct/webhooks/'
18 | JObject entry = context.GetDataOrDefault();
19 |
20 | return Task.FromResult(true);
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/samples/PayPalReceiver/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/samples/SalesforceReceiver/App_Start/WebApiConfig.cs:
--------------------------------------------------------------------------------
1 | using System.Web.Http;
2 |
3 | namespace SalesforceReceiver
4 | {
5 | public static class WebApiConfig
6 | {
7 | public static void Register(HttpConfiguration config)
8 | {
9 | // Web API configuration and services
10 |
11 | // Web API routes
12 | config.MapHttpAttributeRoutes();
13 |
14 | config.Routes.MapHttpRoute(
15 | name: "DefaultApi",
16 | routeTemplate: "api/{controller}/{id}",
17 | defaults: new { id = RouteParameter.Optional }
18 | );
19 |
20 | // Initialize Salesforce WebHook receiver
21 | config.InitializeReceiveSalesforceWebHooks();
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/samples/SalesforceReceiver/Global.asax:
--------------------------------------------------------------------------------
1 | <%@ Application Codebehind="Global.asax.cs" Inherits="SalesforceReceiver.WebApiApplication" Language="C#" %>
2 |
--------------------------------------------------------------------------------
/samples/SalesforceReceiver/Global.asax.cs:
--------------------------------------------------------------------------------
1 | using System.Web.Http;
2 |
3 | namespace SalesforceReceiver
4 | {
5 | public class WebApiApplication : System.Web.HttpApplication
6 | {
7 | protected void Application_Start()
8 | {
9 | GlobalConfiguration.Configure(WebApiConfig.Register);
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/samples/SalesforceReceiver/WebHooks/SalesforceWebHookHandler.cs:
--------------------------------------------------------------------------------
1 | using System.Linq;
2 | using System.Threading.Tasks;
3 | using Microsoft.AspNet.WebHooks;
4 |
5 | namespace SalesforceReceiver.WebHooks
6 | {
7 | public class SalesforceWebHookHandler : WebHookHandler
8 | {
9 | public SalesforceWebHookHandler()
10 | {
11 | this.Receiver = SalesforceSoapWebHookReceiver.ReceiverName;
12 | }
13 |
14 | public override Task ExecuteAsync(string receiver, WebHookHandlerContext context)
15 | {
16 | SalesforceNotifications updates = context.GetDataOrDefault();
17 | string sessionId = updates.SessionId;
18 | string company = updates.Notifications.FirstOrDefault()?["Company"];
19 | return Task.FromResult(true);
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/samples/SalesforceReceiver/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/samples/SlackReceiver/App_Start/WebApiConfig.cs:
--------------------------------------------------------------------------------
1 | using System.Web.Http;
2 |
3 | namespace SlackReceiver
4 | {
5 | public static class WebApiConfig
6 | {
7 | public static void Register(HttpConfiguration config)
8 | {
9 | // Web API configuration and services
10 |
11 | // Web API routes
12 | config.MapHttpAttributeRoutes();
13 |
14 | config.Routes.MapHttpRoute(
15 | name: "DefaultApi",
16 | routeTemplate: "api/{controller}/{id}",
17 | defaults: new { id = RouteParameter.Optional }
18 | );
19 |
20 | // Initialize Slack WebHook receiver
21 | config.InitializeReceiveSlackWebHooks();
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/samples/SlackReceiver/Global.asax:
--------------------------------------------------------------------------------
1 | <%@ Application Codebehind="Global.asax.cs" Inherits="SlackReceiver.WebApiApplication" Language="C#" %>
2 |
--------------------------------------------------------------------------------
/samples/SlackReceiver/Global.asax.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Web;
5 | using System.Web.Http;
6 | using System.Web.Routing;
7 |
8 | namespace SlackReceiver
9 | {
10 | public class WebApiApplication : System.Web.HttpApplication
11 | {
12 | protected void Application_Start()
13 | {
14 | GlobalConfiguration.Configure(WebApiConfig.Register);
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/samples/SlackReceiver/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/samples/StripeReceiver/App_Start/WebApiConfig.cs:
--------------------------------------------------------------------------------
1 | using System.Web.Http;
2 |
3 | namespace StripeReceiver
4 | {
5 | public static class WebApiConfig
6 | {
7 | public static void Register(HttpConfiguration config)
8 | {
9 | // Web API configuration and services
10 |
11 | // Web API routes
12 | config.MapHttpAttributeRoutes();
13 |
14 | config.Routes.MapHttpRoute(
15 | name: "DefaultApi",
16 | routeTemplate: "api/{controller}/{id}",
17 | defaults: new { id = RouteParameter.Optional }
18 | );
19 |
20 | // Initialize Stripe WebHook receiver
21 | config.InitializeReceiveStripeWebHooks();
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/samples/StripeReceiver/Global.asax:
--------------------------------------------------------------------------------
1 | <%@ Application Codebehind="Global.asax.cs" Inherits="StripeReceiver.WebApiApplication" Language="C#" %>
2 |
--------------------------------------------------------------------------------
/samples/StripeReceiver/Global.asax.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Web;
5 | using System.Web.Http;
6 | using System.Web.Routing;
7 |
8 | namespace StripeReceiver
9 | {
10 | public class WebApiApplication : System.Web.HttpApplication
11 | {
12 | protected void Application_Start()
13 | {
14 | GlobalConfiguration.Configure(WebApiConfig.Register);
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/samples/StripeReceiver/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/samples/VstsReceiver/App_Start/WebApiConfig.cs:
--------------------------------------------------------------------------------
1 | using System.Web.Http;
2 |
3 | namespace VstsReceiver
4 | {
5 | public static class WebApiConfig
6 | {
7 | public static void Register(HttpConfiguration config)
8 | {
9 | // Web API configuration and services
10 |
11 | // Web API routes
12 | config.MapHttpAttributeRoutes();
13 |
14 | config.Routes.MapHttpRoute(
15 | name: "DefaultApi",
16 | routeTemplate: "api/{controller}/{id}",
17 | defaults: new { id = RouteParameter.Optional }
18 | );
19 |
20 | // Initialize Vsts WebHook receiver
21 | config.InitializeReceiveVstsWebHooks();
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/samples/VstsReceiver/Global.asax:
--------------------------------------------------------------------------------
1 | <%@ Application Codebehind="Global.asax.cs" Inherits="VstsReceiver.WebApiApplication" Language="C#" %>
2 |
--------------------------------------------------------------------------------
/samples/VstsReceiver/Global.asax.cs:
--------------------------------------------------------------------------------
1 | using System.Web.Http;
2 |
3 | namespace VstsReceiver
4 | {
5 | public class WebApiApplication : System.Web.HttpApplication
6 | {
7 | protected void Application_Start()
8 | {
9 | GlobalConfiguration.Configure(WebApiConfig.Register);
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/samples/VstsReceiver/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/samples/ZendeskReceiver/App_Start/WebApiConfig.cs:
--------------------------------------------------------------------------------
1 | using System.Web.Http;
2 |
3 | namespace ZendeskReceiver
4 | {
5 | public static class WebApiConfig
6 | {
7 | public static void Register(HttpConfiguration config)
8 | {
9 | // Web API configuration and services
10 |
11 | // Web API routes
12 | config.MapHttpAttributeRoutes();
13 |
14 | config.Routes.MapHttpRoute(
15 | name: "DefaultApi",
16 | routeTemplate: "api/{controller}/{id}",
17 | defaults: new { id = RouteParameter.Optional }
18 | );
19 |
20 | // Initialize ZendeskReceiver WebHook receiver
21 | config.InitializeReceiveZendeskWebHooks();
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/samples/ZendeskReceiver/Global.asax:
--------------------------------------------------------------------------------
1 | <%@ Application Codebehind="Global.asax.cs" Inherits="BitbucketReceiver.WebApiApplication" Language="C#" %>
2 |
--------------------------------------------------------------------------------
/samples/ZendeskReceiver/Global.asax.cs:
--------------------------------------------------------------------------------
1 | using System.Web.Http;
2 |
3 | namespace ZendeskReceiver
4 | {
5 | public class WebApiApplication : System.Web.HttpApplication
6 | {
7 | protected void Application_Start()
8 | {
9 | GlobalConfiguration.Configure(WebApiConfig.Register);
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/samples/ZendeskReceiver/WebHooks/ZendeskWebHookHandler.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 | using Microsoft.AspNet.WebHooks;
3 |
4 | namespace ZendeskReceiver.WebHooks
5 | {
6 | ///
7 | /// This implementation handles Zendesk WebHooks.
8 | /// For more information about Zendesk push payloads, please see
9 | /// https://developer.zendesk.com/embeddables/docs/android/push_notifications_webhook .
10 | ///
11 | public class ZendeskWebHookHandler : WebHookHandler
12 | {
13 | public ZendeskWebHookHandler()
14 | {
15 | Receiver = ZendeskWebHookReceiver.ReceiverName;
16 | }
17 |
18 | public override Task ExecuteAsync(string generator, WebHookHandlerContext context)
19 | {
20 | ZendeskPost post = context.GetDataOrDefault();
21 |
22 | // Implementation logic goes here
23 | return Task.FromResult(true);
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/samples/ZendeskReceiver/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Common/Microsoft.AspNet.WebHooks.Common.nuspec:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $id$
5 | $symversion$
6 | Microsoft ASP.NET WebHooks Common Module
7 | Microsoft
8 | Microsoft, aspnet
9 | https://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm
10 | https://go.microsoft.com/fwlink/?LinkId=690277
11 | https://go.microsoft.com/fwlink/?LinkID=288859
12 | true
13 |
14 | This package provides common functionality for sending and receiving WebHooks using ASP.NET.
15 |
16 |
17 | © Microsoft Corporation. All rights reserved.
18 | Microsoft AspNet WebApi AspNetWebApi WebHooks
19 |
20 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Common/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.Runtime.CompilerServices;
5 |
6 | [assembly: InternalsVisibleTo("Microsoft.AspNet.WebHooks.Common.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
7 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Common/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Custom.Api/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.Runtime.CompilerServices;
5 |
6 | [assembly: InternalsVisibleTo("Microsoft.AspNet.WebHooks.Custom.Api.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
7 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Custom.Api/Routes/WebHookRouteNames.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.AspNet.WebHooks.Routes
5 | {
6 | ///
7 | /// Provides a set of common route names used by the custom WebHooks Web API controllers.
8 | ///
9 | internal static class WebHookRouteNames
10 | {
11 | ///
12 | /// Provides the name of the GET action.
13 | ///
14 | public const string FiltersGetAction = "FiltersGetAction";
15 |
16 | ///
17 | /// Provides the name of the lookup action.
18 | ///
19 | public const string RegistrationLookupAction = "RegistrationLookupAction";
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Custom.Api/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Custom.AzureStorage/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.Runtime.CompilerServices;
5 |
6 | [assembly: InternalsVisibleTo("Microsoft.AspNet.WebHooks.Custom.AzureStorage.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
7 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Custom.Mvc/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.Runtime.CompilerServices;
5 |
6 | [assembly: InternalsVisibleTo("Microsoft.AspNet.WebHooks.Custom.Api.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
7 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Custom.Mvc/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Custom.SqlStorage/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.Runtime.CompilerServices;
5 |
6 | [assembly: InternalsVisibleTo("Microsoft.AspNet.WebHooks.Custom.SqlStorage.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
7 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Custom/WebHooks/IWebHookFilterProvider.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.Collections.ObjectModel;
5 | using System.Threading.Tasks;
6 |
7 | namespace Microsoft.AspNet.WebHooks
8 | {
9 | ///
10 | /// Provides an abstraction for adding filters that can be used to determine when are triggered.
11 | ///
12 | public interface IWebHookFilterProvider
13 | {
14 | ///
15 | /// Get the filters for this implementation so that they be applied to
16 | /// instances.
17 | ///
18 | /// A collection of instances.
19 | Task> GetFiltersAsync();
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Custom/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.Azure/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.Azure/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.Runtime.CompilerServices;
5 |
6 | [assembly: InternalsVisibleTo("Microsoft.AspNet.WebHooks.Receivers.Azure.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
7 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.Azure/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.BitBucket/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.BitBucket/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.Runtime.CompilerServices;
5 |
6 | [assembly: InternalsVisibleTo("Microsoft.AspNet.WebHooks.Receivers.Bitbucket.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
7 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.BitBucket/WebHooks/BitbucketAuthor.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using Newtonsoft.Json;
5 |
6 | namespace Microsoft.AspNet.WebHooks
7 | {
8 | ///
9 | /// Contains information about a Bitbucket author.
10 | ///
11 | public class BitbucketAuthor
12 | {
13 | ///
14 | /// Gets or sets the Bitbucket user information for this author.
15 | ///
16 | [JsonProperty("user")]
17 | public BitbucketUser User { get; set; }
18 |
19 | ///
20 | /// Gets or sets the raw author in the form of a name and email alias.
21 | ///
22 | [JsonProperty("raw")]
23 | public string Raw { get; set; }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.BitBucket/WebHooks/BitbucketLink.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using Newtonsoft.Json;
5 |
6 | namespace Microsoft.AspNet.WebHooks
7 | {
8 | ///
9 | /// Contains information about a link in Bitbucket.
10 | ///
11 | public class BitbucketLink
12 | {
13 | ///
14 | /// Gets or sets the URI of the link.
15 | ///
16 | [JsonProperty("href")]
17 | public string Reference { get; set; }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.BitBucket/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.Custom/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.Custom/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.Runtime.CompilerServices;
5 |
6 | [assembly: InternalsVisibleTo("Microsoft.AspNet.WebHooks.Receivers.Custom.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
7 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.Custom/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.Dropbox/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.Dropbox/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.Runtime.CompilerServices;
5 |
6 | [assembly: InternalsVisibleTo("Microsoft.AspNet.WebHooks.Receivers.Dropbox.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
7 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.Dropbox/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.DynamicsCRM/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.DynamicsCRM/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.Runtime.CompilerServices;
5 |
6 | [assembly: InternalsVisibleTo("Microsoft.AspNet.WebHooks.Receivers.DynamicsCRM.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
7 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.DynamicsCRM/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.Generic/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.Generic/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.Runtime.CompilerServices;
5 |
6 | [assembly: InternalsVisibleTo("Microsoft.AspNet.WebHooks.Receivers.Generic.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
7 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.Generic/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.GitHub/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.GitHub/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.Runtime.CompilerServices;
5 |
6 | [assembly: InternalsVisibleTo("Microsoft.AspNet.WebHooks.Receivers.GitHub.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
7 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.GitHub/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.Instagram/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.Instagram/WebHooks/InstagramNotificationCollection.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.Collections.ObjectModel;
5 |
6 | namespace Microsoft.AspNet.WebHooks
7 | {
8 | ///
9 | /// Describes a collection of Instagram WebHook event notifications as received from Instagram.
10 | /// For details about Instagram WebHooks, please see https://www.instagram.com/developer/subscriptions/ .
11 | ///
12 | public class InstagramNotificationCollection : Collection
13 | {
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.Instagram/WebHooks/InstagramNotificationData.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using Newtonsoft.Json;
5 |
6 | namespace Microsoft.AspNet.WebHooks
7 | {
8 | ///
9 | /// Describes the data portion of an Instagram WebHook event notification. For details about Instagram WebHooks, please
10 | /// see https://www.instagram.com/developer/subscriptions/ .
11 | ///
12 | public class InstagramNotificationData
13 | {
14 | ///
15 | /// Gets or sets the ID of the media that was added.
16 | ///
17 | [JsonProperty("media_id")]
18 | public string MediaId { get; set; }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.Instagram/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.MailChimp/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.MailChimp/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.Runtime.CompilerServices;
5 |
6 | [assembly: InternalsVisibleTo("Microsoft.AspNet.WebHooks.Receivers.MailChimp.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
7 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.MailChimp/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.MyGet/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.MyGet/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.Runtime.CompilerServices;
5 |
6 | [assembly: InternalsVisibleTo("Microsoft.AspNet.WebHooks.Receivers.MyGet.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
7 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.MyGet/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.Paypal/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.Paypal/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.Pusher/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.Pusher/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.Runtime.CompilerServices;
5 |
6 | [assembly: InternalsVisibleTo("Microsoft.AspNet.WebHooks.Receivers.Pusher.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
7 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.Pusher/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.Salesforce/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.Salesforce/Messages/FaultResponse.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | soapenv:Client
6 | {0}
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.Salesforce/Messages/NotificationResponse.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | true
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.Salesforce/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.Runtime.CompilerServices;
5 |
6 | [assembly: InternalsVisibleTo("Microsoft.AspNet.WebHooks.Receivers.Salesforce.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
7 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.Salesforce/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.Slack/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.Slack/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.Runtime.CompilerServices;
5 |
6 | [assembly: InternalsVisibleTo("Microsoft.AspNet.WebHooks.Receivers.Slack.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
7 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.Slack/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.Stripe/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.Stripe/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.Trello/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.Trello/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.Runtime.CompilerServices;
5 |
6 | [assembly: InternalsVisibleTo("Microsoft.AspNet.WebHooks.Receivers.Trello.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
7 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.Trello/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.VSTS/Payloads/BaseResource.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.AspNet.WebHooks.Payloads
5 | {
6 | ///
7 | /// Base class for resource object which describes
8 | /// a specific event type.
9 | ///
10 | public abstract class BaseResource
11 | {
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.VSTS/Payloads/BuildCompletedLog.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using Newtonsoft.Json;
6 |
7 | namespace Microsoft.AspNet.WebHooks.Payloads
8 | {
9 | ///
10 | /// Describes build log
11 | ///
12 | public class BuildCompletedLog
13 | {
14 | ///
15 | /// Gets the log type.
16 | ///
17 | [JsonProperty("type")]
18 | public string LogType { get; set; }
19 |
20 | ///
21 | /// Gets the log URL.
22 | ///
23 | [JsonProperty("url")]
24 | public Uri Url { get; set; }
25 |
26 | ///
27 | /// Gets the log download URL.
28 | ///
29 | [JsonProperty("downloadUrl")]
30 | public Uri DownloadUrl { get; set; }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.VSTS/Payloads/BuildCompletedPayload.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.AspNet.WebHooks.Payloads
5 | {
6 | ///
7 | /// Describes the entire payload of event 'build.complete '.
8 | ///
9 | public class BuildCompletedPayload : BasePayload
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.VSTS/Payloads/CodeCheckedInPayload.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.AspNet.WebHooks.Payloads
5 | {
6 | ///
7 | /// Describes the entire payload of event 'tfvc.checkin '.
8 | ///
9 | public class CodeCheckedInPayload : BasePayload
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.VSTS/Payloads/GitLink.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using Newtonsoft.Json;
6 |
7 | namespace Microsoft.AspNet.WebHooks.Payloads
8 | {
9 | ///
10 | /// The link.
11 | ///
12 | public class GitLink
13 | {
14 | ///
15 | /// The url.
16 | ///
17 | [JsonProperty("href")]
18 | public Uri Href { get; set; }
19 | }
20 | }
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.VSTS/Payloads/GitMergeCommit.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using Newtonsoft.Json;
6 |
7 | namespace Microsoft.AspNet.WebHooks.Payloads
8 | {
9 | ///
10 | /// Merge Commit Information
11 | ///
12 | public class GitMergeCommit
13 | {
14 | ///
15 | /// Commit Id
16 | ///
17 | [JsonProperty("commitId")]
18 | public string CommitId { get; set; }
19 |
20 | ///
21 | /// Commit Url
22 | ///
23 | [JsonProperty("url")]
24 | public Uri Url { get; set; }
25 | }
26 | }
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.VSTS/Payloads/GitPullRequestCreatedPayload.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.AspNet.WebHooks.Payloads
5 | {
6 | ///
7 | /// Payload for the creation of a pull request
8 | ///
9 | public class GitPullRequestCreatedPayload : BasePayload
10 | {
11 | }
12 | }
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.VSTS/Payloads/GitPullRequestMergeCommitCreatedPayload.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.AspNet.WebHooks.Payloads
5 | {
6 | ///
7 | /// Payload for the creation of a merge commit.
8 | ///
9 | public class GitPullRequestMergeCommitCreatedPayload : BasePayload
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.VSTS/Payloads/GitPullRequestMergeCommitCreatedResource.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.AspNet.WebHooks.Payloads
5 | {
6 | ///
7 | /// Describes the resource that associated with
8 | ///
9 | public class GitPullRequestMergeCommitCreatedResource : GitPullRequestUpdatedResource
10 | {
11 | }
12 | }
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.VSTS/Payloads/GitPullRequestUpdatedPayload.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.AspNet.WebHooks.Payloads
5 | {
6 | ///
7 | /// Payload for the update of a pull request
8 | ///
9 | public class GitPullRequestUpdatedPayload : BasePayload
10 | {
11 | }
12 | }
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.VSTS/Payloads/GitPullRequestUpdatedResource.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using Newtonsoft.Json;
6 |
7 | namespace Microsoft.AspNet.WebHooks.Payloads
8 | {
9 | ///
10 | /// Describes the resource that associated with
11 | ///
12 | public class GitPullRequestUpdatedResource : GitPullRequestResource
13 | {
14 | ///
15 | /// The date the Pull Request was closed.
16 | ///
17 | [JsonProperty("closedDate")]
18 | public DateTime ClosedDate { get; set; }
19 | }
20 | }
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.VSTS/Payloads/GitPushPayload.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.AspNet.WebHooks.Payloads
5 | {
6 | ///
7 | /// Describes the entire payload of event 'git.push '.
8 | ///
9 | public class GitPushPayload : BasePayload
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.VSTS/Payloads/PayloadResourceContainer.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using Newtonsoft.Json;
5 |
6 | namespace Microsoft.AspNet.WebHooks.Payloads
7 | {
8 | ///
9 | /// Describes container
10 | ///
11 | public class PayloadResourceContainer
12 | {
13 | ///
14 | /// Gets the identifier of container.
15 | ///
16 | [JsonProperty("id")]
17 | public string Id { get; set; }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.VSTS/Payloads/TeamRoomMessagePostedPayload.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.AspNet.WebHooks.Payloads
5 | {
6 | ///
7 | /// Describes the entire payload of event 'message.posted '.
8 | ///
9 | public class TeamRoomMessagePostedPayload : BasePayload
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.VSTS/Payloads/WorkItemCommentedOnPayload.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.AspNet.WebHooks.Payloads
5 | {
6 | ///
7 | /// Describes the entire payload of event 'workitem.commented '.
8 | ///
9 | public class WorkItemCommentedOnPayload : BasePayload
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.VSTS/Payloads/WorkItemCommentedOnResource.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.AspNet.WebHooks.Payloads
5 | {
6 | ///
7 | /// Describes the resource that associated with
8 | ///
9 | public class WorkItemCommentedOnResource : BaseWorkItemResource
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.VSTS/Payloads/WorkItemCreatedPayload.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.AspNet.WebHooks.Payloads
5 | {
6 | ///
7 | /// Describes the entire payload of event 'workitem.created '.
8 | ///
9 | public class WorkItemCreatedPayload : BasePayload
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.VSTS/Payloads/WorkItemCreatedResource.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.AspNet.WebHooks.Payloads
5 | {
6 | ///
7 | /// Describes the resource that associated with
8 | ///
9 | public class WorkItemCreatedResource : BaseWorkItemResource
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.VSTS/Payloads/WorkItemDeletedPayload.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.AspNet.WebHooks.Payloads
5 | {
6 | ///
7 | /// Describes the entire payload of event 'workitem.deleted '.
8 | ///
9 | public class WorkItemDeletedPayload : BasePayload
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.VSTS/Payloads/WorkItemDeletedResource.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.AspNet.WebHooks.Payloads
5 | {
6 | ///
7 | /// Describes the resource that associated with
8 | ///
9 | public class WorkItemDeletedResource : BaseWorkItemResource
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.VSTS/Payloads/WorkItemLink.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using Newtonsoft.Json;
5 |
6 | namespace Microsoft.AspNet.WebHooks.Payloads
7 | {
8 | ///
9 | /// Describes the WorkItem's link.
10 | ///
11 | public class WorkItemLink
12 | {
13 | ///
14 | /// Gets the URL of WorkItem's link.
15 | ///
16 | [JsonProperty("href")]
17 | public string Href { get; set; }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.VSTS/Payloads/WorkItemRestoredPayload.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.AspNet.WebHooks.Payloads
5 | {
6 | ///
7 | /// Describes the entire payload of event 'workitem.restored '.
8 | ///
9 | public class WorkItemRestoredPayload : BasePayload
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.VSTS/Payloads/WorkItemRestoredResource.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.AspNet.WebHooks.Payloads
5 | {
6 | ///
7 | /// Describes the resource that associated with
8 | ///
9 | public class WorkItemRestoredResource : BaseWorkItemResource
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.VSTS/Payloads/WorkItemUpdatedFieldValue.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using Newtonsoft.Json;
5 |
6 | namespace Microsoft.AspNet.WebHooks.Payloads
7 | {
8 | ///
9 | /// Describes change of specific field
10 | ///
11 | /// The string-type of the field that is being changed
12 | public class WorkItemUpdatedFieldValue
13 | {
14 | ///
15 | /// Gets the value of the field before the change.
16 | ///
17 | [JsonProperty("oldValue")]
18 | public T OldValue { get; set; }
19 |
20 | ///
21 | /// Gets the value of the field after the change.
22 | ///
23 | [JsonProperty("newValue")]
24 | public T NewValue { get; set; }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.VSTS/Payloads/WorkItemUpdatedPayload.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.AspNet.WebHooks.Payloads
5 | {
6 | ///
7 | /// Describes the entire payload of event 'workitem.updated '.
8 | ///
9 | public class WorkItemUpdatedPayload : BasePayload
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.VSTS/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.Runtime.CompilerServices;
5 |
6 | [assembly: InternalsVisibleTo("Microsoft.AspNet.WebHooks.Receivers.TFS.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
7 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.VSTS/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.WordPress/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.WordPress/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.Runtime.CompilerServices;
5 |
6 | [assembly: InternalsVisibleTo("Microsoft.AspNet.WebHooks.Receivers.WordPress.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
7 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.WordPress/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.Zendesk/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.Zendesk/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.Runtime.CompilerServices;
5 |
6 | [assembly: InternalsVisibleTo("Microsoft.AspNet.WebHooks.Receivers.Zendesk.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
7 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.Zendesk/WebHooks/ZendeskDevice.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using Newtonsoft.Json;
5 |
6 | namespace Microsoft.AspNet.WebHooks
7 | {
8 | ///
9 | /// Contains the information about registered device for Zendesk (iOS, Android)
10 | ///
11 | public class ZendeskDevice
12 | {
13 | ///
14 | /// The device identifier/token that was registered through the SDK
15 | ///
16 | [JsonProperty("identifier")]
17 | public string Identifier { get; set; }
18 |
19 | ///
20 | /// The device type. Possible values: "iOS" or "Android"
21 | ///
22 | [JsonProperty("type")]
23 | public string DeviceType { get; set; }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers.Zendesk/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.Runtime.CompilerServices;
5 |
6 | [assembly: InternalsVisibleTo("Microsoft.AspNet.WebHooks.Receivers.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
7 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers/Routes/WebHookReceiverRouteNames.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.AspNet.WebHooks.Routes
5 | {
6 | ///
7 | /// Provides a set of common route names used for receiving incoming WebHooks.
8 | ///
9 | public static class WebHookReceiverRouteNames
10 | {
11 | ///
12 | /// Provides the name of the action for receiving WebHook requests.
13 | ///
14 | public const string ReceiversAction = "ReceiversAction";
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers/WebHooks/IWebHookReceiverManager.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.AspNet.WebHooks
5 | {
6 | ///
7 | /// Provides an abstraction for managing instances which process incoming WebHook requests.
8 | ///
9 | public interface IWebHookReceiverManager
10 | {
11 | ///
12 | /// Gets the matching the given .
13 | ///
14 | /// Case-insensitive name of storage provider, e.g. Dropbox .
15 | /// A representing the storage or null if no match is found.
16 | IWebHookReceiver GetReceiver(string receiverName);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/Microsoft.AspNet.WebHooks.Receivers/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/test/Common/DataSecurityTests.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using Microsoft.AspNetCore.DataProtection;
5 | using Xunit;
6 |
7 | namespace Microsoft.AspNet.WebHooks
8 | {
9 | public class DataSecurityTests
10 | {
11 | [Fact]
12 | public void GetDataProtector_ReturnsSingletonInstance()
13 | {
14 | // Act
15 | IDataProtector actual1 = DataSecurity.GetDataProtector();
16 | IDataProtector actual2 = DataSecurity.GetDataProtector();
17 |
18 | // Assert
19 | Assert.NotNull(actual1);
20 | Assert.Same(actual1, actual2);
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Common.Test/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Common.Test/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using System.Runtime.InteropServices;
6 |
7 | [assembly: ComVisible(false)]
8 | [assembly: CLSCompliant(false)]
9 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Custom.Api.Test/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Custom.Api.Test/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 |
6 | [assembly: CLSCompliant(false)]
7 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Custom.AzureStorage.Test/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 |
6 | [assembly: CLSCompliant(false)]
7 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Custom.Mvc.Test/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Custom.Mvc.Test/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 |
6 | [assembly: CLSCompliant(false)]
7 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Custom.SqlStorage.Test/GlobalSuppressions.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aspnet/AspNetWebHooks/21b91e63279bf29224208c8ab5735e8345ec7926/test/Microsoft.AspNet.WebHooks.Custom.SqlStorage.Test/GlobalSuppressions.cs
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Custom.SqlStorage.Test/Migrations/Configuration.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information
3 |
4 | using System.Data.Entity.Migrations;
5 |
6 | namespace Microsoft.AspNet.WebHooks.Migrations
7 | {
8 | internal sealed class Configuration : DbMigrationsConfiguration
9 | {
10 | public Configuration()
11 | {
12 | AutomaticMigrationsEnabled = false;
13 | }
14 |
15 | protected override void Seed(WebHookStoreContext context)
16 | {
17 | // This method will be called after migrating to the latest version.
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Custom.SqlStorage.Test/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using System.Resources;
6 |
7 | [assembly: CLSCompliant(false)]
8 | [assembly: NeutralResourcesLanguage("en-US")]
9 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Custom.Test/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Custom.Test/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 |
6 | [assembly: CLSCompliant(false)]
7 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Custom.Test/WebHooks/MemoryWebHookStoreTests.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using Xunit;
5 |
6 | namespace Microsoft.AspNet.WebHooks
7 | {
8 | [Collection("StoreCollection")]
9 | public class MemoryWebHookStoryTests : WebHookStoreTest
10 | {
11 | public MemoryWebHookStoryTests()
12 | : base(new MemoryWebHookStore())
13 | {
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Custom.Test/WebHooks/WebHookFilterTests.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using Microsoft.TestUtilities;
5 | using Xunit;
6 |
7 | namespace Microsoft.AspNet.WebHooks
8 | {
9 | public class WebHookFilterTests
10 | {
11 | private WebHookFilter _filter;
12 |
13 | public WebHookFilterTests()
14 | {
15 | _filter = new WebHookFilter();
16 | }
17 |
18 | [Fact]
19 | public void Name_Roundtrips()
20 | {
21 | PropertyAssert.Roundtrips(_filter, f => f.Name, PropertySetter.NullRoundtrips, roundtripValue: "你好世界");
22 | }
23 |
24 | [Fact]
25 | public void Description_Roundtrips()
26 | {
27 | PropertyAssert.Roundtrips(_filter, f => f.Description, PropertySetter.NullRoundtrips, roundtripValue: "你好世界");
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.Azure.Test/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.Azure.Test/Messages/KuduMessage.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "ff17489fbcb7e2dda9012ec285811b9b751ebb5e",
3 | "status": "success",
4 | "statusText": "",
5 | "authorEmail": "henrikn@microsoft.com",
6 | "author": "Henrik Frystyk Nielsen",
7 | "message": "initial commit\n",
8 | "progress": "",
9 | "deployer": "HenrikN",
10 | "receivedTime": "2015-09-26T04:26:53.8736751Z",
11 | "startTime": "2015-09-26T04:26:54.2486694Z",
12 | "endTime": "2015-09-26T04:26:55.6393049Z",
13 | "lastSuccessEndTime": "2015-09-26T04:26:55.6393049Z",
14 | "complete": true,
15 | "siteName": "test"
16 | }
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.Azure.Test/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using System.Runtime.InteropServices;
6 |
7 | [assembly: CLSCompliant(false)]
8 | [assembly: ComVisible(false)]
9 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.Bitbucket.Test/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.Bitbucket.Test/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using System.Runtime.InteropServices;
6 |
7 | [assembly: CLSCompliant(false)]
8 | [assembly: ComVisible(false)]
9 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.Custom.Test/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.Custom.Test/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using System.Runtime.InteropServices;
6 |
7 | [assembly: CLSCompliant(false)]
8 | [assembly: ComVisible(false)]
9 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.Dropbox.Test/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.Dropbox.Test/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using System.Runtime.InteropServices;
6 |
7 | [assembly: CLSCompliant(false)]
8 | [assembly: ComVisible(false)]
9 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.DynamicsCRM.Test/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.DynamicsCRM.Test/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using System.Runtime.InteropServices;
6 |
7 | [assembly: CLSCompliant(false)]
8 | [assembly: ComVisible(false)]
9 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.Generic.Test/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.Generic.Test/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using System.Runtime.InteropServices;
6 |
7 | [assembly: CLSCompliant(false)]
8 | [assembly: ComVisible(false)]
9 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.GitHub.Test/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.GitHub.Test/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using System.Runtime.InteropServices;
6 |
7 | [assembly: CLSCompliant(false)]
8 | [assembly: ComVisible(false)]
9 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.Instagram.Test/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.Instagram.Test/Messages/NotificationCollectionMessage.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "changed_aspect": "media",
4 | "object": "user",
5 | "object_id": "2174967354",
6 | "time": 1458842910,
7 | "subscription_id": 22362655,
8 | "data": {
9 | "media_id": "1213184719641169505_2174967354"
10 | }
11 | },
12 | {
13 | "changed_aspect": "media",
14 | "object": "user",
15 | "object_id": "3174967354",
16 | "time": 1458842920,
17 | "subscription_id": 22362655,
18 | "data": {
19 | "media_id": "1213184719641169515_3174967354"
20 | }
21 | }
22 | ]
23 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.Instagram.Test/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using System.Runtime.InteropServices;
6 |
7 | [assembly: CLSCompliant(false)]
8 | [assembly: ComVisible(false)]
9 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.Instagram.Test/WebHooks/InstagramNotificationDataTests.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using Microsoft.TestUtilities;
5 | using Xunit;
6 |
7 | namespace Microsoft.AspNet.WebHooks
8 | {
9 | public class InstagramNotificationDataTests
10 | {
11 | private InstagramNotificationData _notificationData = new InstagramNotificationData();
12 |
13 | [Fact]
14 | public void MediaId_Roundtrips()
15 | {
16 | PropertyAssert.Roundtrips(_notificationData, n => n.MediaId, PropertySetter.NullRoundtrips, roundtripValue: "Value");
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.MailChimp.Test/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.MailChimp.Test/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using System.Runtime.InteropServices;
6 |
7 | [assembly: CLSCompliant(false)]
8 | [assembly: ComVisible(false)]
9 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.MyGet.Test/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.MyGet.Test/Messages/BuildQueuedMessage.json:
--------------------------------------------------------------------------------
1 | {
2 | "Identifier": "82f9a300-2439-4ac6-a2bd-8da96bb26f75",
3 | "Username": "maartenba",
4 | "When": "2014-09-08T13:00:10.9006808Z",
5 | "PayloadType": "BuildQueuedWebHookEventPayloadV1",
6 | "Payload": {
7 | "FeedIdentifier": "sample-feed",
8 | "FeedUrl": "https://www.myget.org/F/sample-feed/",
9 | "Name": "SampleBuild",
10 | "Branch": "main"
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.MyGet.Test/Messages/BuildStartedMessage.json:
--------------------------------------------------------------------------------
1 | {
2 | "Identifier": "82f9a300-2439-4ac6-a2bd-8da96bb26f75",
3 | "Username": "maartenba",
4 | "When": "2014-09-08T13:00:10.9006808Z",
5 | "PayloadType": "BuildStartedWebHookEventPayloadV1",
6 | "Payload": {
7 | "FeedIdentifier": "sample-feed",
8 | "FeedUrl": "https://www.myget.org/F/sample-feed/",
9 | "Name": "SampleBuild",
10 | "Branch": "main"
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.MyGet.Test/Messages/InvalidMessage.json:
--------------------------------------------------------------------------------
1 | {
2 | "Identifier": "f83b6de3-9476-43b0-9f75-f9bf478539ca",
3 | "Username": "maartenba",
4 | "When": "2014-09-08T13:06:25.8446143Z",
5 | "Payload": {
6 | }
7 | }
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.MyGet.Test/Messages/NoPayloadMessage.json:
--------------------------------------------------------------------------------
1 | {
2 | "Identifier": "f83b6de3-9476-43b0-9f75-f9bf478539ca",
3 | "Username": "maartenba",
4 | "When": "2014-09-08T13:06:25.8446143Z",
5 | "PayloadType": "None"
6 | }
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.MyGet.Test/Messages/PackageDeletedMessage.json:
--------------------------------------------------------------------------------
1 | {
2 | "Identifier": "de5358b5-2fea-4000-b59e-7345e14af0ca",
3 | "Username": "maartenba",
4 | "When": "2014-09-08T13:00:52.0300822Z",
5 | "PayloadType": "PackageDeletedWebHookEventPayloadV1",
6 | "Payload": {
7 | "PackageType": "NuGet",
8 | "PackageIdentifier": "GoogleAnalyticsTracker.Core",
9 | "PackageVersion": "1.0.0-CI00002",
10 | "FeedIdentifier": "sample-feed",
11 | "FeedUrl": "https://www.myget.org/F/sample-feed/"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.MyGet.Test/Messages/PackageListedMessage.json:
--------------------------------------------------------------------------------
1 | {
2 | "Identifier": "76919dd9-ba4f-4f11-ab4d-d983146d2aae",
3 | "Username": "maartenba",
4 | "When": "2014-09-08T13:07:33.6121841Z",
5 | "PayloadType": "PackageListedWebHookEventPayloadV1",
6 | "Payload": {
7 | "Action": "unlisted",
8 | "PackageType": "NuGet",
9 | "PackageIdentifier": "GoogleAnalyticsTracker.Simple",
10 | "PackageVersion": "1.0.0-CI00002",
11 | "FeedIdentifier": "sample-feed",
12 | "FeedUrl": "https://www.myget.org/F/sample-feed/"
13 | }
14 | }
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.MyGet.Test/Messages/PackagePinnedMessage.json:
--------------------------------------------------------------------------------
1 | {
2 | "Identifier": "3374190e-33ed-4546-a1c1-d47e19b1980f",
3 | "Username": "maartenba",
4 | "When": "2014-09-08T13:07:43.1294196Z",
5 | "PayloadType": "PackagePinnedWebHookEventPayloadV1",
6 | "Payload": {
7 | "Action": "pinned",
8 | "PackageType": "NuGet",
9 | "PackageIdentifier": "GoogleAnalyticsTracker.Simple",
10 | "PackageVersion": "1.0.0-CI00002",
11 | "FeedIdentifier": "sample-feed",
12 | "FeedUrl": "https://www.myget.org/F/sample-feed/"
13 | }
14 | }
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.MyGet.Test/Messages/PingMessage.json:
--------------------------------------------------------------------------------
1 | {
2 | "Identifier": "f83b6de3-9476-43b0-9f75-f9bf478539ca",
3 | "Username": "maartenba",
4 | "When": "2014-09-08T13:06:25.8446143Z",
5 | "PayloadType": "PingWebHookEventPayloadV1",
6 | "Payload": {
7 | }
8 | }
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.MyGet.Test/Messages/UnknownMessage.json:
--------------------------------------------------------------------------------
1 | {
2 | "PayloadType": "Unknown",
3 | "Payload": {
4 | }
5 | }
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.MyGet.Test/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using System.Runtime.InteropServices;
6 |
7 | [assembly: CLSCompliant(false)]
8 | [assembly: ComVisible(false)]
9 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.PayPal.Test/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.PayPal.Test/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using System.Runtime.InteropServices;
6 |
7 | [assembly: CLSCompliant(false)]
8 | [assembly: ComVisible(false)]
9 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.Pusher.Test/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.Pusher.Test/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using System.Runtime.InteropServices;
6 |
7 | [assembly: CLSCompliant(false)]
8 | [assembly: ComVisible(false)]
9 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.Salesforce.Test/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.Salesforce.Test/Messages/OutboundMessage2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.Salesforce.Test/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using System.Runtime.InteropServices;
6 |
7 | [assembly: CLSCompliant(false)]
8 | [assembly: ComVisible(false)]
9 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.Slack.Test/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.Slack.Test/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using System.Runtime.InteropServices;
6 |
7 | [assembly: CLSCompliant(false)]
8 | [assembly: ComVisible(false)]
9 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.Slack.Test/WebHooks/SlackFieldTests.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using Microsoft.TestUtilities;
5 | using Xunit;
6 |
7 | namespace Microsoft.AspNet.WebHooks
8 | {
9 | public class SlackFieldTests
10 | {
11 | [Fact]
12 | public void Title_Roundtrips()
13 | {
14 | SlackField field = new SlackField("MyTitle", "MyValue");
15 | PropertyAssert.Roundtrips(field, a => a.Title, PropertySetter.NullThrows, defaultValue: "MyTitle", roundtripValue: "你好世界");
16 | }
17 |
18 | [Fact]
19 | public void Value_Roundtrips()
20 | {
21 | SlackField field = new SlackField("MyTitle", "MyValue");
22 | PropertyAssert.Roundtrips(field, a => a.Value, PropertySetter.NullThrows, defaultValue: "MyValue", roundtripValue: "你好世界");
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.Slack.Test/WebHooks/SlackResponseTests.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using Microsoft.TestUtilities;
5 | using Xunit;
6 |
7 | namespace Microsoft.AspNet.WebHooks
8 | {
9 | public class SlackResponseTests
10 | {
11 | private const string Text = "This is a test";
12 |
13 | private SlackResponse _response;
14 |
15 | public SlackResponseTests()
16 | {
17 | _response = new SlackResponse(Text);
18 | }
19 |
20 | [Fact]
21 | public void Text_Roundtrips()
22 | {
23 | PropertyAssert.Roundtrips(_response, c => c.Text, PropertySetter.NullThrows, defaultValue: Text, roundtripValue: "你好世界");
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.Stripe.Test/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.Stripe.Test/Messages/StripeEvent.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "evt_17Y0a62eZvKYlo2CfDvB2QrJ",
3 | "object": "event",
4 | "api_version": "2015-10-16",
5 | "created": 3600,
6 | "data": {
7 | "object": {
8 | "id": "12345",
9 | "object": "card"
10 | },
11 | "previous_attributes": {
12 | "balance": null,
13 | "next": 1340924237,
14 | "closed": false
15 | }
16 | },
17 | "livemode": true,
18 | "pending_webhooks": 10,
19 | "request": {
20 | "id": "req_7nbnyKCObIkSXC"
21 | },
22 | "type": "customer.source.created"
23 | }
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.Stripe.Test/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using System.Runtime.InteropServices;
6 |
7 | [assembly: CLSCompliant(false)]
8 | [assembly: ComVisible(false)]
9 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.Test/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.Test/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using System.Runtime.InteropServices;
6 |
7 | [assembly: CLSCompliant(false)]
8 | [assembly: ComVisible(false)]
9 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.Trello.Test/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.Trello.Test/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using System.Runtime.InteropServices;
6 |
7 | [assembly: CLSCompliant(false)]
8 | [assembly: ComVisible(false)]
9 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.VSTS.Test/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.VSTS.Test/Common/Extensions.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using System.Globalization;
6 |
7 | namespace Microsoft.AspNet.WebHooks
8 | {
9 | internal static class Extensions
10 | {
11 | public static DateTime ToDateTime(this string self)
12 | {
13 | return DateTime.Parse(self, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal);
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.VSTS.Test/Messages/bad.noEventType.json:
--------------------------------------------------------------------------------
1 | {
2 | "subscriptionId": "00000000-0000-0000-0000-000000000000"
3 | }
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.VSTS.Test/Messages/bad.notMappedEventType.json:
--------------------------------------------------------------------------------
1 | {
2 | "subscriptionId": "00000000-0000-0000-0000-000000000000",
3 | "notificationId": 5,
4 | "eventType": "unknownType"
5 | }
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.VSTS.Test/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using System.Runtime.InteropServices;
6 |
7 | [assembly: CLSCompliant(false)]
8 | [assembly: ComVisible(false)]
9 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.WordPress.Test/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.WordPress.Test/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using System.Runtime.InteropServices;
6 |
7 | [assembly: CLSCompliant(false)]
8 | [assembly: ComVisible(false)]
9 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.Zendesk.Test/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.Zendesk.Test/Messages/ZendeskPostMessage.json:
--------------------------------------------------------------------------------
1 | {
2 | "devices": [
3 | {
4 | "identifier": "oiuytrdsdfghjk",
5 | "type": "ios"
6 | },
7 | {
8 | "identifier": "iuytfrdcvbnmkl",
9 | "type": "android"
10 | }
11 | ],
12 | "notification": {
13 | "body": "Agent replied something something",
14 | "title": "Agent replied",
15 | "ticket_id": "5"
16 | }
17 | }
--------------------------------------------------------------------------------
/test/Microsoft.AspNet.WebHooks.Receivers.Zendesk.Test/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using System.Runtime.InteropServices;
6 |
7 | [assembly: CLSCompliant(false)]
8 | [assembly: ComVisible(false)]
9 |
--------------------------------------------------------------------------------
/test/Microsoft.TestUtilities/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/test/Microsoft.TestUtilities/Mocks/ActionMocks.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 |
6 | namespace Microsoft.TestUtilities.Mocks
7 | {
8 | ///
9 | /// Various mockable which can be used when mocking and
10 | /// passed as arguments.
11 | ///
12 | public class ActionMocks
13 | {
14 | public virtual void Action(T1 value1)
15 | {
16 | throw new NotImplementedException();
17 | }
18 |
19 | public virtual void Action(T1 value1, T2 value2)
20 | {
21 | throw new NotImplementedException();
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/test/Microsoft.TestUtilities/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.Runtime.InteropServices;
5 |
6 | [assembly: ComVisible(false)]
7 |
--------------------------------------------------------------------------------
/tools/35MSSharedLib1024.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aspnet/AspNetWebHooks/21b91e63279bf29224208c8ab5735e8345ec7926/tools/35MSSharedLib1024.snk
--------------------------------------------------------------------------------
/tools/WebHooks.targets:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/tools/WebHooks.xunit.targets:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
17 |
18 |
--------------------------------------------------------------------------------
/tools/src/Microsoft.Web.FxCop/DoNotUseFinalizersRule.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
2 |
3 | using Microsoft.FxCop.Sdk;
4 |
5 | namespace Microsoft.Web.FxCop
6 | {
7 | public class DoNotUseFinalizersRule : IntrospectionRule
8 | {
9 | public DoNotUseFinalizersRule()
10 | : base("DoNotUseFinalizers")
11 | {
12 | }
13 |
14 | public override ProblemCollection Check(Member member)
15 | {
16 | if (member.NodeType == NodeType.Method && member.Name.Name == "Finalize")
17 | {
18 | Problems.Add(new Problem(GetResolution(member.DeclaringType.FullName), member));
19 | }
20 |
21 | return Problems;
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/tools/src/Microsoft.Web.FxCop/IntrospectionRule.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
2 |
3 | using Microsoft.FxCop.Sdk;
4 |
5 | namespace Microsoft.Web.FxCop
6 | {
7 | public abstract class IntrospectionRule : BaseIntrospectionRule
8 | {
9 | protected IntrospectionRule(string name)
10 | : base(name, "Microsoft.Web.FxCop.Rules", typeof(IntrospectionRule).Assembly)
11 | {
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/tools/src/Microsoft.Web.FxCop/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
2 |
3 | using System.Reflection;
4 |
5 | [assembly: AssemblyProduct("Microsoft.Web.FxCop")]
6 | [assembly: AssemblyDescription("FxCop rules used by the Microsoft ASP.NET WebHooks projects")]
7 | [assembly: AssemblyCompany("Microsoft Open Technologies, Inc.")]
8 | [assembly: AssemblyCopyright("© Microsoft Open Technologies, Inc. All rights reserved.")]
9 |
--------------------------------------------------------------------------------
/version.props:
--------------------------------------------------------------------------------
1 |
2 |
3 | 1.2.2
4 | rtm
5 | $(VersionPrefix)
6 | $(VersionPrefix)-$(VersionSuffix)-final
7 | t000
8 | $(VersionSuffix)-$(BuildNumber)
9 |
10 |
11 |
--------------------------------------------------------------------------------