Skip to content

Quick fix for adding event handler does work in Blazor component #11524

Open
@vsfeedback

Description

@vsfeedback

This issue has been moved from a ticket on Developer Community.


[severity:It bothers me. A fix would be nice]
When adding an event handler for a timer, there is no quick fix shown to create the missing new handler. In the example below, I add an additional event handler XX:

protected override void OnInitialized()
{
AuthStateProvider.AuthenticationStateChanged += OnAuthenticationStateChanged;

 _timer = new System.Timers.Timer(1000); // Set the interval to 1 second (1000 ms)
 _timer.Elapsed += OnTimerElapsed;
 _timer.AutoReset = true;
 _timer.Enabled = true;
 _timer.Elapsed += XX;

}

but when I do Ctrl . nothing happens. I should suggest creating another handler named XX.


Original Comments

Feedback Bot on 2/19/2025, 05:48 PM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    author: migration bot 🤖The issue was created by a issue mover bot. The author may not be the actual author

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions