但是,我无法在单元测试中访问我的任何类型的SuppressMessage属性。可以在运行时访问SuppressMessage属性吗?我已经包含了我的单元测试的简化版本。[System.Diagnostics.CodeAnalysis.SuppressMessage("Foo", "Bar")]
public
我试图使用System.Diagnostics.CodeAnalysis.SuppressMessage属性来阻止sonarqube在代码库中的特定方法上提出这个问题。[SuppressMessage("csharpsquid", "S1871:Two branches in the same conditional structure should not have
View_Roles").MapLeftKey("RoleID").MapRightKey("ViewID")); 这是Role.cs public class Role [SuppressMessagepublic bool IsAdminRole { get; set; }
[SuppressMessagevirtual ICollection<View> View