Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
CleanArchitecture
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
CleanArchitecture
Commits
586a75bc
Commit
586a75bc
authored
Nov 19, 2019
by
Steve Smith
Committed by
Eric Fleming
Nov 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding list services nuget package (#85)
* Adding list services nuget package
parent
470e52a2
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
7 deletions
+27
-7
settings.json
.vscode/settings.json
+7
-0
Packages.props
Packages.props
+1
-1
ItemCompletedEmailNotificationHandler.cs
...re.Core/Handlers/ItemCompletedEmailNotificationHandler.cs
+0
-1
CleanArchitecture.Infrastructure.csproj
...re.Infrastructure/CleanArchitecture.Infrastructure.csproj
+1
-0
CleanArchitecture.Web.csproj
src/CleanArchitecture.Web/CleanArchitecture.Web.csproj
+1
-0
Startup.cs
src/CleanArchitecture.Web/Startup.cs
+17
-5
No files found.
.vscode/settings.json
0 → 100644
View file @
586a75bc
{
"workbench.colorCustomizations"
:
{
"activityBar.background"
:
"#2A226B"
,
"titleBar.activeBackground"
:
"#3B2F96"
,
"titleBar.activeForeground"
:
"#FBFAFE"
}
}
\ No newline at end of file
Packages.props
View file @
586a75bc
...
...
@@ -3,7 +3,7 @@
<ItemGroup>
<PackageReference
Update=
"ReportGenerator"
Version=
"4.2.20"
/>
<PackageReference
Update=
"Moq"
Version=
"4.13.0"
/>
<PackageReference
Update=
"Ardalis.ListStartupServices"
Version=
"1.1.3"
/>
<PackageReference
Update=
"Autofac"
Version=
"4.9.4"
/>
<PackageReference
Update=
"Autofac.Extensions.DependencyInjection"
Version=
"5.0.0"
/>
<PackageReference
Update=
"Microsoft.VisualStudio.Web.CodeGeneration.Design"
Version=
"3.0.0"
/>
...
...
src/CleanArchitecture.Core/Handlers/ItemCompletedEmailNotificationHandler.cs
View file @
586a75bc
...
...
@@ -12,7 +12,6 @@ namespace CleanArchitecture.Core.Services
Guard
.
Against
.
Null
(
domainEvent
,
nameof
(
domainEvent
));
// Do Nothing
return
Task
.
CompletedTask
;
}
}
...
...
src/CleanArchitecture.Infrastructure/CleanArchitecture.Infrastructure.csproj
View file @
586a75bc
...
...
@@ -18,5 +18,6 @@
<ItemGroup>
<ProjectReference Include="..\CleanArchitecture.Core\CleanArchitecture.Core.csproj" />
<ProjectReference Include="..\CleanArchitecture.SharedKernel\CleanArchitecture.SharedKernel.csproj" />
</ItemGroup>
</Project>
src/CleanArchitecture.Web/CleanArchitecture.Web.csproj
View file @
586a75bc
...
...
@@ -9,6 +9,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Ardalis.ListStartupServices" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" PrivateAssets="all" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" PrivateAssets="All" />
<PackageReference Include="Microsoft.Web.LibraryManager.Build" />
...
...
src/CleanArchitecture.Web/Startup.cs
View file @
586a75bc
using
CleanArchitecture.Infrastructure
;
using
Ardalis.ListStartupServices
;
using
CleanArchitecture.Infrastructure
;
using
Microsoft.AspNetCore.Builder
;
using
Microsoft.AspNetCore.Hosting
;
using
Microsoft.AspNetCore.Http
;
...
...
@@ -6,6 +7,7 @@ using Microsoft.Extensions.Configuration;
using
Microsoft.Extensions.DependencyInjection
;
using
Microsoft.OpenApi.Models
;
using
System
;
using
System.Collections.Generic
;
using
System.Reflection
;
namespace
CleanArchitecture.Web
...
...
@@ -31,15 +33,25 @@ namespace CleanArchitecture.Web
services
.
AddSwaggerGen
(
c
=>
c
.
SwaggerDoc
(
"v1"
,
new
OpenApiInfo
{
Title
=
"My API"
,
Version
=
"v1"
}));
return
ContainerSetup
.
InitializeWeb
(
Assembly
.
GetExecutingAssembly
(),
services
);
}
// add list services for diagnostic purposes - see https://github.com/ardalis/AspNetCoreStartupServices
services
.
Configure
<
ServiceConfig
>(
config
=>
{
config
.
Services
=
new
List
<
ServiceDescriptor
>(
services
);
// optional - default path to view services is /listallservices - recommended to choose your own path
config
.
Path
=
"/listservices"
;
});
public
void
Configure
(
IApplicationBuilder
app
,
IWebHostEnvironment
env
)
return
ContainerSetup
.
InitializeWeb
(
Assembly
.
GetExecutingAssembly
(),
services
);
}
public
void
Configure
(
IApplicationBuilder
app
,
IWebHostEnvironment
env
)
{
if
(
env
.
EnvironmentName
==
"Development"
)
{
app
.
UseDeveloperExceptionPage
();
}
app
.
UseShowAllServicesMiddleware
();
}
else
{
app
.
UseExceptionHandler
(
"/Home/Error"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment