Skip to content

Commit

Permalink
Merge pull request #1362 from WhitWaldo/remove-workflow-methods-mergefix
Browse files Browse the repository at this point in the history
Removed deprecated Workflow methods and types from DaprClient and tests
  • Loading branch information
WhitWaldo authored Oct 14, 2024
2 parents 4d78706 + 8948152 commit 5b185ce
Show file tree
Hide file tree
Showing 28 changed files with 51 additions and 820 deletions.
6 changes: 4 additions & 2 deletions examples/Actor/ActorClient/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@
// limitations under the License.
// ------------------------------------------------------------------------

using Dapr.Actors.Communication;
using IDemoActor;

namespace ActorClient
{
using System;
using System.Threading;
using System.Threading.Tasks;
using Dapr.Actors;
using Dapr.Actors.Client;
using IDemoActorInterface;

/// <summary>
/// Actor Client class.
Expand All @@ -43,7 +45,7 @@ public static async Task Main(string[] args)

// Make strongly typed Actor calls with Remoting.
// DemoActor is the type registered with Dapr runtime in the service.
var proxy = ActorProxy.Create<IDemoActor>(actorId, "DemoActor");
var proxy = ActorProxy.Create<IDemoActor.IDemoActor>(actorId, "DemoActor");

Console.WriteLine("Making call using actor proxy to save data.");
await proxy.SaveData(data, TimeSpan.FromMinutes(10));
Expand Down
4 changes: 2 additions & 2 deletions examples/Actor/DemoActor/BankService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
// limitations under the License.
// ------------------------------------------------------------------------

using IDemoActorInterface;
using IDemoActor;

namespace DaprDemoActor
namespace DemoActor
{
public class BankService
{
Expand Down
16 changes: 8 additions & 8 deletions examples/Actor/DemoActor/DemoActor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
// limitations under the License.
// ------------------------------------------------------------------------

namespace DaprDemoActor
{
using System;
using System.Text.Json;
using System.Threading.Tasks;
using Dapr.Actors.Runtime;
using IDemoActorInterface;
using System;
using System.Text.Json;
using System.Threading.Tasks;
using Dapr.Actors.Runtime;
using IDemoActor;

namespace DemoActor
{
// The following example showcases a few features of Actors
//
// Every actor should inherit from the Actor type, and must implement one or more actor interfaces.
Expand All @@ -27,7 +27,7 @@ namespace DaprDemoActor
// For Actors to use Reminders, it must derive from IRemindable.
// If you don't intend to use Reminder feature, you can skip implementing IRemindable and reminder
// specific methods which are shown in the code below.
public class DemoActor : Actor, IDemoActor, IBankActor, IRemindable
public class DemoActor : Actor, IDemoActor.IDemoActor, IBankActor, IRemindable
{
private const string StateName = "my_data";

Expand Down
8 changes: 4 additions & 4 deletions examples/Actor/DemoActor/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
// limitations under the License.
// ------------------------------------------------------------------------

namespace DaprDemoActor
{
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;

namespace DemoActor
{
public class Program
{
public static void Main(string[] args)
Expand Down
14 changes: 7 additions & 7 deletions examples/Actor/DemoActor/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
// limitations under the License.
// ------------------------------------------------------------------------

namespace DaprDemoActor
{
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;

namespace DemoActor
{
public class Startup
{
public Startup(IConfiguration configuration)
Expand Down
10 changes: 5 additions & 5 deletions examples/Actor/IDemoActor/IBankActor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
// limitations under the License.
// ------------------------------------------------------------------------

namespace IDemoActorInterface
{
using System;
using System.Threading.Tasks;
using Dapr.Actors;
using System;
using System.Threading.Tasks;
using Dapr.Actors;

namespace IDemoActor
{
public interface IBankActor : IActor
{
Task<AccountBalance> GetAccountBalance();
Expand Down
11 changes: 5 additions & 6 deletions examples/Actor/IDemoActor/IDemoActor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@
// limitations under the License.
// ------------------------------------------------------------------------

namespace IDemoActorInterface
{
using System;
using System.Threading.Tasks;
using Dapr.Actors;
using Dapr.Actors.Runtime;
using System;
using System.Threading.Tasks;
using Dapr.Actors;

namespace IDemoActor
{
/// <summary>
/// Interface for Actor method.
/// </summary>
Expand Down
2 changes: 2 additions & 0 deletions examples/AspNetCore/ControllerSample/CustomTopicAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
// limitations under the License.
// ------------------------------------------------------------------------

using Dapr.AspNetCore;

namespace ControllerSample
{
using System;
Expand Down
2 changes: 2 additions & 0 deletions examples/AspNetCore/ControllerSample/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
// limitations under the License.
// ------------------------------------------------------------------------

using Dapr.AspNetCore;

namespace ControllerSample
{
using Microsoft.AspNetCore.Builder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
using GrpcServiceSample.Generated;
using Microsoft.Extensions.Logging;

namespace GrpcServiceSample
namespace GrpcServiceSample.Services
{
/// <summary>
/// BankAccount gRPC service
Expand Down
2 changes: 2 additions & 0 deletions examples/AspNetCore/GrpcServiceSample/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
// limitations under the License.
// ------------------------------------------------------------------------

using Dapr.AspNetCore;
using GrpcServiceSample.Services;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
Expand Down
1 change: 1 addition & 0 deletions examples/Client/ConfigurationApi/Startup.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using Dapr.AspNetCore;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
Expand Down
3 changes: 1 addition & 2 deletions examples/Client/Cryptography/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@
// limitations under the License.
// ------------------------------------------------------------------------

using Cryptography;
using Cryptography.Examples;

namespace Samples.Client
namespace Cryptography
{
class Program
{
Expand Down
3 changes: 2 additions & 1 deletion examples/Client/DistributedLock/Startup.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using DistributedLock.Services;
using Dapr.AspNetCore;
using DistributedLock.Services;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Dapr.Client;
using Dapr.Workflow;
using Microsoft.Extensions.Logging;
using WorkflowConsoleApp.Models;

namespace WorkflowConsoleApp.Activities
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Dapr.Workflow;
using Microsoft.Extensions.Logging;
using WorkflowConsoleApp.Models;

namespace WorkflowConsoleApp.Activities
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Dapr.Client;
using Dapr.Workflow;
using Microsoft.Extensions.Logging;
using WorkflowConsoleApp.Models;

namespace WorkflowConsoleApp.Activities
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Dapr.Client;
using Dapr.Workflow;
using WorkflowConsoleApp.Models;
using Microsoft.Extensions.Logging;

namespace WorkflowConsoleApp.Activities
Expand Down
2 changes: 1 addition & 1 deletion examples/Workflow/WorkflowConsoleApp/Models.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace WorkflowConsoleApp.Models
namespace WorkflowConsoleApp
{
public record OrderPayload(string Name, double TotalCost, int Quantity = 1);
public record InventoryRequest(string RequestId, string ItemName, int Quantity);
Expand Down
2 changes: 1 addition & 1 deletion examples/Workflow/WorkflowConsoleApp/Program.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using Dapr.Client;
using Dapr.Workflow;
using WorkflowConsoleApp.Activities;
using WorkflowConsoleApp.Models;
using WorkflowConsoleApp.Workflows;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.DependencyInjection;
using WorkflowConsoleApp;

const string StoreName = "statestore";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Dapr.Workflow;
using WorkflowConsoleApp.Activities;
using WorkflowConsoleApp.Models;

namespace WorkflowConsoleApp.Workflows
{
Expand Down
2 changes: 1 addition & 1 deletion examples/Workflow/WorkflowUnitTest/OrderProcessingTests.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System.Threading.Tasks;
using Dapr.Workflow;
using Moq;
using WorkflowConsoleApp;
using WorkflowConsoleApp.Activities;
using WorkflowConsoleApp.Models;
using WorkflowConsoleApp.Workflows;
using Xunit;

Expand Down
Loading

0 comments on commit 5b185ce

Please sign in to comment.