Browse Source

Small Refactoring (#1558)

pull/1572/head
Viswanatha Swamy 4 years ago
committed by GitHub
parent
commit
81e4312cdd
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 19 additions and 80 deletions
  1. +2
    -5
      src/Web/WebhookClient/Controllers/WebhooksReceivedController.cs
  2. +1
    -6
      src/Web/WebhookClient/HeaderNames.cs
  3. +0
    -2
      src/Web/WebhookClient/HttpClientAuthorizationDelegatingHandler.cs
  4. +1
    -3
      src/Web/WebhookClient/Models/WebHookReceived.cs
  5. +0
    -3
      src/Web/WebhookClient/Models/WebhookData.cs
  6. +0
    -3
      src/Web/WebhookClient/Models/WebhookResponse.cs
  7. +1
    -6
      src/Web/WebhookClient/Models/WebhookSubscriptionRequest.cs
  8. +1
    -5
      src/Web/WebhookClient/Pages/Error.cshtml.cs
  9. +1
    -5
      src/Web/WebhookClient/Pages/Index.cshtml.cs
  10. +1
    -6
      src/Web/WebhookClient/Pages/Privacy.cshtml.cs
  11. +5
    -9
      src/Web/WebhookClient/Pages/RegisterWebhook.cshtml.cs
  12. +1
    -4
      src/Web/WebhookClient/Pages/WebhooksList.cshtml.cs
  13. +1
    -8
      src/Web/WebhookClient/Program.cs
  14. +1
    -3
      src/Web/WebhookClient/Services/IHooksRepository.cs
  15. +1
    -3
      src/Web/WebhookClient/Services/IWebhooksClient.cs
  16. +1
    -2
      src/Web/WebhookClient/Services/InMemoryHooksRepository.cs
  17. +0
    -1
      src/Web/WebhookClient/Services/WebhooksClient.cs
  18. +1
    -6
      src/Web/WebhookClient/Settings.cs

+ 2
- 5
src/Web/WebhookClient/Controllers/WebhooksReceivedController.cs View File

@ -1,9 +1,6 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using System;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using WebhookClient.Models; using WebhookClient.Models;
@ -19,7 +16,7 @@ namespace WebhookClient.Controllers
private readonly Settings _settings; private readonly Settings _settings;
private readonly ILogger _logger; private readonly ILogger _logger;
private readonly IHooksRepository _hooksRepository; private readonly IHooksRepository _hooksRepository;
public WebhooksReceivedController(IOptions<Settings> settings, ILogger<WebhooksReceivedController> logger, IHooksRepository hooksRepository) public WebhooksReceivedController(IOptions<Settings> settings, ILogger<WebhooksReceivedController> logger, IHooksRepository hooksRepository)
{ {
_settings = settings.Value; _settings = settings.Value;


+ 1
- 6
src/Web/WebhookClient/HeaderNames.cs View File

@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace WebhookClient
namespace WebhookClient
{ {
static class HeaderNames static class HeaderNames
{ {


+ 0
- 2
src/Web/WebhookClient/HttpClientAuthorizationDelegatingHandler.cs View File

@ -1,8 +1,6 @@
using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Net.Http; using System.Net.Http;
using System.Net.Http.Headers; using System.Net.Http.Headers;
using System.Threading; using System.Threading;


+ 1
- 3
src/Web/WebhookClient/Models/WebHookReceived.cs View File

@ -1,13 +1,11 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace WebhookClient.Models namespace WebhookClient.Models
{ {
public class WebHookReceived public class WebHookReceived
{ {
public DateTime When { get; set; } public DateTime When { get; set; }
public string Data { get; set; } public string Data { get; set; }
public string Token { get; set; } public string Token { get; set; }


+ 0
- 3
src/Web/WebhookClient/Models/WebhookData.cs View File

@ -1,7 +1,4 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace WebhookClient.Models namespace WebhookClient.Models
{ {


+ 0
- 3
src/Web/WebhookClient/Models/WebhookResponse.cs View File

@ -1,7 +1,4 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace WebhookClient.Models namespace WebhookClient.Models
{ {


+ 1
- 6
src/Web/WebhookClient/Models/WebhookSubscriptionRequest.cs View File

@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace WebhookClient.Models
namespace WebhookClient.Models
{ {
public class WebhookSubscriptionRequest public class WebhookSubscriptionRequest
{ {


+ 1
- 5
src/Web/WebhookClient/Pages/Error.cshtml.cs View File

@ -1,10 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.AspNetCore.Mvc.RazorPages;
using System.Diagnostics;
namespace WebhookClient.Pages namespace WebhookClient.Pages
{ {


+ 1
- 5
src/Web/WebhookClient/Pages/Index.cshtml.cs View File

@ -1,10 +1,6 @@
using System;
using Microsoft.AspNetCore.Mvc.RazorPages;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.AspNetCore.Http;
using WebhookClient.Models; using WebhookClient.Models;
using WebhookClient.Services; using WebhookClient.Services;


+ 1
- 6
src/Web/WebhookClient/Pages/Privacy.cshtml.cs View File

@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace WebhookClient.Pages namespace WebhookClient.Pages
{ {


+ 5
- 9
src/Web/WebhookClient/Pages/RegisterWebhook.cshtml.cs View File

@ -1,16 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Net.Http.Formatting;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using Newtonsoft.Json; using Newtonsoft.Json;
using System.Net;
using System.Net.Http;
using System.Net.Http.Formatting;
using System.Threading.Tasks;
using WebhookClient.Models; using WebhookClient.Models;
namespace WebhookClient.Pages namespace WebhookClient.Pages


+ 1
- 4
src/Web/WebhookClient/Pages/WebhooksList.cshtml.cs View File

@ -1,9 +1,6 @@
using System;
using Microsoft.AspNetCore.Mvc.RazorPages;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using WebhookClient.Models; using WebhookClient.Models;
using WebhookClient.Services; using WebhookClient.Services;


+ 1
- 8
src/Web/WebhookClient/Program.cs View File

@ -1,12 +1,5 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
namespace WebhookClient namespace WebhookClient
{ {


+ 1
- 3
src/Web/WebhookClient/Services/IHooksRepository.cs View File

@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using WebhookClient.Models; using WebhookClient.Models;


+ 1
- 3
src/Web/WebhookClient/Services/IWebhooksClient.cs View File

@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using WebhookClient.Models; using WebhookClient.Models;


+ 1
- 2
src/Web/WebhookClient/Services/InMemoryHooksRepository.cs View File

@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using WebhookClient.Models; using WebhookClient.Models;


+ 0
- 1
src/Web/WebhookClient/Services/WebhooksClient.cs View File

@ -1,6 +1,5 @@
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using Newtonsoft.Json; using Newtonsoft.Json;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Net.Http; using System.Net.Http;
using System.Threading.Tasks; using System.Threading.Tasks;


+ 1
- 6
src/Web/WebhookClient/Settings.cs View File

@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace WebhookClient
namespace WebhookClient
{ {
public class Settings public class Settings
{ {


Loading…
Cancel
Save