|
|
@@ -53,7 +53,7 @@ internal partial class HubClientProxyGenerator
|
|
|
registerProviderBody.AppendLine($@"
|
|
|
if (typeof({_spec.SetterTypeParameterName}) == typeof({fqtn}))
|
|
|
{{
|
|
|
- return (System.IDisposable) new CallbackProviderRegistration({methodName}({_spec.SetterHubConnectionParameterName}, ({fqtn}) provider));
|
|
|
+ return (System.IDisposable) new CallbackProviderRegistration({methodName}({_spec.SetterHubConnectionParameterName}, ({fqtn}) {_spec.SetterProviderParameterName}));
|
|
|
}}");
|
|
|
}
|
|
|
|
|
|
@@ -61,12 +61,7 @@ internal partial class HubClientProxyGenerator
|
|
|
// RegisterCallbackProvider<T> is used by end-user to register their callback provider types
|
|
|
// CallbackProviderRegistration is a private implementation of IDisposable which simply holds
|
|
|
// an array of IDisposables acquired from registration of each callback method from HubConnection
|
|
|
- var extensions = $@"// <auto-generated>
|
|
|
-// Generated by Microsoft.AspNetCore.Client.SourceGenerator
|
|
|
-// </auto-generated>
|
|
|
-
|
|
|
-#nullable enable
|
|
|
-
|
|
|
+ var extensions = GeneratorHelpers.SourceFilePrefix() + $@"
|
|
|
using Microsoft.AspNetCore.SignalR.Client;
|
|
|
|
|
|
namespace {_spec.SetterNamespace}
|
|
|
@@ -133,12 +128,7 @@ namespace {_spec.SetterNamespace}
|
|
|
// The actual registration method goes thru each method that the callback provider type has and then
|
|
|
// registers the method with HubConnection and stashes the returned IDisposable into an array for
|
|
|
// later consumption by CallbackProviderRegistration's constructor
|
|
|
- var registrationMethodBody = new StringBuilder($@"// <auto-generated>
|
|
|
-// Generated by Microsoft.AspNetCore.Client.SourceGenerator
|
|
|
-// </auto-generated>
|
|
|
-
|
|
|
-#nullable enable
|
|
|
-
|
|
|
+ var registrationMethodBody = new StringBuilder(GeneratorHelpers.SourceFilePrefix() + $@"
|
|
|
using Microsoft.AspNetCore.SignalR.Client;
|
|
|
|
|
|
namespace {_spec.SetterNamespace}
|