Revert "Emit Signal method and delegate to provide a hook into events" #617
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reverts #602, since the change break another non-azure user.
And post the issue as below.
Recently we experience problem when Autorest generates additional information inside our partial class autogenerated class Module.cs. In Bold is the diff between working and not working version.
NOT WORKING ( IN Bold)
/****************************************************************************
// Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6282, generator: {generator})
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
using SignalDelegate = global::System.Func<string, global::System.Threading.CancellationToken, global::System.Funcglobal::System.EventArgs, global::System.Threading.Tasks.Task>;
using EventListenerDelegate = global::System.Func<string, global::System.Threading.CancellationToken, global::System.Funcglobal::System.EventArgs, global::System.Func<string, global::System.Threading.CancellationToken, global::System.Funcglobal::System.EventArgs, global::System.Threading.Tasks.Task>, global::System.Management.Automation.InvocationInfo, string, global::System.Exception, global::System.Threading.Tasks.Task>;
public async global::System.Threading.Tasks.Task Signal(string id, global::System.Threading.CancellationToken token, global::System.Funcglobal::System.EventArgs getEventData, SignalDelegate signal, global::System.Management.Automation.InvocationInfo invocationInfo, string parameterSetName, global::System.Exception exception)
{
using( NoSynchronizationContext )
{
await EventListener?.Invoke(id,token,getEventData, signal, invocationInfo, parameterSetName,exception);
}
}
}
}
/****************************************************************************
Working
// Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6282, generator: {generator})
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
namespace Microsoft.Teams.Config.Cmdlets
{
using static Microsoft.Teams.Config.Cmdlets.Runtime.Extensions;
}
Do you have any insides why this not working code is being generated. The issue is that we are getting null ref executing line await EventListener?.Invoke(id,token,getEventData, signal, invocationInfo, parameterSetName,exception);