Skip to content

Commit 363a71f

Browse files
authored
Fix Nullable configuration in Mocha examples (#9571)
1 parent a38513a commit 363a71f

8 files changed

Lines changed: 6 additions & 11 deletions

File tree

src/Mocha/examples/Demo/Demo.AppHost/Demo.AppHost.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
<OutputType>Exe</OutputType>
55
<AssemblyName>HotChocolate.Demo.AppHost</AssemblyName>
66
<RootNamespace>HotChocolate.Demo.AppHost</RootNamespace>
7-
<Nullable>enable</Nullable>
87
</PropertyGroup>
98
<ItemGroup>
109
<PackageReference Include="Aspire.Hosting.AppHost" />

src/Mocha/examples/Demo/Demo.Billing/Handlers/ProcessPartialRefundCommandHandler.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,8 @@ public async ValueTask<ProcessPartialRefundResponse> HandleAsync(
5252
refund.ProcessedAt = DateTimeOffset.UtcNow;
5353

5454
// Update invoice status if exists - partial refund doesn't fully refund the invoice
55-
if (invoice is not null)
56-
{
57-
// Keep invoice as Paid but we've recorded the partial refund
58-
invoice.UpdatedAt = DateTimeOffset.UtcNow;
59-
}
55+
// Keep invoice as Paid but we've recorded the partial refund
56+
invoice?.UpdatedAt = DateTimeOffset.UtcNow;
6057

6158
await db.SaveChangesAsync(cancellationToken);
6259

src/Mocha/examples/Demo/Demo.ServiceDefaults/Demo.ServiceDefaults.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
<PropertyGroup>
33
<AssemblyName>HotChocolate.Demo.ServiceDefaults</AssemblyName>
44
<RootNamespace>HotChocolate.Demo.ServiceDefaults</RootNamespace>
5-
<ImplicitUsings>enable</ImplicitUsings>
6-
<Nullable>enable</Nullable>
75
<IsAspireSharedProject>true</IsAspireSharedProject>
86
</PropertyGroup>
97
<ItemGroup>

src/Mocha/examples/Demo/Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<PropertyGroup>
33
<IsPackable>false</IsPackable>
44
<TargetFramework>net10.0</TargetFramework>
5+
<Nullable>enable</Nullable>
56
<ImplicitUsings>enable</ImplicitUsings>
67
</PropertyGroup>
78
</Project>

src/Mocha/examples/ExceptionPolicies/ExceptionPolicies.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
44
<TargetFramework>net10.0</TargetFramework>
5+
<Nullable>enable</Nullable>
56
<ImplicitUsings>enable</ImplicitUsings>
67
</PropertyGroup>
78
<ItemGroup>

src/Mocha/examples/PostgresTransport/Directory.Build.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,7 @@
33
<PropertyGroup>
44
<TargetFramework>net10.0</TargetFramework>
55
<TargetFrameworks>net10.0</TargetFrameworks>
6+
<Nullable>enable</Nullable>
7+
<ImplicitUsings>enable</ImplicitUsings>
68
</PropertyGroup>
79
</Project>

src/Mocha/examples/PostgresTransport/PostgresTransport.AppHost/PostgresTransport.AppHost.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
55
<RootNamespace>PostgresTransport.AppHost</RootNamespace>
6-
<Nullable>enable</Nullable>
76
</PropertyGroup>
87
<ItemGroup>
98
<PackageReference Include="Aspire.Hosting.AppHost" />

src/Mocha/examples/PostgresTransport/PostgresTransport.ServiceDefaults/PostgresTransport.ServiceDefaults.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<RootNamespace>PostgresTransport.ServiceDefaults</RootNamespace>
4-
<ImplicitUsings>enable</ImplicitUsings>
5-
<Nullable>enable</Nullable>
64
<IsAspireSharedProject>true</IsAspireSharedProject>
75
</PropertyGroup>
86
<ItemGroup>

0 commit comments

Comments
 (0)