Skip to content

Commit cb88450

Browse files
committed
refactor(app): change namespace and initiate code restructuring
1 parent fddb63a commit cb88450

36 files changed

+129
-113
lines changed

.github/workflows/master_global-azure-greece-2021.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ jobs:
2121
dotnet-version: '3.1.102'
2222

2323
- name: Build with dotnet
24-
run: dotnet build --configuration Release
24+
run: dotnet build EventManagement.sln --configuration Release
2525

2626
- name: dotnet publish
27-
run: dotnet publish -c Release -o ${{env.DOTNET_ROOT}}/myapp
27+
run: dotnet publish EventManagement.sln -c Release -o ${{env.DOTNET_ROOT}}/myapp
2828

2929
- name: Deploy to Azure Web App
3030
uses: azure/webapps-deploy@v2

.vscode/launch.json

+11-22
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,23 @@
11
{
2-
// Use IntelliSense to find out which attributes exist for C# debugging
3-
// Use hover for the description of the existing attributes
4-
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
5-
"version": "0.2.0",
6-
"configurations": [
2+
"version": "0.2.0",
3+
"configurations": [
74
{
5+
// Use IntelliSense to find out which attributes exist for C# debugging
6+
// Use hover for the description of the existing attributes
7+
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
88
"name": ".NET Core Launch (web)",
99
"type": "coreclr",
1010
"request": "launch",
1111
"preLaunchTask": "build",
1212
// If you have changed target frameworks, make sure to update the program path.
13-
"program": "${workspaceFolder}/bin/Debug/netcoreapp2.0/gab-athens.dll",
13+
"program": "${workspaceFolder}/bin/Debug/netcoreapp3.1/EventManagement.Web.dll",
1414
"args": [],
1515
"cwd": "${workspaceFolder}",
1616
"stopAtEntry": false,
17-
"internalConsoleOptions": "openOnSessionStart",
18-
"launchBrowser": {
19-
"enabled": true,
20-
"args": "${auto-detect-url}",
21-
"windows": {
22-
"command": "cmd.exe",
23-
"args": "/C start ${auto-detect-url}"
24-
},
25-
"osx": {
26-
"command": "open"
27-
},
28-
"linux": {
29-
"command": "xdg-open"
30-
}
17+
// Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
18+
"serverReadyAction": {
19+
"action": "openExternally",
20+
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
3121
},
3222
"env": {
3323
"ASPNETCORE_ENVIRONMENT": "Development"
@@ -39,8 +29,7 @@
3929
{
4030
"name": ".NET Core Attach",
4131
"type": "coreclr",
42-
"request": "attach",
43-
"processId": "${command:pickProcess}"
32+
"request": "attach"
4433
}
4534
]
4635
}

.vscode/tasks.json

+29-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,39 @@
22
"version": "2.0.0",
33
"tasks": [
44
{
5-
"taskName": "build",
5+
"label": "build",
66
"command": "dotnet",
77
"type": "process",
88
"args": [
99
"build",
10-
"${workspaceFolder}/gab-athens.csproj"
10+
"${workspaceFolder}/EventManagement.Web.csproj",
11+
"/property:GenerateFullPaths=true",
12+
"/consoleloggerparameters:NoSummary"
13+
],
14+
"problemMatcher": "$msCompile"
15+
},
16+
{
17+
"label": "publish",
18+
"command": "dotnet",
19+
"type": "process",
20+
"args": [
21+
"publish",
22+
"${workspaceFolder}/EventManagement.Web.csproj",
23+
"/property:GenerateFullPaths=true",
24+
"/consoleloggerparameters:NoSummary"
25+
],
26+
"problemMatcher": "$msCompile"
27+
},
28+
{
29+
"label": "watch",
30+
"command": "dotnet",
31+
"type": "process",
32+
"args": [
33+
"watch",
34+
"run",
35+
"${workspaceFolder}/EventManagement.Web.csproj",
36+
"/property:GenerateFullPaths=true",
37+
"/consoleloggerparameters:NoSummary"
1138
],
1239
"problemMatcher": "$msCompile"
1340
}

Configuration/AppSettings.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace gab_athens.Configuration
1+
namespace EventManagement.Web.Configuration
22
{
33
public class SessionizeConfig
44
{

Configuration/Extensions/ConfigurationExtensions.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using Microsoft.Extensions.Configuration;
22
using Microsoft.Extensions.DependencyInjection;
33

4-
namespace gab_athens.Configuration.Extensions
4+
namespace EventManagement.Web.Configuration.Extensions
55
{
66
public static class ConfigurationExtensions
77
{

Controllers/AdminController.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
using System;
22
using System.Threading.Tasks;
3-
using gab_athens.Services;
4-
using gab_athens.Services.Storage;
5-
using gab_athens.Utilities;
3+
using EventManagement.Web.Services;
4+
using EventManagement.Web.Services.Storage;
5+
using EventManagement.Web.Utilities;
66
using Microsoft.AspNetCore.Mvc;
77
using Microsoft.Extensions.Caching.Memory;
88

9-
namespace gab_athens.Controllers
9+
namespace EventManagement.Web.Controllers
1010
{
1111
public class AdminController : Controller
1212
{

Controllers/HomeController.cs

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
using System.Diagnostics;
44
using System.Linq;
55
using System.Threading.Tasks;
6-
using gab_athens.Models;
7-
using gab_athens.Services;
8-
using gab_athens.Services.Storage;
9-
using gab_athens.Utilities;
6+
using EventManagement.Web.Models;
7+
using EventManagement.Web.Services;
8+
using EventManagement.Web.Services.Storage;
9+
using EventManagement.Web.Utilities;
1010
using Microsoft.AspNetCore.Mvc;
1111

12-
namespace gab_athens.Controllers
12+
namespace EventManagement.Web.Controllers
1313
{
1414
public class HomeController : Controller
1515
{
@@ -57,7 +57,7 @@ public async Task<IActionResult> Index()
5757
Hydrate(slot.Value, eventDetails.Speakers, streamUrls);
5858
}
5959

60-
//return View("~/Views/Home/Index.cshtml"); // Default for gab-athens-2019
60+
//return View("~/Views/Home/Index.cshtml"); // Default for EventManagement.Web-2019
6161
// return View("~/Views/Ai/Index.cshtml"); // Default for ai-athens-2019
6262
return View("~/Views/ga/Index.cshtml", eventDetails);
6363
}

gab-athens.csproj EventManagement.Web.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<TargetFramework>netcoreapp3.1</TargetFramework>
55
<UserSecretsId>19cc57a0-379f-4c8a-8b7f-dcbe04b74ff8</UserSecretsId>
6-
<ApplicationInsightsResourceId>/subscriptions/50a1c729-5f81-4f61-bce3-c044a329891d/resourcegroups/gab-athens/providers/microsoft.insights/components/global-azure-greece-2020</ApplicationInsightsResourceId>
6+
<ApplicationInsightsResourceId>/subscriptions/50a1c729-5f81-4f61-bce3-c044a329891d/resourcegroups/EventManagement.Web/providers/microsoft.insights/components/global-azure-greece-2020</ApplicationInsightsResourceId>
77
<LangVersion>8</LangVersion>
88
<Nullable>disable</Nullable>
99
</PropertyGroup>

gab-athens.sln EventManagement.sln

+25-25
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
2-
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 15
4-
VisualStudioVersion = 15.0.27428.2011
5-
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "gab-athens", "gab-athens.csproj", "{1B4BAE51-CD34-4123-89FB-341E9AD0F925}"
7-
EndProject
8-
Global
9-
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10-
Debug|Any CPU = Debug|Any CPU
11-
Release|Any CPU = Release|Any CPU
12-
EndGlobalSection
13-
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14-
{1B4BAE51-CD34-4123-89FB-341E9AD0F925}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15-
{1B4BAE51-CD34-4123-89FB-341E9AD0F925}.Debug|Any CPU.Build.0 = Debug|Any CPU
16-
{1B4BAE51-CD34-4123-89FB-341E9AD0F925}.Release|Any CPU.ActiveCfg = Release|Any CPU
17-
{1B4BAE51-CD34-4123-89FB-341E9AD0F925}.Release|Any CPU.Build.0 = Release|Any CPU
18-
EndGlobalSection
19-
GlobalSection(SolutionProperties) = preSolution
20-
HideSolutionNode = FALSE
21-
EndGlobalSection
22-
GlobalSection(ExtensibilityGlobals) = postSolution
23-
SolutionGuid = {F0DFE5C6-1130-4A54-BF96-30332485E758}
24-
EndGlobalSection
25-
EndGlobal
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.27428.2011
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventManagement.Web", "EventManagement.Web.csproj", "{1B4BAE51-CD34-4123-89FB-341E9AD0F925}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{1B4BAE51-CD34-4123-89FB-341E9AD0F925}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{1B4BAE51-CD34-4123-89FB-341E9AD0F925}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{1B4BAE51-CD34-4123-89FB-341E9AD0F925}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{1B4BAE51-CD34-4123-89FB-341E9AD0F925}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {F0DFE5C6-1130-4A54-BF96-30332485E758}
24+
EndGlobalSection
25+
EndGlobal

Infrastructure/Extensions/DateTimeExtensions.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System;
22

3-
namespace gab_athens.Infrastructure.Extensions
3+
namespace EventManagement.Web.Infrastructure.Extensions
44
{
55
public static class DateTimeExtensions
66
{

Infrastructure/Output/SerializerSettings.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
using System.Text.Json;
22
using System.Text.Json.Serialization;
3-
using gab_athens.Utilities.Json.Converters;
3+
using EventManagement.Web.Utilities.Json.Converters;
44

5-
namespace gab_athens.Infrastructure.Output
5+
namespace EventManagement.Web.Infrastructure.Output
66
{
77
public static class SerializerSettings
88
{

Models/ErrorViewModel.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace gab_athens.Models
1+
namespace EventManagement.Web.Models
22
{
33
public class ErrorViewModel
44
{

Models/HomepageOptions.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace gab_athens.Models
1+
namespace EventManagement.Web.Models
22
{
33
public class HomepageOptions
44
{

Models/Social.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace gab_athens.Models
1+
namespace EventManagement.Web.Models
22
{
33
public class Social
44
{

Models/Speaker.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using System.Collections.Generic;
33
using Newtonsoft.Json;
44

5-
namespace gab_athens.Models
5+
namespace EventManagement.Web.Models
66
{
77
public class Speaker
88
{

Program.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
using Microsoft.Extensions.Configuration;
66
using Serilog;
77

8-
namespace gab_athens
8+
namespace EventManagement.Web
99
{
1010
public class Program
1111
{
1212
public static readonly string Namespace = typeof(Program).Namespace;
13-
public static readonly string AppName = "gab-athens";
13+
public static readonly string AppName = Namespace.Substring(Namespace.LastIndexOf('.', Namespace.LastIndexOf('.') - 1) + 1);
1414

1515
public static int Main(string[] args)
1616
{

Properties/PublishProfiles/ai-athens-2019 - Web Deploy.pubxml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ by editing this MSBuild file. In order to learn more about this please visit htt
66
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
77
<PropertyGroup>
88
<WebPublishMethod>MSDeploy</WebPublishMethod>
9-
<ResourceId>/subscriptions/50a1c729-5f81-4f61-bce3-c044a329891d/resourcegroups/gab-athens/providers/Microsoft.Web/sites/ai-athens-2019</ResourceId>
10-
<ResourceGroup>gab-athens</ResourceGroup>
9+
<ResourceId>/subscriptions/50a1c729-5f81-4f61-bce3-c044a329891d/resourcegroups/EventManagement.Web/providers/Microsoft.Web/sites/ai-athens-2019</ResourceId>
10+
<ResourceGroup>EventManagement.Web</ResourceGroup>
1111
<PublishProvider>AzureWebSite</PublishProvider>
1212
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
1313
<LastUsedPlatform>Any CPU</LastUsedPlatform>

Properties/PublishProfiles/gab-athens-2019 - Web Deploy.pubxml

+6-6
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@ by editing this MSBuild file. In order to learn more about this please visit htt
66
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
77
<PropertyGroup>
88
<WebPublishMethod>MSDeploy</WebPublishMethod>
9-
<ResourceId>/subscriptions/50a1c729-5f81-4f61-bce3-c044a329891d/resourceGroups/gab-athens/providers/Microsoft.Web/sites/gab-athens-2019</ResourceId>
10-
<ResourceGroup>gab-athens</ResourceGroup>
9+
<ResourceId>/subscriptions/50a1c729-5f81-4f61-bce3-c044a329891d/resourceGroups/EventManagement.Web/providers/Microsoft.Web/sites/EventManagement.Web-2019</ResourceId>
10+
<ResourceGroup>EventManagement.Web</ResourceGroup>
1111
<PublishProvider>AzureWebSite</PublishProvider>
1212
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
1313
<LastUsedPlatform>Any CPU</LastUsedPlatform>
14-
<SiteUrlToLaunchAfterPublish>http://gab-athens-2019.azurewebsites.net</SiteUrlToLaunchAfterPublish>
14+
<SiteUrlToLaunchAfterPublish>http://EventManagement.Web-2019.azurewebsites.net</SiteUrlToLaunchAfterPublish>
1515
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
1616
<ExcludeApp_Data>False</ExcludeApp_Data>
1717
<ProjectGuid>1b4bae51-cd34-4123-89fb-341e9ad0f925</ProjectGuid>
18-
<MSDeployServiceURL>gab-athens-2019.scm.azurewebsites.net:443</MSDeployServiceURL>
19-
<DeployIisAppPath>gab-athens-2019</DeployIisAppPath>
18+
<MSDeployServiceURL>EventManagement.Web-2019.scm.azurewebsites.net:443</MSDeployServiceURL>
19+
<DeployIisAppPath>EventManagement.Web-2019</DeployIisAppPath>
2020
<RemoteSitePhysicalPath />
2121
<SkipExtraFilesOnServer>True</SkipExtraFilesOnServer>
2222
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
2323
<EnableMSDeployBackup>True</EnableMSDeployBackup>
24-
<UserName>$gab-athens-2019</UserName>
24+
<UserName>$EventManagement.Web-2019</UserName>
2525
<_SavePWD>True</_SavePWD>
2626
<_DestinationType>AzureWebSite</_DestinationType>
2727
<InstallAspNetCoreSiteExtension>False</InstallAspNetCoreSiteExtension>

Properties/PublishProfiles/global-azure-athens-2020 - Web Deploy.pubxml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ by editing this MSBuild file. In order to learn more about this please visit htt
66
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
77
<PropertyGroup>
88
<WebPublishMethod>MSDeploy</WebPublishMethod>
9-
<ResourceId>/subscriptions/50a1c729-5f81-4f61-bce3-c044a329891d/resourceGroups/gab-athens/providers/Microsoft.Web/sites/global-azure-athens-2020</ResourceId>
10-
<ResourceGroup>gab-athens</ResourceGroup>
9+
<ResourceId>/subscriptions/50a1c729-5f81-4f61-bce3-c044a329891d/resourceGroups/EventManagement.Web/providers/Microsoft.Web/sites/global-azure-athens-2020</ResourceId>
10+
<ResourceGroup>EventManagement.Web</ResourceGroup>
1111
<PublishProvider>AzureWebSite</PublishProvider>
1212
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
1313
<LastUsedPlatform>Any CPU</LastUsedPlatform>

Properties/PublishProfiles/global-azure-greece-2020 - Web Deploy.pubxml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ by editing this MSBuild file. In order to learn more about this please visit htt
66
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
77
<PropertyGroup>
88
<WebPublishMethod>MSDeploy</WebPublishMethod>
9-
<ResourceId>/subscriptions/50a1c729-5f81-4f61-bce3-c044a329891d/resourceGroups/gab-athens/providers/Microsoft.Web/sites/global-azure-greece-2020</ResourceId>
10-
<ResourceGroup>gab-athens</ResourceGroup>
9+
<ResourceId>/subscriptions/50a1c729-5f81-4f61-bce3-c044a329891d/resourceGroups/EventManagement.Web/providers/Microsoft.Web/sites/global-azure-greece-2020</ResourceId>
10+
<ResourceGroup>EventManagement.Web</ResourceGroup>
1111
<PublishProvider>AzureWebSite</PublishProvider>
1212
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
1313
<LastUsedPlatform>Any CPU</LastUsedPlatform>

Properties/launchSettings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"ASPNETCORE_ENVIRONMENT": "Development"
1616
}
1717
},
18-
"gab-athens": {
18+
"EventManagement.Web": {
1919
"commandName": "Project",
2020
"launchBrowser": true,
2121
"environmentVariables": {

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
gab-athens
1+
EventManagement.Web

Services/Sessionize/EventSessionizeService.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
using System.Collections.Generic;
33
using System.Linq;
44
using System.Threading.Tasks;
5-
using gab_athens.Infrastructure.Extensions;
6-
using gab_athens.Models;
7-
using gab_athens.Utilities;
5+
using EventManagement.Web.Infrastructure.Extensions;
6+
using EventManagement.Web.Models;
7+
using EventManagement.Web.Utilities;
88
using Microsoft.Extensions.Caching.Memory;
99

10-
namespace gab_athens.Services
10+
namespace EventManagement.Web.Services
1111
{
1212
public interface IEventSessionizeService
1313
{

Services/Sessionize/Models/Error.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System.Text.Json.Serialization;
22

3-
namespace gab_athens.Services.Sessionize.Models
3+
namespace EventManagement.Web.Services.Sessionize.Models
44
{
55
public class Error
66
{

Services/Sessionize/Models/Speaker.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using System.Collections.Generic;
33
using System.Text.Json.Serialization;
44

5-
namespace gab_athens.Services.Sessionize.Models
5+
namespace EventManagement.Web.Services.Sessionize.Models
66
{
77
public class Speaker
88
{

0 commit comments

Comments
 (0)