提交 7b262611 编写于 作者: S Sam Harwell

Add annotations for code refactoring types

上级 01810578
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#nullable enable
using System;
using System.Threading;
using Microsoft.CodeAnalysis.CodeActions;
......
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#nullable enable
using System.Threading.Tasks;
namespace Microsoft.CodeAnalysis.CodeRefactorings
......
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#nullable enable
using System;
using System.Composition;
using System.Diagnostics.CodeAnalysis;
namespace Microsoft.CodeAnalysis.CodeRefactorings
{
......@@ -15,7 +18,8 @@ public sealed class ExportCodeRefactoringProviderAttribute : ExportAttribute
/// <summary>
/// The name of the <see cref="CodeRefactoringProvider"/>.
/// </summary>
public string Name { get; set; }
[DisallowNull]
public string? Name { get; set; }
/// <summary>
/// The source languages for which this provider can provide refactorings. See <see cref="LanguageNames"/>.
......@@ -35,8 +39,6 @@ public ExportCodeRefactoringProviderAttribute(string firstLanguage, params strin
throw new ArgumentNullException(nameof(additionalLanguages));
}
this.Name = null;
var languages = new string[additionalLanguages.Length + 1];
languages[0] = firstLanguage ?? throw new ArgumentNullException(nameof(firstLanguage));
for (var index = 0; index < additionalLanguages.Length; index++)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册