Skip to content

Commit

Permalink
Merge branch 'master' into bug/476_multiple_methods_per_interface_wit…
Browse files Browse the repository at this point in the history
…h_json_serialisation_doesntwork
  • Loading branch information
WhitWaldo authored Oct 28, 2024
2 parents a7f0a92 + 03038fa commit 9e34381
Show file tree
Hide file tree
Showing 102 changed files with 1,206 additions and 702 deletions.
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" />
<PackageVersion Include="Microsoft.CodeAnalysis.Common" Version="4.8.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.8.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing.XUnit" Version="1.1.2" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing" Version="1.1.2" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.8.0" />
<PackageVersion Include="Microsoft.DurableTask.Client.Grpc" Version="1.3.0" />
<PackageVersion Include="Microsoft.DurableTask.Worker.Grpc" Version="1.3.0" />
Expand Down
2 changes: 1 addition & 1 deletion examples/Actor/ActorClient/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public static async Task Main(string[] args)
var nonRemotingProxy = ActorProxy.Create(actorId, "DemoActor");
await nonRemotingProxy.InvokeMethodAsync("TestNoArgumentNoReturnType");
await nonRemotingProxy.InvokeMethodAsync("SaveData", data);
var res = await nonRemotingProxy.InvokeMethodAsync<MyData>("GetData");
await nonRemotingProxy.InvokeMethodAsync<MyData>("GetData");

Console.WriteLine("Registering the timer and reminder");
await proxy.RegisterTimer();
Expand Down
5 changes: 0 additions & 5 deletions examples/AspNetCore/GrpcServiceSample/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@
// limitations under the License.
// ------------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Server.Kestrel.Core;
using Microsoft.Extensions.Hosting;
Expand Down
1 change: 0 additions & 1 deletion examples/AspNetCore/RoutingSample/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,6 @@ await JsonSerializer.SerializeAsync(context.Response.Body,

async Task ViewErrorMessage(HttpContext context)
{
var client = context.RequestServices.GetRequiredService<DaprClient>();
var transaction = await JsonSerializer.DeserializeAsync<Transaction>(context.Request.Body, serializerOptions);

logger.LogInformation("The amount cannot be negative: {0}", transaction.Amount);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
using Dapr.Client;
using Dapr.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using System.Collections.Generic;
using System;

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Threading;
using System.Collections.Generic;
using System.Threading.Tasks;
using ControllerSample;
using Dapr;
Expand Down
1 change: 0 additions & 1 deletion examples/Client/ConfigurationApi/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using Dapr.Client;
using Dapr.Extensions.Configuration;
using System.Collections.Generic;
using System.Threading;

namespace ConfigurationApi
{
Expand Down
5 changes: 1 addition & 4 deletions examples/Client/ConfigurationApi/Startup.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
using System;
using Dapr.AspNetCore;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Primitives;

namespace ConfigurationApi
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Linq;
using System.Text;
using System;
using System.Linq;
using System.Text.Json;
using System.Threading.Tasks;
using Dapr;
Expand Down
3 changes: 1 addition & 2 deletions examples/Client/DistributedLock/Model/StateData.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
namespace DistributedLock.Model
namespace DistributedLock.Model
{
#nullable enable
public class StateData
Expand Down
5 changes: 0 additions & 5 deletions examples/Client/DistributedLock/Program.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;

namespace DistributedLock
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

using System;
using System.Net.Http.Json;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
using Dapr.Client;
Expand Down
41 changes: 24 additions & 17 deletions examples/GeneratedActor/ActorClient/ActorClient.csproj
Original file line number Diff line number Diff line change
@@ -1,22 +1,29 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6</TargetFramework>
<LangVersion>10.0</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6</TargetFramework>
<LangVersion>10.0</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<ItemGroup>
<ProjectReference Include="..\ActorCommon\ActorCommon.csproj" />
<ProjectReference Include="..\..\..\src\Dapr.Actors\Dapr.Actors.csproj" />
</ItemGroup>
<!-- Persist the source generator (and other) files to disk -->
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
<!-- 👇 The "base" path for the source generators -->
<!--<GeneratedFolder>Generated</GeneratedFolder>-->
<!-- 👇 Write the output for each target framework to a different sub-folder -->
<!--<CompilerGeneratedFilesOutputPath>$(GeneratedFolder)\$(TargetFramework)</CompilerGeneratedFilesOutputPath>-->
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\src\Dapr.Actors.Generators\Dapr.Actors.Generators.csproj"
OutputItemType="Analyzer"
ReferenceOutputAssembly="false" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ActorCommon\ActorCommon.csproj" />
<ProjectReference Include="..\..\..\src\Dapr.Actors\Dapr.Actors.csproj" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\src\Dapr.Actors.Generators\Dapr.Actors.Generators.csproj"
OutputItemType="Analyzer"
ReferenceOutputAssembly="false" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion examples/GeneratedActor/ActorClient/IClientActor.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ------------------------------------------------------------------------
// ------------------------------------------------------------------------
// Copyright 2023 The Dapr Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/GeneratedActor/ActorClient/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

var client = new ClientActorClient(proxy);

var state = await client.GetStateAsync(cancellationTokenSource.Token);
await client.GetStateAsync(cancellationTokenSource.Token);

await client.SetStateAsync(new ClientState("Hello, World!"), cancellationTokenSource.Token);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Dapr.Client;
using Dapr.Workflow;
using Dapr.Workflow;
using Microsoft.Extensions.Logging;

namespace WorkflowConsoleApp.Activities
Expand Down
2 changes: 1 addition & 1 deletion examples/Workflow/WorkflowUnitTest/OrderProcessingTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public async Task TestInsufficientInventory()
.Returns(Task.FromResult(inventoryResult));

// Run the workflow directly
OrderResult result = await new OrderProcessingWorkflow().RunAsync(mockContext.Object, order);
await new OrderProcessingWorkflow().RunAsync(mockContext.Object, order);

// Verify that ReserveInventoryActivity was called with a specific input
mockContext.Verify(
Expand Down
Loading

0 comments on commit 9e34381

Please sign in to comment.