public static async TaskIn the above code snippet, the CodeAnalysisContext is used to find the code issue identified by the analyzer. Then, a code fix is registered using the RegisterCodeFix method. Finally, the code fix is returned as the resulting action. The package library for the RegisterCodeFix method would be the Roslyn code analysis framework for C#.> AnalyzeCode(CodeAnalysisContext context) { // Find the code issue //context.CodeIssue can be any diagnositic issue var diagnostic = context.CodeIssue.Diagnostics.First(); // Register a code fix with the CodeFixContext var codeFix = CodeAction.Create("Fix performance issue", token => MakePerformanceFixAsync(context.Document, diagnostic, token)); context.RegisterCodeFix(codeFix, diagnostic); // Return the code fix as the resulting actions return new[] { codeFix }; }