Skip to content

Commit

Permalink
Merge pull request #45 from TunNetCom/ConventionNaming
Browse files Browse the repository at this point in the history
Fix naming,namespace,usings
  • Loading branch information
MarwenSaad authored Aug 25, 2024
2 parents 84d2812 + 1756fd6 commit 45b0669
Show file tree
Hide file tree
Showing 146 changed files with 272 additions and 423 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
namespace AzureDevopsService.API;
using AzureDevopsService.Application.AzureDevopsExternalResourceService.OrganizationProjectService;
using AzureDevopsService.Application.AzureDevopsExternalResourceService.ProfileUserService;
using AzureDevopsService.Application.AzureDevopsExternalResourceService.WorkItem;
using AzureDevopsService.Contracts.AzureRequestResourceModel;
using AzureDevopsService.Contracts.AzureResponceModel;

namespace AzureDevopsService.API;

public static class AzureDevopsEndpoints
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
global using TunNetCom.AionTime.AzureDevopsService.API;

Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace TunNetCom.AionTime.AzureDevopsService.API;
using AzureDevopsService.API;

namespace AzureDevopsService.API;

public static class ExtensionServiceRegistration
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace TunNetCom.AionTime.AzureDevopsService.API;
using AzureDevopsService.API;

namespace AzureDevopsService.API;

