Skip to content

Commit

Permalink
Changing project Name Also the refactoring started
Browse files Browse the repository at this point in the history
  • Loading branch information
Edrisym committed Sep 3, 2024
1 parent b7904a6 commit 4ee352f
Show file tree
Hide file tree
Showing 15 changed files with 37 additions and 38 deletions.
18 changes: 9 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -409,14 +409,14 @@ FodyWeavers.xsd

# JetBrains Rider
*.sln.iml
obj/Debug/net6.0/refint/Sample.GoogleCalendarApi.dll
bin/Debug/net6.0/Sample.GoogleCalendarApi.dll
bin/Debug/net6.0/Sample.GoogleCalendarApi.dll
bin/Debug/net6.0/Sample.GoogleCalendarApi.pdb
obj/Debug/net6.0/Sample.GoogleCalendarApi.AssemblyInfo.cs
obj/Debug/net6.0/Sample.GoogleCalendarApi.AssemblyInfoInputs.cache
obj/Debug/net6.0/Sample.GoogleCalendarApi.dll
obj/Debug/net6.0/Sample.GoogleCalendarApi.pdb
obj/Debug/net6.0/Sample.GoogleCalendarApi.sourcelink.json
obj/Debug/net6.0/refint/GoogleCalendarApi.dll
bin/Debug/net6.0/GoogleCalendarApi.dll
bin/Debug/net6.0/GoogleCalendarApi.pdb
obj/Debug/net6.0/GoogleCalendarApi.AssemblyInfo.cs
obj/Debug/net6.0/GoogleCalendarApi.AssemblyInfoInputs.cache
obj/Debug/net6.0/GoogleCalendarApi.dll
obj/Debug/net6.0/GoogleCalendarApi.pdb
obj/Debug/net6.0/GoogleCalendarApi.sourcelink.json
obj/Debug/net6.0/ref/Sample.GoogleCalendarApi.dll
obj/Debug/net6.0/refint/Sample.GoogleCalendarApi.dll
/appsettings.Development.json
2 changes: 1 addition & 1 deletion Common/Method.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Text;
using NodaTime.TimeZones;

namespace CalendarApi.Common;
namespace GoogleCalendarApi.Common;

