You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Class based model of SignalR Service bindings in C# isolated worker doesn't optimize how you write SignalR triggers due to the limitation of C# worker model. For more information about class based model, see [Class based model](../azure-signalr/signalr-concept-serverless-development-config.md#class-based-model).
39
40
40
41
# [In-process model](#tab/in-process)
41
42
42
-
SignalR Service trigger binding for C# has two programming models. Class based model and traditional model. Class based model provides a consistent SignalR server-side programming experience. Traditional model provides more flexibility and is similar to other function bindings.
43
+
SignalR Service trigger binding for C# in-process model has two programming models. Class based model and traditional model. Class based model provides a consistent SignalR server-side programming experience. Traditional model provides more flexibility and is similar to other function bindings.
43
44
44
45
### With class-based model
45
46
@@ -200,7 +201,7 @@ See the [Example section](#example) for complete examples.
200
201
201
202
### Payloads
202
203
203
-
The trigger input type is declared as either `InvocationContext` or a custom type. If you choose `InvocationContext` you get full access to the request content. For a custom type, the runtime tries to parse the JSON request body to set the object properties.
204
+
The trigger input type is declared as either `InvocationContext` or a custom type. If you choose `InvocationContext`, you get full access to the request content. For a custom type, the runtime tries to parse the JSON request body to set the object properties.
204
205
205
206
### InvocationContext
206
207
@@ -210,11 +211,11 @@ The trigger input type is declared as either `InvocationContext` or a custom typ
210
211
|------------------------------|------------|
211
212
|Arguments| Available for *messages* category. Contains *arguments* in [invocation message](https://github.com/dotnet/aspnetcore/blob/master/src/SignalR/docs/specs/HubProtocol.md#invocation-message-encoding)|
212
213
|Error| Available for *disconnected* event. It can be Empty if the connection closed with no error, or it contains the error messages.|
213
-
|Hub| The hub name which the message belongs to.|
214
+
|Hub| The hub name that the message belongs to.|
214
215
|Category| The category of the message.|
215
216
|Event| The event of the message.|
216
-
|ConnectionId| The connection ID of the client which sends the message.|
217
-
|UserId| The user identity of the client which sends the message.|
217
+
|ConnectionId| The connection ID of the client that sends the message.|
218
+
|UserId| The user identity of the client that sends the message.|
218
219
|Headers| The headers of the request.|
219
220
|Query| The query of the request when clients connect to the service.|
220
221
|Claims| The claims of the client.|
@@ -235,27 +236,27 @@ After you set `parameterNames`, the names you defined correspond to the argument
Then, the `arg1`will contain the content of `message1`, and `arg2`will contain the content of `message2`.
239
+
Then, the `arg1`contains the content of `message1`, and `arg2`contains the content of `message2`.
239
240
240
241
### `ParameterNames` considerations
241
242
242
243
For the parameter binding, the order matters. If you're using `ParameterNames`, the order in `ParameterNames` matches the order of the arguments you invoke in the client. If you're using attribute `[SignalRParameter]` in C#, the order of arguments in Azure Function methods matches the order of arguments in clients.
243
244
244
-
`ParameterNames` and attribute `[SignalRParameter]`**cannot** be used at the same time, or you will get an exception.
245
+
`ParameterNames` and attribute `[SignalRParameter]`**cannot** be used at the same time, or you'll get an exception.
245
246
246
247
### SignalR Service integration
247
248
248
249
SignalR Service needs a URL to access Function App when you're using SignalR Service trigger binding. The URL should be configured in **Upstream Settings** on the SignalR Service side.
The `Function_App_URL` can be found on Function App's Overview page and The`API_KEY` is generated by Azure Function. You can get the `API_KEY` from `signalr_extension` in the **App keys** blade of Function App.
259
+
The `Function_App_URL` can be found on Function App's Overview page and the`API_KEY` is generated by Azure Function. You can get the `API_KEY` from `signalr_extension` in the **App keys** blade of Function App.
If you want to use more than one Function App together with one SignalR Service, upstream can also support complex routing rules. Find more details at [Upstream settings](../azure-signalr/concept-upstream.md).
@@ -15,13 +15,13 @@ This set of articles explains how to authenticate and send real-time messages to
15
15
|---------|---------|
16
16
| Handle messages from SignalR Service |[Trigger binding](./functions-bindings-signalr-service-trigger.md)|
17
17
| Return the service endpoint URL and access token |[Input binding](./functions-bindings-signalr-service-input.md)|
18
-
| Send SignalR Service messages |[Output binding](./functions-bindings-signalr-service-output.md)|
18
+
| Send SignalR Service messages and manage groups |[Output binding](./functions-bindings-signalr-service-output.md)|
19
19
20
20
::: zone pivot="programming-language-csharp"
21
21
22
22
## Install extension
23
23
24
-
The extension NuGet package you install depends on the C# mode you're using in your function app:
24
+
The extension NuGet package you install depends on the C# mode you're using in your function app:
25
25
26
26
# [Isolated worker model](#tab/isolated-process)
27
27
@@ -39,18 +39,18 @@ Add the extension to your project by installing this [NuGet package].
39
39
40
40
---
41
41
42
-
::: zone-end
42
+
::: zone-end
43
43
44
-
::: zone pivot="programming-language-javascript,programming-language-python,programming-language-powershell"
44
+
::: zone pivot="programming-language-javascript,programming-language-python,programming-language-powershell"
45
45
46
-
## Install bundle
46
+
## Install bundle
47
47
48
48
The SignalR Service extension is part of an [extension bundle], which is specified in your host.json project file. When you create a project that targets version 3.x or later, you should already have this bundle installed. To learn more, see [extension bundle].
49
49
50
-
::: zone-end
51
-
::: zone pivot="programming-language-java"
50
+
::: zone-end
51
+
::: zone pivot="programming-language-java"
52
52
53
-
## Add dependency
53
+
## Add dependency
54
54
55
55
To use the SignalR Service annotations in Java functions, you need to add a dependency to the *azure-functions-java-library-signalr* artifact (version 1.0 or higher) to your *pom.xml* file.
56
56
@@ -61,7 +61,7 @@ To use the SignalR Service annotations in Java functions, you need to add a depe
0 commit comments