Skip to content

Commit bfe3f74

Browse files
authored
Merge branch 'master' into remove-usings
2 parents dc35f3e + 3d1fa01 commit bfe3f74

File tree

20 files changed

+460
-48
lines changed

20 files changed

+460
-48
lines changed

.devcontainer/localinit.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ az extension add --name containerapp --yes
66
nvm install v18.12.1
77

88
# initialize Dapr
9-
dapr init --runtime-version=1.10.0-rc.2
9+
dapr init --runtime-version=1.14.0

.github/workflows/itests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ jobs:
4242
GOOS: linux
4343
GOARCH: amd64
4444
GOPROXY: https://proxy.golang.org
45-
DAPR_CLI_VER: 1.13.0
46-
DAPR_RUNTIME_VER: 1.13.2
47-
DAPR_INSTALL_URL: https://raw.githubusercontent.com/dapr/cli/release-1.12/install/install.sh
45+
DAPR_CLI_VER: 1.14.0
46+
DAPR_RUNTIME_VER: 1.14.0
47+
DAPR_INSTALL_URL: https://raw.githubusercontent.com/dapr/cli/release-1.14/install/install.sh
4848
DAPR_CLI_REF: ''
4949
steps:
5050
- name: Set up Dapr CLI

daprdocs/content/en/dotnet-sdk-docs/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Dapr offers a variety of packages to help with the development of .NET applicati
1818

