Skip to content

Commit

Permalink
Annotate return value handling property for SignalR trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
Y-Sindo committed Sep 25, 2024
1 parent eb2318a commit 72e18a9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public void Initialize(ExtensionConfigContext context)
// Trigger binding rule
var triggerBindingRule = context.AddBindingRule<SignalRTriggerAttribute>();
triggerBindingRule.AddConverter<InvocationContext, JObject>(JObject.FromObject);
triggerBindingRule.BindToTrigger<InvocationContext>(new SignalRTriggerBindingProvider(_dispatcher, _nameResolver, _serviceManagerStore, webhookException));
triggerBindingRule.BindToTrigger(new SignalRTriggerBindingProvider(_dispatcher, _nameResolver, _serviceManagerStore, webhookException));

// Non-trigger binding rule
var signalRConnectionInfoAttributeRule = context.AddBindingRule<SignalRConnectionInfoAttribute>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<PackageId>Microsoft.Azure.WebJobs.Extensions.SignalRService</PackageId>
<Version>1.15.0-beta.1</Version>
<!--The ApiCompatVersion is managed automatically and should not generally be modified manually.-->
<ApiCompatVersion>1.14.0</ApiCompatVersion>
<SignAssembly>true</SignAssembly>
<IsExtensionClientLibrary>true</IsExtensionClientLibrary>
<NoWarn>$(NoWarn);CS1591;AZC0107;</NoWarn>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ namespace Microsoft.Azure.WebJobs.Extensions.SignalRService
/// <summary>
/// Attribute used to mark a function that should be triggered by messages sent from SignalR clients.
/// </summary>
[AttributeUsage(AttributeTargets.ReturnValue | AttributeTargets.Parameter)]
[Binding]
[AttributeUsage(AttributeTargets.Parameter)]
#pragma warning disable CS0618 // Type or member is obsolete
[Binding(TriggerHandlesReturnValue = true)]
#pragma warning restore CS0618 // Type or member is obsolete
public class SignalRTriggerAttribute : Attribute
{
/// <summary>
Expand Down

0 comments on commit 72e18a9

Please sign in to comment.