Skip to content

Commit 9fc10cc

Browse files
CopilotYunchuWang
andcommitted
Add analyzer references to sample projects and fix DateTime.UtcNow usage
Co-authored-by: YunchuWang <[email protected]>
1 parent 0b1acfb commit 9fc10cc

File tree

7 files changed

+7
-4
lines changed

7 files changed

+7
-4
lines changed

samples/ConsoleApp/ConsoleApp.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
<!-- Using p2p references so we can show latest changes in samples. -->
2121
<ProjectReference Include="$(SrcRoot)Client/Grpc/Client.Grpc.csproj" />
2222
<ProjectReference Include="$(SrcRoot)Worker/Grpc/Worker.Grpc.csproj" />
23+
<ProjectReference Include="$(SrcRoot)Analyzers/Analyzers.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
2324
</ItemGroup>
2425

2526
</Project>

samples/ConsoleAppMinimal/ConsoleAppMinimal.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
<!-- Using p2p references so we can show latest changes in samples. -->
2121
<ProjectReference Include="$(SrcRoot)Client/Grpc/Client.Grpc.csproj" />
2222
<ProjectReference Include="$(SrcRoot)Worker/Grpc/Worker.Grpc.csproj" />
23+
<ProjectReference Include="$(SrcRoot)Analyzers/Analyzers.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
2324
</ItemGroup>
2425

2526
</Project>

samples/ExceptionPropertiesSample/ExceptionPropertiesSample.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<ProjectReference Include="$(SrcRoot)Client/AzureManaged/Client.AzureManaged.csproj" />
2323
<ProjectReference Include="$(SrcRoot)Worker/Grpc/Worker.Grpc.csproj" />
2424
<ProjectReference Include="$(SrcRoot)Worker/AzureManaged/Worker.AzureManaged.csproj" />
25+
<ProjectReference Include="$(SrcRoot)Analyzers/Analyzers.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
2526
</ItemGroup>
2627

2728
</Project>
28-

samples/LargePayloadConsoleApp/LargePayloadConsoleApp.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
<ProjectReference Include="$(SrcRoot)Client/AzureManaged/Client.AzureManaged.csproj" />
1818
<ProjectReference Include="$(SrcRoot)Worker/AzureManaged/Worker.AzureManaged.csproj" />
1919
<ProjectReference Include="$(SrcRoot)Extensions/AzureBlobPayloads/AzureBlobPayloads.csproj" />
20+
<ProjectReference Include="$(SrcRoot)Analyzers/Analyzers.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
2021
</ItemGroup>
2122

2223
</Project>
23-
24-

samples/ScheduleConsoleApp/Orchestrators/StockPriceOrchestrator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public override async Task<string> RunAsync(TaskOrchestrationContext context, st
1818

1919
logger.LogInformation("Current price for {symbol} is ${price:F2}", symbol, currentPrice);
2020

21-
return $"Stock {symbol} price: ${currentPrice:F2} at {DateTime.UtcNow}";
21+
return $"Stock {symbol} price: ${currentPrice:F2} at {context.CurrentUtcDateTime}";
2222
}
2323
catch (Exception ex)
2424
{

samples/ScheduleConsoleApp/ScheduleConsoleApp.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@
1717
<ProjectReference Include="..\..\src\Client\AzureManaged\Client.AzureManaged.csproj" />
1818
<ProjectReference Include="..\..\src\Worker\AzureManaged\Worker.AzureManaged.csproj" />
1919
<ProjectReference Include="..\..\src\ScheduledTasks\ScheduledTasks.csproj" />
20+
<ProjectReference Include="..\..\src\Analyzers\Analyzers.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
2021
</ItemGroup>
2122
</Project>

samples/ScheduleWebApp/ScheduleWebApp.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@
1818
<ProjectReference Include="..\..\src\Client\AzureManaged\Client.AzureManaged.csproj" />
1919
<ProjectReference Include="..\..\src\Worker\AzureManaged\Worker.AzureManaged.csproj" />
2020
<ProjectReference Include="..\..\src\ScheduledTasks\ScheduledTasks.csproj" />
21+
<ProjectReference Include="..\..\src\Analyzers\Analyzers.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
2122
</ItemGroup>
2223
</Project>

0 commit comments

Comments
 (0)