Skip to content
This repository was archived by the owner on Jul 28, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ services:
container_name: db-migrations
build:
context: .
dockerfile: src/ServiceLayer.Common/Dockerfile.migrations
dockerfile: src/ServiceLayer.Shared/Dockerfile.migrations
args:
DatabaseConnectionString: "${DatabaseConnectionString}"
depends_on:
Expand Down
2 changes: 1 addition & 1 deletion scripts/githooks/check-file-format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function run-editorconfig-in-docker() {
docker run --rm --platform linux/amd64 \
--volume "$PWD":/check \
"$image" \
sh -c "ec --exclude '.git/' $dry_run_opt \$($filter) /dev/null"
sh -c "ec --exclude '.git/|.*\.sln$' $dry_run_opt \$($filter) /dev/null"
}

# ==============================================================================
Expand Down
2 changes: 0 additions & 2 deletions src/ServiceLayer.Mesh/Configuration/AppConfiguration.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using ServiceLayer.Common;

namespace ServiceLayer.Mesh.Configuration;

public class AppConfiguration :
Expand Down
4 changes: 2 additions & 2 deletions src/ServiceLayer.Mesh/DockerFile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ FROM mcr.microsoft.com/dotnet/sdk:9.0 AS installer-env
WORKDIR /src/dotnet-function-app

COPY ./dotnet-mesh-client/application/DotNetMeshClient/NHS.Mesh.Client/NHS.Mesh.Client.csproj ../dotnet-mesh-client/application/DotNetMeshClient/NHS.Mesh.Client/
COPY ./ServiceLayer.Common/ServiceLayer.Common.csproj ../ServiceLayer.Common/
COPY ./ServiceLayer.Shared/ServiceLayer.Shared.csproj ../ServiceLayer.Shared/
COPY ./ServiceLayer.Mesh/ServiceLayer.Mesh.csproj .
RUN dotnet restore

COPY ./dotnet-mesh-client/ ../dotnet-mesh-client/
COPY ./ServiceLayer.Common/ ../ServiceLayer.Common/
COPY ./ServiceLayer.Shared/ ../ServiceLayer.Shared/
COPY ./ServiceLayer.Mesh/ .

RUN dotnet publish -c Release -o /home/site/wwwroot
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Azure.Identity;
using Azure.Storage.Queues;
using Microsoft.Extensions.DependencyInjection;
using ServiceLayer.Common;

namespace ServiceLayer.Mesh.Messaging;

Expand Down
1 change: 0 additions & 1 deletion src/ServiceLayer.Mesh/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using ServiceLayer.Mesh.Configuration;
using ServiceLayer.Mesh.Messaging;
using ServiceLayer.Mesh.Storage;
using ServiceLayer.Common;
using ServiceLayer.Mesh.FileTypes.NbssAppointmentEvents;

var host = new HostBuilder()
Expand Down
2 changes: 1 addition & 1 deletion src/ServiceLayer.Mesh/ServiceLayer.Mesh.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ServiceLayer.Common\ServiceLayer.Common.csproj" />
<ProjectReference Include="..\ServiceLayer.Shared\ServiceLayer.Shared.csproj" />
<Using Include="System.Threading.ExecutionContext" Alias="ExecutionContext" />
<ProjectReference Include="..\dotnet-mesh-client\application\DotNetMeshClient\NHS.Mesh.Client\NHS.Mesh.Client.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Azure.Identity;
using Azure.Storage.Blobs;
using Microsoft.Extensions.DependencyInjection;
using ServiceLayer.Common;

namespace ServiceLayer.Mesh.Storage;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using ServiceLayer.Common;

namespace ServiceLayer.Data;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ RUN git submodule update --init --recursive
ARG DatabaseConnectionString
ENV DatabaseConnectionString=${DatabaseConnectionString}

RUN dotnet restore ./src/ServiceLayer.Common/ServiceLayer.Common.csproj && \
dotnet build ./src/ServiceLayer.Common/ServiceLayer.Common.csproj && \
RUN dotnet restore ./src/ServiceLayer.Shared/ServiceLayer.Shared.csproj && \
dotnet build ./src/ServiceLayer.Shared/ServiceLayer.Shared.csproj && \
dotnet tool install dotnet-ef --tool-path /tools

ENV PATH="/tools:$PATH" \
Expand All @@ -24,7 +24,7 @@ ENV PATH="/tools:$PATH" \
RUN mkdir -p /database && \
dotnet ef migrations script \
-o /database/migration.sql \
--project ./src/ServiceLayer.Common/
--project ./src/ServiceLayer.Shared/

# Stage 2: Runtime - Apply Migration and Seed Data
FROM mcr.microsoft.com/mssql-tools:v1 AS migration-env
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
namespace ServiceLayer.Common;

public static class EnvironmentVariables

Check warning on line 1 in src/ServiceLayer.Shared/EnvironmentVariables.cs

View workflow job for this annotation

GitHub Actions / Test stage / Perform static analysis

Move 'EnvironmentVariables' into a named namespace. (https://rules.sonarsource.com/csharp/RSPEC-3903)
{
/// <summary>
/// Gets an environment variable by name. Throws if not found.
Expand Down
240 changes: 120 additions & 120 deletions src/ServiceLayer.sln

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<RootNamespace>ServiceLayer.Tests</RootNamespace>
</PropertyGroup>

<ItemGroup>
Expand All @@ -23,7 +24,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\ServiceLayer.Common\ServiceLayer.Common.csproj" />
<ProjectReference Include="..\..\src\ServiceLayer.Shared\ServiceLayer.Shared.csproj" />
</ItemGroup>

</Project>
Loading