Adding external services to Service folder

This commit is contained in:
Reginald Cherenfant Jasmin 2023-09-04 21:59:21 -04:00
parent a1a9fd1dc5
commit 24a6e6513e
10 changed files with 20 additions and 38 deletions

View File

@ -1,7 +1,7 @@
using DamageAssesment.Api.SurveyResponses.Db; using DamageAssesment.Api.SurveyResponses.Db;
using DamageAssesment.Api.SurveyResponses.Interfaces; using DamageAssesment.Api.SurveyResponses.Interfaces;
using DamageAssesment.Api.SurveyResponses.Services;
using DamageAssesment.Api.SurveyResponses.Providers; using DamageAssesment.Api.SurveyResponses.Providers;
using DamageAssesment.Api.SurveyResponses.Utils;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Polly; using Polly;
using System.Reflection; using System.Reflection;

View File

@ -1,16 +1,9 @@
using DamageAssesment.Api.SurveyResponses.Bases; using DamageAssesment.Api.SurveyResponses.Interfaces;
using DamageAssesment.Api.SurveyResponses.Db;
using DamageAssesment.Api.SurveyResponses.Interfaces;
using DamageAssesment.Api.SurveyResponses.Models; using DamageAssesment.Api.SurveyResponses.Models;
using Newtonsoft.Json; using Newtonsoft.Json;
using System.Data.Common;
using System.Security.Cryptography;
using System.Text.Json.Nodes;
using System.Text;
using System.Net.Http.Headers;
using System;
namespace DamageAssesment.Api.SurveyResponses.Providers
namespace DamageAssesment.Api.SurveyResponses.Services
{ {
public class AnswerServiceProvider : ServiceProviderBase, IAnswerServiceProvider public class AnswerServiceProvider : ServiceProviderBase, IAnswerServiceProvider
{ {

View File

@ -1,11 +1,8 @@
using DamageAssesment.Api.SurveyResponses.Bases; using DamageAssesment.Api.SurveyResponses.Interfaces;
using DamageAssesment.Api.SurveyResponses.Interfaces;
using DamageAssesment.Api.SurveyResponses.Models; using DamageAssesment.Api.SurveyResponses.Models;
using Newtonsoft.Json; using Newtonsoft.Json;
using System.Net.Http.Headers;
using System.Text;
namespace DamageAssesment.Api.SurveyResponses.Providers namespace DamageAssesment.Api.SurveyResponses.Services
{ {
public class AttachmentServiceProvider : ServiceProviderBase, IAttachmentServiceProvider public class AttachmentServiceProvider : ServiceProviderBase, IAttachmentServiceProvider
{ {

View File

@ -1,11 +1,8 @@
using DamageAssesment.Api.SurveyResponses.Bases; using DamageAssesment.Api.SurveyResponses.Interfaces;
using DamageAssesment.Api.SurveyResponses.Interfaces;
using DamageAssesment.Api.SurveyResponses.Models; using DamageAssesment.Api.SurveyResponses.Models;
using DamageAssesment.Api.SurveyResponses.Utils;
using Newtonsoft.Json; using Newtonsoft.Json;
using System.Reflection;
namespace DamageAssesment.Api.SurveyResponses.Providers namespace DamageAssesment.Api.SurveyResponses.Services
{ {
public class EmployeeServiceProvider :ServiceProviderBase, IEmployeeServiceProvider public class EmployeeServiceProvider :ServiceProviderBase, IEmployeeServiceProvider
{ {

View File

@ -1,9 +1,8 @@
using DamageAssesment.Api.SurveyResponses.Bases; using DamageAssesment.Api.SurveyResponses.Interfaces;
using DamageAssesment.Api.SurveyResponses.Interfaces;
using System.Net.Http.Headers; using System.Net.Http.Headers;
using System.Text; using System.Text;
namespace DamageAssesment.Api.SurveyResponses.Utils namespace DamageAssesment.Api.SurveyResponses.Services
{ {
public class HttpUtil : IHttpUtil public class HttpUtil : IHttpUtil
{ {
@ -22,6 +21,7 @@ namespace DamageAssesment.Api.SurveyResponses.Utils
var request = new HttpRequestMessage(method, url); var request = new HttpRequestMessage(method, url);
request.Headers.Accept.Clear(); request.Headers.Accept.Clear();
request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
//request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", token); //request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", token);
if (method == HttpMethod.Post) if (method == HttpMethod.Post)
{ {

View File

@ -1,9 +1,8 @@
using DamageAssesment.Api.SurveyResponses.Bases; using DamageAssesment.Api.SurveyResponses.Interfaces;
using DamageAssesment.Api.SurveyResponses.Interfaces;
using DamageAssesment.Api.SurveyResponses.Models; using DamageAssesment.Api.SurveyResponses.Models;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace DamageAssesment.Api.SurveyResponses.Providers namespace DamageAssesment.Api.SurveyResponses.Services
{ {
public class LocationServiceProvider :ServiceProviderBase, ILocationServiceProvider public class LocationServiceProvider :ServiceProviderBase, ILocationServiceProvider
{ {

View File

@ -1,9 +1,8 @@
using DamageAssesment.Api.SurveyResponses.Bases; using DamageAssesment.Api.SurveyResponses.Interfaces;
using DamageAssesment.Api.SurveyResponses.Interfaces;
using DamageAssesment.Api.SurveyResponses.Models; using DamageAssesment.Api.SurveyResponses.Models;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace DamageAssesment.Api.SurveyResponses.Providers namespace DamageAssesment.Api.SurveyResponses.Services
{ {
public class QuestionServiceProvider : ServiceProviderBase, IQuestionServiceProvider public class QuestionServiceProvider : ServiceProviderBase, IQuestionServiceProvider
{ {

View File

@ -1,9 +1,8 @@
using DamageAssesment.Api.SurveyResponses.Bases; using DamageAssesment.Api.SurveyResponses.Interfaces;
using DamageAssesment.Api.SurveyResponses.Interfaces;
using DamageAssesment.Api.SurveyResponses.Models; using DamageAssesment.Api.SurveyResponses.Models;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace DamageAssesment.Api.SurveyResponses.Providers namespace DamageAssesment.Api.SurveyResponses.Services
{ {
public class RegionServiceProvider : ServiceProviderBase, IRegionServiceProvider public class RegionServiceProvider : ServiceProviderBase, IRegionServiceProvider
{ {

View File

@ -1,6 +1,6 @@
using DamageAssesment.Api.SurveyResponses.Interfaces; using DamageAssesment.Api.SurveyResponses.Interfaces;
namespace DamageAssesment.Api.SurveyResponses.Bases namespace DamageAssesment.Api.SurveyResponses.Services
{ {
public class ServiceProviderBase public class ServiceProviderBase
{ {

View File

@ -1,10 +1,8 @@
using DamageAssesment.Api.SurveyResponses.Bases; using DamageAssesment.Api.SurveyResponses.Interfaces;
using DamageAssesment.Api.SurveyResponses.Interfaces;
using DamageAssesment.Api.SurveyResponses.Models; using DamageAssesment.Api.SurveyResponses.Models;
using Newtonsoft.Json; using Newtonsoft.Json;
using System.Reflection;
namespace DamageAssesment.Api.SurveyResponses.Providers namespace DamageAssesment.Api.SurveyResponses.Services
{ {
public class SurveyServiceProvider :ServiceProviderBase, ISurveyServiceProvider public class SurveyServiceProvider :ServiceProviderBase, ISurveyServiceProvider
{ {