public class Method
{
Expand Down
2 changes: 1 addition & 1 deletion Common/Model/Credentials.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Sample.GoogleCalendarApi.Common.Model;
namespace GoogleCalendarApi.Common.Model;

public class Credentials
{
Expand Down
4 changes: 1 addition & 3 deletions Common/Model/EventModel.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Google.Apis.Calendar.v3.Data;

namespace Sample.GoogleCalendarApi.Common.Model;
namespace GoogleCalendarApi.Common.Model;

public class EventModel
{
Expand Down
8 changes: 4 additions & 4 deletions Controllers/GoogleCalendarController.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Microsoft.AspNetCore.Mvc;
using Sample.GoogleCalendarApi.Common.Model;
using Sample.GoogleCalendarApi.Services;
using GoogleCalendarApi.Common.Model;
using GoogleCalendarApi.Services;
using Microsoft.AspNetCore.Mvc;

namespace Sample.GoogleCalendarApi.Controllers
namespace GoogleCalendarApi.Controllers
{
[Route("api/[controller]")]
[ApiController]
Expand Down
8 changes: 4 additions & 4 deletions Controllers/OAuthController.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Microsoft.AspNetCore.Mvc;
using GoogleCalendarApi.Services;
using GoogleCalendarApi.Settings;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;
using Sample.GoogleCalendarApi.Services;
using Sample.GoogleCalendarApi.Settings;

namespace Sample.GoogleCalendarApi.Controllers
namespace GoogleCalendarApi.Controllers
{
[ApiController]
public class OAuthController : ControllerBase
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion Sample.GoogleCalendarApi.sln → GoogleCalendarApi.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.5.002.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.GoogleCalendarApi", "Sample.GoogleCalendarApi.csproj", "{2C65D9B1-B439-41B1-9239-2CF22155F4AE}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GoogleCalendarApi", "GoogleCalendarApi.csproj", "{2C65D9B1-B439-41B1-9239-2CF22155F4AE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
6 changes: 3 additions & 3 deletions Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Sample.GoogleCalendarApi.Common.Model;
using Sample.GoogleCalendarApi.Services;
using Sample.GoogleCalendarApi.Settings;
using GoogleCalendarApi.Common.Model;
using GoogleCalendarApi.Services;
using GoogleCalendarApi.Settings;

var builder = WebApplication.CreateBuilder(args);

Expand Down
9 changes: 5 additions & 4 deletions Services/GoogleCalendarService.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
using Google.Apis.Calendar.v3;
using Google.Apis.Calendar.v3.Data;
using GoogleCalendarApi.Common.Model;
using GoogleCalendarApi.Settings;
using Newtonsoft.Json.Linq;
using Sample.GoogleCalendarApi.Settings;
using RestSharp;
using Newtonsoft.Json;
using Sample.GoogleCalendarApi.Common.Model;
using Microsoft.Extensions.Options;
using Method = GoogleCalendarApi.Common.Method;

namespace Sample.GoogleCalendarApi.Services
namespace GoogleCalendarApi.Services
{
public class GoogleCalendarService : IGoogleCalendarService
{
Expand Down Expand Up @@ -192,7 +193,7 @@ public string GetAuthCode()
var include_granted_scopes = "true";
// var prompt = "select_account";
var login_hint = _settings.Value.LoginHint;
string redirect_uri_encode = CalendarApi.Common.Method.UrlEncodeForGoogle(redirectURL);
string redirect_uri_encode = Method.UrlEncodeForGoogle(redirectURL);
var mainURL = string.Format(scopeURL1, redirect_uri_encode, state, response_type, client_id, scope,
access_type, include_granted_scopes, login_hint);

Expand Down
4 changes: 2 additions & 2 deletions Services/IGoogleCalendarService.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

using Google.Apis.Calendar.v3.Data;
using Sample.GoogleCalendarApi.Common.Model;
using GoogleCalendarApi.Common.Model;

namespace Sample.GoogleCalendarApi.Services
namespace GoogleCalendarApi.Services
{
public interface IGoogleCalendarService
{
Expand Down
4 changes: 2 additions & 2 deletions Services/IOAuthService.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using Google.Apis.Auth.OAuth2;
using Google.Apis.Calendar.v3;
using GoogleCalendarApi.Settings;
using Microsoft.Extensions.Options;
using Newtonsoft.Json.Linq;
using Sample.GoogleCalendarApi.Settings;

namespace Sample.GoogleCalendarApi.Services;
namespace GoogleCalendarApi.Services;

public interface IOAuthService
{
Expand Down
4 changes: 2 additions & 2 deletions Services/OAuthService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
using Newtonsoft.Json.Linq;
using Google.Apis.Auth.OAuth2.Flows;
using Google.Apis.Auth.OAuth2.Responses;
using Sample.GoogleCalendarApi.Settings;
using Google.Apis.Services;
using GoogleCalendarApi.Settings;


namespace Sample.GoogleCalendarApi.Services;
namespace GoogleCalendarApi.Services;

public class OAuthService : IOAuthService
{
Expand Down
2 changes: 1 addition & 1 deletion Settings/GoogleCalendarSettings.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Sample.GoogleCalendarApi.Settings
namespace GoogleCalendarApi.Settings
{
public class GoogleCalendarSettings : IGoogleCalendarSettings
{
Expand Down
2 changes: 1 addition & 1 deletion Settings/IGoogleCalendarSettings.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Sample.GoogleCalendarApi.Settings
namespace GoogleCalendarApi.Settings
{
public interface IGoogleCalendarSettings
{
Expand Down

0 comments on commit 4ee352f

Please sign in to comment.