型全体の FxCop 警告を抑制するにはどうすればよいですか?
namespace ConsoleApplication1
{
public static class Serializer<T>
{
public static string Serialize(T obj)
{
return string.Empty;
}
public static T Deserialize(string str)
{
return default(T);
}
}
私はこれを試しましたが、うまくいきません:
[assembly: SuppressMessage("Microsoft.Design",
"CA1000:DoNotDeclareStaticMembersOnGenericTypes", Scope = "Type",
Target = "ConsoleApplication1.Serializer'1")]