/
githubmirror
/
roslyn
Обзор
Документация
Войти
/
githubmirror
/
roslyn
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Features/ExternalAccess/OmniSharp/CodeActions/OmniSharpCodeFixContextFactory.cs
53 строки
2 KB
Cyrus Najmabadi
Use file scoped namespaces. (#77854)
27 мар 2025, 09:55
Не верифицирован
27 мар 2025, 09:55
98d41b8
Код
Авторство
О чём код?
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; using System.Collections.Immutable; using System.Threading; using Microsoft.CodeAnalysis.CodeActions; using Microsoft.CodeAnalysis.CodeFixes; using Microsoft.CodeAnalysis.Text; namespace Microsoft.CodeAnalysis.ExternalAccess.OmniSharp.CodeActions; internal static class OmniSharpCodeFixContextFactory { public static CodeFixContext CreateCodeFixContext( Document document, TextSpan span, ImmutableArray<Diagnostic> diagnostics, Action<CodeAction, ImmutableArray<Diagnostic>> registerCodeFix, CancellationToken cancellationToken) => new(document, span, diagnostics, registerCodeFix, cancellationToken); public static CodeAnalysis.CodeRefactorings.CodeRefactoringContext CreateCodeRefactoringContext( Document document, TextSpan span, Action<CodeAction, TextSpan?> registerRefactoring, CancellationToken cancellationToken) => new(document, span, registerRefactoring, cancellationToken); public static FixAllContext CreateFixAllContext( Document? document, TextSpan? diagnosticSpan, Project project, CodeFixProvider codeFixProvider, FixAllScope scope, string? codeActionEquivalenceKey, IEnumerable<string> diagnosticIds, FixAllContext.DiagnosticProvider fixAllDiagnosticProvider, CancellationToken cancellationToken) => new(new FixAllState( fixAllProvider: NoOpFixAllProvider.Instance, diagnosticSpan, document, project, codeFixProvider, scope, codeActionEquivalenceKey, diagnosticIds, fixAllDiagnosticProvider), CodeAnalysisProgress.None, cancellationToken); }