1919
- [Dapr CLI]({{< ref install-dapr-cli.md >}}) installed
2020
- Initialized [Dapr environment]({{< ref install-dapr-selfhost.md >}})
21-
- [.NET Core 3.1 or .NET 5+](https://dotnet.microsoft.com/download) installed
21+
- [.NET 6+](https://dotnet.microsoft.com/download) installed
2222

2323
## Installation
2424

daprdocs/content/en/dotnet-sdk-docs/dotnet-actors/dotnet-actors-howto.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ This project contains the implementation of the actor client which calls MyActor
4545

4646
- [Dapr CLI]({{< ref install-dapr-cli.md >}}) installed.
4747
- Initialized [Dapr environment]({{< ref install-dapr-selfhost.md >}}).
48-
- [.NET Core 3.1 or .NET 6+](https://dotnet.microsoft.com/download) installed. Dapr .NET SDK uses [ASP.NET Core](https://docs.microsoft.com/aspnet/core/introduction-to-aspnet-core?view=aspnetcore-6.0).
48+
- [.NET 6+](https://dotnet.microsoft.com/download) installed. Dapr .NET SDK uses [ASP.NET Core](https://docs.microsoft.com/aspnet/core/introduction-to-aspnet-core?view=aspnetcore-6.0).
4949

5050
## Step 0: Prepare
5151

daprdocs/content/en/dotnet-sdk-docs/dotnet-client/_index.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ The .NET SDK allows you to interface with all of the [Dapr building blocks]({{<
2424
#### HTTP
2525
You can either use the `DaprClient` or `System.Net.Http.HttpClient` to invoke your services.
2626

27+
{{% alert title="Note" color="primary" %}}
28+
You can also [invoke a non-Dapr endpoint using either a named `HTTPEndpoint` or an FQDN URL to the non-Dapr environment]({{< ref "howto-invoke-non-dapr-endpoints.md#using-an-httpendpoint-resource-or-fqdn-url-for-non-dapr-endpoints" >}}).
29+
30+
{{% /alert %}}
31+
32+
2733
{{< tabs SDK HTTP>}}
2834

2935
{{% codetab %}}
@@ -56,7 +62,7 @@ Console.WriteLine("Returned: id:{0} | Balance:{1}", account.Id, account.Balance)
5662

5763
#### gRPC
5864
You can use the `DaprClient` to invoke your services over gRPC.
59-
{{% codetab %}}
65+
6066
```csharp
6167
using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(20));
6268
var invoker = DaprClient.CreateInvocationInvoker(appId: myAppId, daprEndpoint: serviceEndpoint);
@@ -67,8 +73,6 @@ await client.MyMethodAsync(new Empty(), options);
6773

6874
Assert.Equal(StatusCode.DeadlineExceeded, ex.StatusCode);
6975
```
70-
{{% /codetab %}}
71-
7276

7377
- For a full guide on service invocation visit [How-To: Invoke a service]({{< ref howto-invoke-discover-services.md >}}).
7478

@@ -162,7 +166,7 @@ var secrets = await client.GetSecretAsync("mysecretstore", "key-value-pair-secre
162166
Console.WriteLine($"Got secret keys: {string.Join(", ", secrets.Keys)}");
163167
```
164168

165-
{{% / codetab %}}
169+
{{% /codetab %}}
166170

167171
{{% codetab %}}
168172

examples/Actor/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The Actor example shows how to create a virtual actor (`DemoActor`) and invoke i
44

55
## Prerequisites
66

7-
- [.NET Core 3.1 or .NET 5+](https://dotnet.microsoft.com/download) installed
7+
- [.NET 6+](https://dotnet.microsoft.com/download) installed
88
- [Dapr CLI](https://docs.dapr.io/getting-started/install-dapr-cli/)
99
- [Initialized Dapr environment](https://docs.dapr.io/getting-started/install-dapr-selfhost/)
1010
- [Dapr .NET SDK](https://github.com/dapr/dotnet-sdk/)
@@ -102,7 +102,7 @@ docker push <your-docker-registry>/demo-actor:latest
102102
### Deploy the Actor service to Kubernetes
103103
#### Prerequisites
104104
- A Kubernetes cluster with `kubectl` configured to access it.
105-
- Dapr v1.13+ installed on the Kubernetes cluster. Follow the instructions [here](https://docs.dapr.io/getting-started/install-dapr-kubernetes/).
105+
- Dapr v1.14+ installed on the Kubernetes cluster. Follow the instructions [here](https://docs.dapr.io/getting-started/install-dapr-kubernetes/).
106106
- A Docker registry where you pushed the `DemoActor` image.
107107

108108
#### Deploy the Actor service

examples/Client/PublishSubscribe/BulkPublishEventExample/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Prerequisites
44

5-
- [.NET Core 3.1 or .NET 5+](https://dotnet.microsoft.com/download) installed
5+
- [.NET 6+](https://dotnet.microsoft.com/download) installed
66
- [Dapr CLI](https://docs.dapr.io/getting-started/install-dapr-cli/)
77
- [Initialized Dapr environment](https://docs.dapr.io/getting-started/install-dapr-selfhost/)
88
- [Dapr .NET SDK](https://docs.dapr.io/developing-applications/sdks/dotnet/)

examples/Client/PublishSubscribe/PublishEventExample/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Prerequisites
44

5-
- [.NET Core 3.1 or .NET 5+](https://dotnet.microsoft.com/download) installed
5+
- [.NET 6+](https://dotnet.microsoft.com/download) installed
66
- [Dapr CLI](https://docs.dapr.io/getting-started/install-dapr-cli/)
77
- [Initialized Dapr environment](https://docs.dapr.io/getting-started/install-dapr-selfhost/)
88
- [Dapr .NET SDK](https://docs.dapr.io/developing-applications/sdks/dotnet/)

samples/Client/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The following examples will show you how to:
88

99
## Prerequisites
1010

11-
* [.Net Core 3.1 or .NET 5+](https://dotnet.microsoft.com/download)
11+
* [.NET 6+](https://dotnet.microsoft.com/download)
1212
* [Dapr CLI](https://github.com/dapr/cli)
1313
* [Dapr DotNet SDK](https://github.com/dapr/dotnet-sdk)
1414

src/Dapr.Client/DaprClient.cs

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,20 @@ public HttpRequestMessage CreateInvokeMethodRequest(string appId, string methodN
306306
return CreateInvokeMethodRequest(HttpMethod.Post, appId, methodName);
307307
}
308308

309+
/// <summary>
310+
/// Creates an <see cref="HttpRequestMessage" /> that can be used to perform service invocation for the
311+
/// application identified by <paramref name="appId" /> and invokes the method specified by <paramref name="methodName" />
312+
/// with the <c>POST</c> HTTP method.
313+
/// </summary>
314+
/// <param name="appId">The Dapr application id to invoke the method on.</param>
315+
/// <param name="methodName">The name of the method to invoke.</param>
316+
/// <param name="queryStringParameters">A collection of key/value pairs to populate the query string from.</param>
317+
/// <returns>An <see cref="HttpRequestMessage" /> for use with <c>SendInvokeMethodRequestAsync</c>.</returns>
318+
public HttpRequestMessage CreateInvokeMethodRequest(string appId, string methodName, IReadOnlyCollection<KeyValuePair<string,string>> queryStringParameters)
319+
{
320+
return CreateInvokeMethodRequest(HttpMethod.Post, appId, methodName, queryStringParameters);
321+
}
322+
309323
/// <summary>
310324
/// Creates an <see cref="HttpRequestMessage" /> that can be used to perform service invocation for the
311325
/// application identified by <paramref name="appId" /> and invokes the method specified by <paramref name="methodName" />
@@ -317,6 +331,19 @@ public HttpRequestMessage CreateInvokeMethodRequest(string appId, string methodN
317331
/// <returns>An <see cref="HttpRequestMessage" /> for use with <c>SendInvokeMethodRequestAsync</c>.</returns>
318332
public abstract HttpRequestMessage CreateInvokeMethodRequest(HttpMethod httpMethod, string appId, string methodName);
319333

334+
/// <summary>
335+
/// Creates an <see cref="HttpRequestMessage" /> that can be used to perform service invocation for the
336+
/// application identified by <paramref name="appId" /> and invokes the method specified by <paramref name="methodName" />
337+
/// with the HTTP method specified by <paramref name="httpMethod" />.
338+
/// </summary>
339+
/// <param name="httpMethod">The <see cref="HttpMethod" /> to use for the invocation request.</param>
340+
/// <param name="appId">The Dapr application id to invoke the method on.</param>
341+
/// <param name="methodName">The name of the method to invoke.</param>
342+
/// <param name="queryStringParameters">A collection of key/value pairs to populate the query string from.</param>
343+
/// <returns>An <see cref="HttpRequestMessage" /> for use with <c>SendInvokeMethodRequestAsync</c>.</returns>
344+
public abstract HttpRequestMessage CreateInvokeMethodRequest(HttpMethod httpMethod, string appId,
345+
string methodName, IReadOnlyCollection<KeyValuePair<string, string>> queryStringParameters);
346+
320347
/// <summary>
321348
/// Creates an <see cref="HttpRequestMessage" /> that can be used to perform service invocation for the
322349
/// application identified by <paramref name="appId" /> and invokes the method specified by <paramref name="methodName" />
@@ -329,9 +356,9 @@ public HttpRequestMessage CreateInvokeMethodRequest(string appId, string methodN
329356
/// <returns>An <see cref="HttpRequestMessage" /> for use with <c>SendInvokeMethodRequestAsync</c>.</returns>
330357
public HttpRequestMessage CreateInvokeMethodRequest<TRequest>(string appId, string methodName, TRequest data)
331358
{
332-
return CreateInvokeMethodRequest<TRequest>(HttpMethod.Post, appId, methodName, data);
359+
return CreateInvokeMethodRequest(HttpMethod.Post, appId, methodName, new List<KeyValuePair<string, string>>(), data);
333360
}
334-
361+
335362
/// <summary>
336363
/// Creates an <see cref="HttpRequestMessage" /> that can be used to perform service invocation for the
337364
/// application identified by <paramref name="appId" /> and invokes the method specified by <paramref name="methodName" />
@@ -343,9 +370,10 @@ public HttpRequestMessage CreateInvokeMethodRequest<TRequest>(string appId, stri
343370
/// <param name="appId">The Dapr application id to invoke the method on.</param>
344371
/// <param name="methodName">The name of the method to invoke.</param>
345372
/// <param name="data">The data that will be JSON serialized and provided as the request body.</param>
373+
/// <param name="queryStringParameters">A collection of key/value pairs to populate the query string from.</param>
346374
/// <returns>An <see cref="HttpRequestMessage" /> for use with <c>SendInvokeMethodRequestAsync</c>.</returns>
347-
public abstract HttpRequestMessage CreateInvokeMethodRequest<TRequest>(HttpMethod httpMethod, string appId, string methodName, TRequest data);
348-
375+
public abstract HttpRequestMessage CreateInvokeMethodRequest<TRequest>(HttpMethod httpMethod, string appId, string methodName, IReadOnlyCollection<KeyValuePair<string,string>> queryStringParameters, TRequest data);
376+
349377
/// <summary>
350378
/// Perform health-check of Dapr sidecar. Return 'true' if sidecar is healthy. Otherwise 'false'.
351379
/// CheckHealthAsync handle <see cref="HttpRequestException"/> and will return 'false' if error will occur on transport level
@@ -526,7 +554,7 @@ public Task InvokeMethodAsync<TRequest>(
526554
TRequest data,
527555
CancellationToken cancellationToken = default)
528556
{
529-
var request = CreateInvokeMethodRequest<TRequest>(httpMethod, appId, methodName, data);
557+
var request = CreateInvokeMethodRequest<TRequest>(httpMethod, appId, methodName, new List<KeyValuePair<string, string>>(), data);
530558
return InvokeMethodAsync(request, cancellationToken);
531559
}
532560

@@ -620,7 +648,7 @@ public Task<TResponse> InvokeMethodAsync<TRequest, TResponse>(
620648
TRequest data,
621649
CancellationToken cancellationToken = default)
622650
{
623-
var request = CreateInvokeMethodRequest<TRequest>(httpMethod, appId, methodName, data);
651+
var request = CreateInvokeMethodRequest<TRequest>(httpMethod, appId, methodName, new List<KeyValuePair<string, string>>(), data);
624652
return InvokeMethodAsync<TResponse>(request, cancellationToken);
625653
}
626654

0 commit comments

Comments
 (0)