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
@@ -155,7 +151,7 @@ Here's an `WebPubSubTrigger` attribute in a method signature:
155
151
```csharp
156
152
[FunctionName("WebPubSubTrigger")]
157
153
public static void Run([WebPubSubTrigger("<hub>", <WebPubSubEventType>, "<event-name>")]
158
-
WebPubSubConnectionContext context, ILogger log)
154
+
WebPubSubConnectionContext context, ILogger log)
159
155
{
160
156
...
161
157
}
@@ -195,6 +191,9 @@ In weakly typed language like JavaScript, `name` in `function.json` will be used
195
191
|clientCertificates|`IList<ClientCertificate>`|A list of certificate thumbprint from clients in system `connect` request|-|
196
192
|reason|`string`|Reason in system `disconnected` request|-|
197
193
194
+
> [!IMPORTANT]
195
+
> In C#, mutliple types supported parameter __MUST__ be put in the first, i.e. `request` or `data` that other than the default `BinaryData` type to make the function binding correctly.
196
+
198
197
### Return response
199
198
200
199
`WebPubSubTrigger` will respect customer returned response for synchronous events of `connect` and user event. Only matched response will be sent back to service, otherwise, it will be ignored. Besides, `WebPubSubTrigger` return object supports users to `SetState()` and `ClearStates()` to manage the metadata for the connection. And the extension will merge the results from return value with the original ones from request `WebPubSubConnectionContext.States`. Value in existing key will be overwrite and value in new key will be added.
0 commit comments