public class GlobalExceptionHandler(ILogger<GlobalExceptionHandler> logger) : IExceptionHandler
{
Expand Down
13 changes: 1 addition & 12 deletions src/AzureDevopsService/AzureDevopsService.API/GlobalUsings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,4 @@
global using System.Text.Json.Serialization;
global using System.Text.RegularExpressions;
global using System.Threading;
global using System.Threading.Tasks;
global using TunNetCom;
global using TunNetCom.AionTime;
global using TunNetCom.AionTime.AzureDevopsService;
global using TunNetCom.AionTime.AzureDevopsService.API;
global using TunNetCom.AionTime.AzureDevopsService.Application;
global using TunNetCom.AionTime.AzureDevopsService.Application.AzureDevopsExternalResourceService;
global using TunNetCom.AionTime.AzureDevopsService.Application.AzureDevopsExternalResourceService.OrganizationProjectService;
global using TunNetCom.AionTime.AzureDevopsService.Application.AzureDevopsExternalResourceService.ProfileUserService;
global using TunNetCom.AionTime.AzureDevopsService.Application.AzureDevopsExternalResourceService.WorkItem;
global using TunNetCom.AionTime.AzureDevopsService.Contracts.AzureRequestResourceModel;
global using TunNetCom.AionTime.AzureDevopsService.Contracts.AzureResponceModel;
global using System.Threading.Tasks;
1 change: 1 addition & 0 deletions src/AzureDevopsService/AzureDevopsService.API/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using AzureDevopsService.API;
using AzureDevopsService.Application;

Log.Logger = new LoggerConfiguration()
.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace TunNetCom.AionTime.AzureDevopsService.Application.AzureDevopsExternalResourceService.OrganizationProjectService;
namespace AzureDevopsService.Application.AzureDevopsExternalResourceService.OrganizationProjectService;

public interface IProjectService
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using AzureDevopsService.Contracts.AzureRequestResourceModel;

namespace TunNetCom.AionTime.AzureDevopsService.Application.AzureDevopsExternalResourceService.ProfileUserService
namespace AzureDevopsService.Application.AzureDevopsExternalResourceService.ProfileUserService
{
public interface IUserProfileApiClient
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using AzureDevopsService.Contracts.AzureRequestResourceModel;
using TunNetCom.AionTime.AzureDevopsService.Contracts.Constant;

namespace TunNetCom.AionTime.AzureDevopsService.Application.AzureDevopsExternalResourceService.ProfileUserService;
namespace AzureDevopsService.Application.AzureDevopsExternalResourceService.ProfileUserService;

public class UserProfileApiClient(HttpClient httpClient, ILogger<UserProfileApiClient> logger) : IUserProfileApiClient
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace TunNetCom.AionTime.AzureDevopsService.Application.AzureDevopsExternalResourceService.ServiceHelper;
namespace AzureDevopsService.Application.AzureDevopsExternalResourceService.ServiceHelper;

public static class HttpClientHelper
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using AzureDevopsService.Contracts.AzureRequestResourceModel;

namespace TunNetCom.AionTime.AzureDevopsService.Application.AzureDevopsExternalResourceService.ServiceHelper.WorkItem;
namespace AzureDevopsService.Application.AzureDevopsExternalResourceService.ServiceHelper.WorkItem;

public static class WorkItemHelper
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
using AzureDevopsService.Contracts.AzureResponceModel;
namespace AzureDevopsService.Application.AzureDevopsExternalResourceService.WorkItem;

namespace TunNetCom.AionTime.AzureDevopsService.Application.AzureDevopsExternalResourceService.WorkItem
public interface IWorkItemExternalService
{
public interface IWorkItemExternalService
{
Task<OneOf<WiqlResponses?, WiqlBadRequestResponce?>> GetWorkItemByUser(WorkItemRequest resource);
}
Task<OneOf<WiqlResponses?, WiqlBadRequestResponce?>> GetWorkItemByUser(WorkItemRequest resource);
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using AzureDevopsService.Contracts.AzureRequestResourceModel;
using AzureDevopsService.Contracts.AzureResponceModel;
using TunNetCom.AionTime.AzureDevopsService.Application.AzureDevopsExternalResourceService.ServiceHelper.WorkItem;

namespace TunNetCom.AionTime.AzureDevopsService.Application.AzureDevopsExternalResourceService.WorkItem;
namespace AzureDevopsService.Application.AzureDevopsExternalResourceService.WorkItem;

public class WorkItemExternalService(HttpClient httpClient, ILogger<WorkItemExternalService> logger) : IWorkItemExternalService
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using AzureDevopsService.Application.AzureDevopsExternalResourceService.OrganizationProjectService;
using TunNetCom.AionTime.AzureDevopsService.Application.AzureDevopsExternalResourceService.OrganizationProjectService;

namespace TunNetCom.AionTime.AzureDevopsService.Application;
namespace AzureDevopsService.Application;

public static class ExtentionRegistrationService
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
global using Microsoft.AspNetCore.Mvc;
global using AzureDevopsService.Application;
global using AzureDevopsService.Application.AzureDevopsExternalResourceService.OrganizationProjectService;
global using AzureDevopsService.Application.AzureDevopsExternalResourceService.ProfileUserService;
global using AzureDevopsService.Application.AzureDevopsExternalResourceService.ServiceHelper;
global using AzureDevopsService.Application.AzureDevopsExternalResourceService.ServiceHelper.WorkItem;
global using AzureDevopsService.Application.AzureDevopsExternalResourceService.WorkItem;
global using AzureDevopsService.Contracts.AzureRequestResourceModel;
global using AzureDevopsService.Contracts.AzureResponceModel;
global using AzureDevopsService.Contracts.Constant;
global using Microsoft.AspNetCore.Mvc;
global using Microsoft.Extensions.DependencyInjection;
global using Microsoft.Extensions.Logging;
global using Microsoft.TeamFoundation.Core.WebApi;
Expand All @@ -17,17 +26,4 @@
global using System.Net.Http.Headers;
global using System.Net.Http.Json;
global using System.Text;
global using System.Threading.Tasks;
global using TunNetCom;
global using TunNetCom.AionTime;
global using TunNetCom.AionTime.AzureDevopsService;
global using TunNetCom.AionTime.AzureDevopsService.Application;
global using TunNetCom.AionTime.AzureDevopsService.Application.AzureDevopsExternalResourceService;
global using TunNetCom.AionTime.AzureDevopsService.Application.AzureDevopsExternalResourceService.OrganizationProjectService;
global using TunNetCom.AionTime.AzureDevopsService.Application.AzureDevopsExternalResourceService.ProfileUserService;
global using TunNetCom.AionTime.AzureDevopsService.Application.AzureDevopsExternalResourceService.ServiceHelper;
global using TunNetCom.AionTime.AzureDevopsService.Application.AzureDevopsExternalResourceService.ServiceHelper.WorkItem;
global using TunNetCom.AionTime.AzureDevopsService.Application.AzureDevopsExternalResourceService.WorkItem;
global using TunNetCom.AionTime.AzureDevopsService.Contracts.AzureRequestResourceModel;
global using TunNetCom.AionTime.AzureDevopsService.Contracts.AzureResponceModel;
global using TunNetCom.AionTime.AzureDevopsService.Contracts.Constant;
global using System.Threading.Tasks;
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
using AzureDevopsService.Contracts.AzureRequestResourceModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TunNetCom.AionTime.AzureDevopsService.Contracts.AzureRequestResourceModel
namespace AzureDevopsService.Contracts.AzureRequestResourceModel
{
public class AllProjectUnderOrganizationRequest : BaseRequest
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
using AzureDevopsService.Contracts.AzureRequestResourceModel;
using TunNetCom;
using TunNetCom.AionTime;
using TunNetCom.AionTime.AzureDevopsService;
using TunNetCom.AionTime.AzureDevopsService.Contracts;
using TunNetCom.AionTime.AzureDevopsService.Contracts.AzureRequestResourceModel;

namespace AzureDevopsService.Contracts.AzureRequestResourceModel;
namespace AzureDevopsService.Contracts.AzureRequestResourceModel;

public class BaseRequest
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
using AzureDevopsService.Contracts.AzureRequestResourceModel;
namespace AzureDevopsService.Contracts.AzureRequestResourceModel;

namespace AzureDevopsService.Contracts.AzureRequestResourceModel
public class GetUserOrganizationRequest : BaseRequest
{
public class GetUserOrganizationRequest : BaseRequest
{
public required string MemberId { get; set; }
}
public required string MemberId { get; set; }
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
using AzureDevopsService.Contracts.AzureRequestResourceModel;
using TunNetCom;
using TunNetCom.AionTime;
using TunNetCom.AionTime.AzureDevopsService;
using TunNetCom.AionTime.AzureDevopsService.Contracts;
using TunNetCom.AionTime.AzureDevopsService.Contracts.AzureRequestResourceModel;

namespace AzureDevopsService.Contracts.AzureRequestResourceModel
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using AzureDevopsService.Contracts.AzureRequestResourceModel;
using TunNetCom.AionTime.AzureDevopsService.Contracts.AzureResponceModel;

namespace TunNetCom.AionTime.AzureDevopsService.Contracts.AzureRequestResourceModel
namespace AzureDevopsService.Contracts.AzureRequestResourceModel
{
public class WorkItemRequest : BaseRequest
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
using AzureDevopsService.Contracts.AzureRequestResourceModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TunNetCom.AionTime.AzureDevopsService.Contracts.AzureRequestResourceModel;

namespace TunNetCom.AionTime.AzureDevopsService.Contracts.AzureResponceModel
namespace AzureDevopsService.Contracts.AzureResponceModel
{
public class AllProjectResponce : BaseRequest
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace TunNetCom.AionTime.AzureDevopsService.Contracts.AzureResponceModel;
namespace AzureDevopsService.Contracts.AzureResponceModel;

public class Column
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TunNetCom.AionTime.AzureDevopsService.Contracts.AzureRequestResourceModel;

namespace TunNetCom.AionTime.AzureDevopsService.Contracts.AzureResponceModel
namespace AzureDevopsService.Contracts.AzureResponceModel
{
public class CustomProblemDetailsResponce : ProblemDetails
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
using TunNetCom;
using TunNetCom.AionTime;
using TunNetCom.AionTime.AzureDevopsService;
using TunNetCom.AionTime.AzureDevopsService.Contracts;
using TunNetCom.AionTime.AzureDevopsService.Contracts.AzureResponceModel;

namespace TunNetCom.AionTime.AzureDevopsService.Contracts.AzureResponceModel
namespace AzureDevopsService.Contracts.AzureResponceModel
{
public class Project
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
using AzureDevopsService.Contracts.AzureRequestResourceModel;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TunNetCom;
using TunNetCom.AionTime;
using TunNetCom.AionTime.AzureDevopsService;
using TunNetCom.AionTime.AzureDevopsService.Contracts;
using TunNetCom.AionTime.AzureDevopsService.Contracts.AzureRequestResourceModel;
using TunNetCom.AionTime.AzureDevopsService.Contracts.AzureResponceModel;

namespace TunNetCom.AionTime.AzureDevopsService.Contracts.AzureResponceModel
namespace AzureDevopsService.Contracts.AzureResponceModel
{
public class UserAccount : BaseRequest
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
using TunNetCom;
using TunNetCom.AionTime;
using TunNetCom.AionTime.AzureDevopsService;
using TunNetCom.AionTime.AzureDevopsService.Contracts;
using TunNetCom.AionTime.AzureDevopsService.Contracts.AzureResponceModel;

namespace TunNetCom.AionTime.AzureDevopsService.Contracts.AzureResponceModel;
namespace AzureDevopsService.Contracts.AzureResponceModel;

public class UserOrganization
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
using AzureDevopsService.Contracts.AzureRequestResourceModel;
using TunNetCom;
using TunNetCom.AionTime;
using TunNetCom.AionTime.AzureDevopsService;
using TunNetCom.AionTime.AzureDevopsService.Contracts;
using TunNetCom.AionTime.AzureDevopsService.Contracts.AzureRequestResourceModel;
using TunNetCom.AionTime.AzureDevopsService.Contracts.AzureResponceModel;

namespace TunNetCom.AionTime.AzureDevopsService.Contracts.AzureResponceModel;
namespace AzureDevopsService.Contracts.AzureResponceModel;

public class UserProfile : BaseRequest
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,40 +1,25 @@
using AzureDevopsService.Contracts.AzureRequestResourceModel;
using AzureDevopsService.Contracts.AzureResponceModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using TunNetCom;
using TunNetCom.AionTime;
using TunNetCom.AionTime.AzureDevopsService;
using TunNetCom.AionTime.AzureDevopsService.Contracts;
using TunNetCom.AionTime.AzureDevopsService.Contracts.AzureRequestResourceModel;
using TunNetCom.AionTime.AzureDevopsService.Contracts.AzureResponceModel;

namespace AzureDevopsService.Contracts.AzureResponceModel;
namespace AzureDevopsService.Contracts.AzureResponceModel;

public class WiqlBadRequestResponce : BaseRequest
{
[JsonPropertyName("$id")]
[JsonProperty("$id")]
public string? Id { get; set; } = string.Empty;

[JsonPropertyName("innerException")]
[JsonProperty("innerException")]
public string? InnerException { get; set; } = string.Empty;

[JsonPropertyName("message")]
[JsonProperty("message")]
public string? Message { get; set; } = string.Empty;

[JsonPropertyName("typeName")]
[JsonProperty("typeName")]
public string? TypeName { get; set; } = string.Empty;

[JsonPropertyName("typeKey")]
[JsonProperty("typeKey")]
public string? TypeKey { get; set; } = string.Empty;

[JsonPropertyName("errorCode")]
[JsonProperty("errorCode")]
public int? ErrorCode { get; set; }

[JsonPropertyName("eventId")]
[JsonProperty("eventId")]
public int? EventId { get; set; }
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
using AzureDevopsService.Contracts.AzureRequestResourceModel;
using System;
using System.Collections.Generic;
using System.Data.Common;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TunNetCom.AionTime.AzureDevopsService.Contracts.AzureRequestResourceModel;

namespace TunNetCom.AionTime.AzureDevopsService.Contracts.AzureResponceModel;
namespace AzureDevopsService.Contracts.AzureResponceModel;

public class WiqlResponses : BaseRequest
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace TunNetCom.AionTime.AzureDevopsService.Contracts.AzureResponceModel;
namespace AzureDevopsService.Contracts.AzureResponceModel;

public class WorkItem
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace TunNetCom.AionTime.AzureDevopsService.Contracts.Constant;
namespace AzureDevopsService.Contracts.Constant;

public static class AzureResponseMessage
{
Expand Down
Loading

0 comments on commit 45b0669

Please sign in to comment.