3
3
[ ![ Build status] ( https://github.com/microsoft/durabletask-dotnet/workflows/Validate%20Build/badge.svg )] ( https://github.com/microsoft/durabletask-dotnet/actions?workflow=Validate+Build )
4
4
[ ![ License: MIT] ( https://img.shields.io/badge/License-MIT-blue.svg )] ( https://opensource.org/licenses/MIT )
5
5
6
- ⚠ This project is not yet ready for production use ⚠
7
-
8
6
The Durable Task .NET Client SDK is a .NET Standard 2.0 library for implementing Durable Task orchestrations and activities. It's specifically designed to connect to a "sidecar" process, such as the [ Azure Functions .NET Isolated host] ( https://docs.microsoft.com/azure/azure-functions/dotnet-isolated-process-guide ) , a special purpose sidecar container, or potentially even [ Dapr] ( https://github.com/dapr/dapr/issues/4576 ) .
9
7
10
8
If you're looking to run fully self-hosted Durable Task Framework apps, see https://github.com/azure/durabletask .
11
9
12
- * Current Release* : [ v1.0.0-rc.1 ] ( https://github.com/microsoft/durabletask-dotnet/releases/tag/v1.0.0-rc.1 )
10
+ * Current Release* : [ v1.0.0] ( https://github.com/microsoft/durabletask-dotnet/releases/tag/v1.0.0 )
13
11
14
12
## NuGet packages
15
13
@@ -34,7 +32,7 @@ To get started, add the [Microsoft.Azure.Functions.Worker.Extensions.DurableTask
34
32
``` xml
35
33
<ItemGroup >
36
34
<PackageReference Include =" Microsoft.Azure.Functions.Worker" Version =" 1.10.0" />
37
- <PackageReference Include =" Microsoft.Azure.Functions.Worker.Extensions.DurableTask" Version =" 1.0.0-rc.1 " />
35
+ <PackageReference Include =" Microsoft.Azure.Functions.Worker.Extensions.DurableTask" Version =" 1.0.0" />
38
36
<PackageReference Include =" Microsoft.Azure.Functions.Worker.Extensions.Http" Version =" 3.0.13" />
39
37
<PackageReference Include =" Microsoft.Azure.Functions.Worker.Sdk" Version =" 1.7.0" OutputItemType =" Analyzer" />
40
38
<PackageReference Include =" Microsoft.DurableTask.Generators" Version =" 1.0.0-preview.1" OutputItemType =" Analyzer" />
@@ -47,6 +45,7 @@ You can then use the following code to define a simple "Hello, cities" durable o
47
45
using Microsoft .Azure .Functions .Worker ;
48
46
using Microsoft .Azure .Functions .Worker .Http ;
49
47
using Microsoft .DurableTask ;
48
+ using Microsoft .DurableTask .Client ;
50
49
using Microsoft .Extensions .Logging ;
51
50
52
51
namespace IsolatedFunctionApp1 .Untyped ;
@@ -56,15 +55,15 @@ static class HelloSequenceUntyped
56
55
[Function (nameof (StartHelloCitiesUntyped ))]
57
56
public static async Task <HttpResponseData > StartHelloCitiesUntyped (
58
57
[HttpTrigger (AuthorizationLevel .Anonymous , " get" , " post" )] HttpRequestData req ,
59
- [DurableClient ] DurableClientContext durableContext ,
58
+ [DurableClient ] DurableTaskClient client ,
60
59
FunctionContext executionContext )
61
60
{
62
61
ILogger logger = executionContext .GetLogger (nameof (StartHelloCitiesUntyped ));
63
62
64
- string instanceId = await durableContext . Client .ScheduleNewOrchestrationInstanceAsync (nameof (HelloCitiesUntyped ));
63
+ string instanceId = await client .ScheduleNewOrchestrationInstanceAsync (nameof (HelloCitiesUntyped ));
65
64
logger .LogInformation (" Created new orchestration with instance ID = {instanceId}" , instanceId );
66
65
67
- return durableContext .CreateCheckStatusResponse (req , instanceId );
66
+ return client .CreateCheckStatusResponse (req , instanceId );
68
67
}
69
68
70
69
[Function (nameof (HelloCitiesUntyped ))]
@@ -101,6 +100,7 @@ The source generators also generate type-safe extension methods on the `client`
101
100
using Microsoft .Azure .Functions .Worker ;
102
101
using Microsoft .Azure .Functions .Worker .Http ;
103
102
using Microsoft .DurableTask ;
103
+ using Microsoft .DurableTask .Client ;
104
104
using Microsoft .Extensions .Logging ;
105
105
106
106
namespace IsolatedFunctionApp1 .Typed ;
@@ -110,15 +110,15 @@ public static class HelloCitiesTypedStarter
110
110
[Function (nameof (StartHelloCitiesTyped ))]
111
111
public static async Task <HttpResponseData > StartHelloCitiesTyped (
112
112
[HttpTrigger (AuthorizationLevel .Anonymous , " get" , " post" )] HttpRequestData req ,
113
- [DurableClient ] DurableClientContext durableContext ,
113
+ [DurableClient ] DurableTaskClient client ,
114
114
FunctionContext executionContext )
115
115
{
116
116
ILogger logger = executionContext .GetLogger (nameof (StartHelloCitiesTyped ));
117
117
118
- string instanceId = await durableContext . Client .ScheduleNewHelloCitiesTypedInstanceAsync ();
118
+ string instanceId = await client .ScheduleNewHelloCitiesTypedInstanceAsync ();
119
119
logger .LogInformation (" Created new orchestration with instance ID = {instanceId}" , instanceId );
120
120
121
- return durableContext .CreateCheckStatusResponse (req , instanceId );
121
+ return client .CreateCheckStatusResponse (req , instanceId );
122
122
}
123
123
}
124
124
0 commit comments