由于程序集 'PaintDotNet.SystemLayer.dll' 包含基于 ResX 的资源文件,因此请使用 NeutralResourcesLanguage 特性来标记它,并指定该程序集内的资源所采用的语言。这会改进首次检索资源时的查找性能。 从 'FileSystem.WriteToStream(FileStream, void*, uint)' 中移除对 SafeHandle.DangerousGetHandle 的调用。 从 'FileSystem.WriteToStreamingFileGather(FileStream, void*[], uint[])' 中移除对 SafeHandle.DangerousGetHandle 的调用。 在方法 'FormEx.HandleParentWndProc(ref Message)' 中,考虑将参数名称 'm' 改为一个更能体现其意义的名称。 'NativeConstants.BHID_Stream.get()' 似乎没有上游 public 或 protected 调用方。 'NativeMethods.CloseClipboard()' 似乎没有上游 public 或 protected 调用方。 'NativeMethods.EnumWindows(NativeDelegates.EnumWindowsProc, IntPtr)' 似乎没有上游 public 或 protected 调用方。 'NativeMethods.GetClipboardData(uint)' 似乎没有上游 public 或 protected 调用方。 'NativeMethods.IsClipboardFormatAvailable(uint)' 似乎没有上游 public 或 protected 调用方。 'NativeMethods.OpenClipboard(IntPtr)' 似乎没有上游 public 或 protected 调用方。 'NativeMethods.SHCreateItemFromParsingName(string, IntPtr, ref Guid, out IntPtr)' 似乎没有上游 public 或 protected 调用方。 'NativeMethods.SUCCEEDED(int)' 似乎没有上游 public 或 protected 调用方。 'NativeMethods.WaitForInputIdle(IntPtr, uint)' 似乎没有上游 public 或 protected 调用方。 在方法 'PdnGraphics.DrawPolyLine(Graphics, Color, Point[])' 中,考虑将参数名称 'g' 改为一个更能体现其意义的名称。 在方法 'PdnGraphics.FillRectangles(Graphics, Color, Rectangle[])' 中,考虑将参数名称 'g' 改为一个更能体现其意义的名称。 由于 'string.IndexOf(string)' 的行为可能会因当前用户的区域设置不同而不同,请将 'PropertyItem2.GetProperty(string, string)' 中的此调用替换为对 'string.IndexOf(string, StringComparison)' 的调用。如果要向用户显示 'string.IndexOf(string, StringComparison)' 的结果(例如,在对一个项列表进行排序以便在列表框中显示时),请指定“StringComparison.CurrentCulture”或“StringComparison.CurrentCultureIgnoreCase”作为“StringComparison”参数。如果比较不区分大小写的标识符(例如,文件路径、环境变量或注册表项和值),则指定“StringComparison.OrdinalIgnoreCase”。或者,如果比较区分大小写的标识符,则指定“StringComparison.Ordinal”。 由于 'string.IndexOf(string, int)' 的行为可能会因当前用户的区域设置不同而不同,请将 'PropertyItem2.GetProperty(string, string)' 中的此调用替换为对 'string.IndexOf(string, int, StringComparison)' 的调用。如果要向用户显示 'string.IndexOf(string, int, StringComparison)' 的结果(例如,在对一个项列表进行排序以便在列表框中显示时),请指定“StringComparison.CurrentCulture”或“StringComparison.CurrentCultureIgnoreCase”作为“StringComparison”参数。如果比较不区分大小写的标识符(例如,文件路径、环境变量或注册表项和值),则指定“StringComparison.OrdinalIgnoreCase”。或者,如果比较区分大小写的标识符,则指定“StringComparison.Ordinal”。 在委托 'RealParentWndProcDelegate' 中,考虑将参数名称 'm' 改为一个更能体现其意义的名称。 更改 P/Invoke 'SafeNativeMethods.BitBlt(IntPtr, int, int, int, int, IntPtr, int, int, int)' 的可访问性,使它在自己的程序集外部不再是可见的。 更改 P/Invoke 'SafeNativeMethods.CreateCompatibleBitmap(IntPtr, int, int)' 的可访问性,使它在自己的程序集外部不再是可见的。 更改 P/Invoke 'SafeNativeMethods.CreateCompatibleDC(IntPtr)' 的可访问性,使它在自己的程序集外部不再是可见的。 'SafeNativeMethods.CreateFontW(int, int, int, int, int, uint, uint, uint, uint, uint, uint, uint, uint, string)' 似乎没有上游 public 或 protected 调用方。 更改 P/Invoke 'SafeNativeMethods.DeleteDC(IntPtr)' 的可访问性,使它在自己的程序集外部不再是可见的。 更改 P/Invoke 'SafeNativeMethods.DeleteObject(IntPtr)' 的可访问性,使它在自己的程序集外部不再是可见的。 'SafeNativeMethods.DrawTextW(IntPtr, string, int, ref NativeStructs.RECT, uint)' 似乎没有上游 public 或 protected 调用方。 'SafeNativeMethods.GetCurrentThread()' 似乎没有上游 public 或 protected 调用方。 更改 P/Invoke 'SafeNativeMethods.GetDesktopWindow()' 的可访问性,使它在自己的程序集外部不再是可见的。 更改 P/Invoke 'SafeNativeMethods.GetWindowDC(IntPtr)' 的可访问性,使它在自己的程序集外部不再是可见的。 如代码中所声明的,P/Invoke 'SafeNativeMethods.GetWindowRect(IntPtr, ref SafeNativeMethods.RECT)' 的返回类型在 64 位 平台上的字节宽度将为 8。这是不正确的,因为此 API 的实际本机声明表明该返回类型在 64 位 平台上的字节宽度应为 4。请参考 MSDN Platform SDK 文档来获取帮助,确定应使用哪种数据类型来代替 'IntPtr'。 更改 P/Invoke 'SafeNativeMethods.GetWindowRect(IntPtr, ref SafeNativeMethods.RECT)' 的可访问性,使它在自己的程序集外部不再是可见的。 'SafeNativeMethods.GlobalFree(IntPtr)' 似乎没有上游 public 或 protected 调用方。 如代码中所声明的,P/Invoke 'SafeNativeMethods.ReleaseDC(IntPtr, IntPtr)' 的返回类型在 64 位 平台上的字节宽度将为 8。这是不正确的,因为此 API 的实际本机声明表明该返回类型在 64 位 平台上的字节宽度应为 4。请参考 MSDN Platform SDK 文档来获取帮助,确定应使用哪种数据类型来代替 'IntPtr'。 更改 P/Invoke 'SafeNativeMethods.ReleaseDC(IntPtr, IntPtr)' 的可访问性,使它在自己的程序集外部不再是可见的。 更改 P/Invoke 'SafeNativeMethods.SelectObject(IntPtr, IntPtr)' 的可访问性,使它在自己的程序集外部不再是可见的。 如代码中所声明的,P/Invoke 'SafeNativeMethods.SendMessage(IntPtr, int, int, string)' 的参数 'wParam' 在 64 位 平台上的字节宽度将为 4。这是不正确的,因为此 API 的实际本机声明表明该参数在 64 位 平台上的字节宽度应为 8。请参考 MSDN Platform SDK 文档来获取帮助,确定应使用哪种数据类型来代替 'int'。 如代码中所声明的,P/Invoke 'SafeNativeMethods.SendMessage(IntPtr, int, int, string)' 的返回类型在 64 位 平台上的字节宽度将为 4。这是不正确的,因为此 API 的实际本机声明表明该返回类型在 64 位 平台上的字节宽度应为 8。请参考 MSDN Platform SDK 文档来获取帮助,确定应使用哪种数据类型来代替 'int'。 如代码中所声明的,P/Invoke 'SafeNativeMethods.SendMessage(IntPtr, int, int, StringBuilder)' 的参数 'wParam' 在 64 位 平台上的字节宽度将为 4。这是不正确的,因为此 API 的实际本机声明表明该参数在 64 位 平台上的字节宽度应为 8。请参考 MSDN Platform SDK 文档来获取帮助,确定应使用哪种数据类型来代替 'int'。 如代码中所声明的,P/Invoke 'SafeNativeMethods.SendMessage(IntPtr, int, int, StringBuilder)' 的返回类型在 64 位 平台上的字节宽度将为 4。这是不正确的,因为此 API 的实际本机声明表明该返回类型在 64 位 平台上的字节宽度应为 8。请参考 MSDN Platform SDK 文档来获取帮助,确定应使用哪种数据类型来代替 'bool'。 'SafeNativeMethods.SetThreadPriority(IntPtr, int)' 似乎没有上游 public 或 protected 调用方。 'SafeNativeMethods.StretchBlt(IntPtr, int, int, int, int, IntPtr, int, int, int, int, uint)' 似乎没有上游 public 或 protected 调用方。 'SafeNativeMethods.WinHttpGetIEProxyConfigForCurrentUser(ref NativeStructs.WINHTTP_CURRENT_USER_IE_PROXY_CONFIG)' 似乎没有上游 public 或 protected 调用方。 在方法 'SingleInstanceManager.FilterMessage(ref Message)' 中,考虑将参数名称 'm' 改为一个更能体现其意义的名称。 'ToolStripEx.TextBox_Leave(object, EventArgs)' 似乎没有上游 public 或 protected 调用方。 'Tracing.WriteLine(string)' 似乎没有上游 public 或 protected 调用方。 'UI.DetermineVisualStyleClassImpl()' 将“StringComparison.InvariantCulture”作为“StringComparison”参数传递给 'string.Compare(string, string, StringComparison)'。若要执行非语义比较,请改为指定“StringComparison.Ordinal”或“StringComparison.OrdinalIgnoreCase”。 'UI.DetermineVisualStyleClassImpl()' 将“StringComparison.InvariantCulture”作为“StringComparison”参数传递给 'string.Compare(string, string, StringComparison)'。若要执行非语义比较,请改为指定“StringComparison.Ordinal”或“StringComparison.OrdinalIgnoreCase”。 'UI.DetermineVisualStyleClassImpl()' 将“StringComparison.InvariantCulture”作为“StringComparison”参数传递给 'string.Compare(string, string, StringComparison)'。若要执行非语义比较,请改为指定“StringComparison.Ordinal”或“StringComparison.OrdinalIgnoreCase”。 'UI.DetermineVisualStyleClassImpl()' 将“StringComparison.InvariantCulture”作为“StringComparison”参数传递给 'string.Compare(string, string, StringComparison)'。若要执行非语义比较,请改为指定“StringComparison.Ordinal”或“StringComparison.OrdinalIgnoreCase”。 'UI.DetermineVisualStyleClassImpl()' 将“StringComparison.InvariantCulture”作为“StringComparison”参数传递给 'string.Compare(string, string, StringComparison)'。若要执行非语义比较,请改为指定“StringComparison.Ordinal”或“StringComparison.OrdinalIgnoreCase”。 'UI.DetermineVisualStyleClassImpl()' 将“StringComparison.InvariantCulture”作为“StringComparison”参数传递给 'string.Compare(string, string, StringComparison)'。若要执行非语义比较,请改为指定“StringComparison.Ordinal”或“StringComparison.OrdinalIgnoreCase”。 'UI.DetermineVisualStyleClassImpl()' 将“StringComparison.InvariantCulture”作为“StringComparison”参数传递给 'string.Compare(string, string, StringComparison)'。若要执行非语义比较,请改为指定“StringComparison.Ordinal”或“StringComparison.OrdinalIgnoreCase”。 在方法 'UI.DrawCommandButton(Graphics, PushButtonState, Rectangle, Color, Control)' 中,考虑将参数名称 'g' 改为一个更能体现其意义的名称。 在方法 'UI.InitScaling(Control)' 中,考虑将参数名称 'c' 改为一个更能体现其意义的名称。 从 'WaitHandleArray.this.set(int, WaitHandle)' 中移除对 SafeHandle.DangerousGetHandle 的调用。 由于 'string.StartsWith(string)' 的行为可能会因当前用户的区域设置不同而不同,请将 'FileDialogControlBase.WholeDialogWrapper.FileDialogEnumWindowCallBack(IntPtr, int)' 中的此调用替换为对 'string.StartsWith(string, StringComparison)' 的调用。如果要向用户显示 'string.StartsWith(string, StringComparison)' 的结果(例如,在对一个项列表进行排序以便在列表框中显示时),请指定“StringComparison.CurrentCulture”或“StringComparison.CurrentCultureIgnoreCase”作为“StringComparison”参数。如果比较不区分大小写的标识符(例如,文件路径、环境变量或注册表项和值),则指定“StringComparison.OrdinalIgnoreCase”。或者,如果比较区分大小写的标识符,则指定“StringComparison.Ordinal”。 从字段名 'FileDialogPlaces.m_places' 可看出该字段是实例数据,但它被声明为 Static (在 Visual Basic 中为 Shared)。请检查此成员,验证它是否应为静态数据,或者考虑更改字段名。 'NativeMethods.SetDlgItemText(IntPtr, int, string)' 似乎没有上游 public 或 protected 调用方。 'POINT.POINT(Point)' 似乎没有上游 public 或 protected 调用方。 'POINT.POINT(int, int)' 似乎没有上游 public 或 protected 调用方。 'RECT.Height.set(uint)' 似乎没有上游 public 或 protected 调用方。 'RECT.Location.get()' 似乎没有上游 public 或 protected 调用方。 'RECT.Location.set(POINT)' 似乎没有上游 public 或 protected 调用方。 'RECT.Width.set(uint)' 似乎没有上游 public 或 protected 调用方。 'Polygon.Clip(CombineMode, Polygon)' 似乎没有上游 public 或 protected 调用方。 'VertexList.VertexList(Vertex[])' 似乎没有上游 public 或 protected 调用方。 'VertexList.VertexList(Vertex[], bool)' 似乎没有上游 public 或 protected 调用方。 'VertexList.ToGraphicsPath()' 似乎没有上游 public 或 protected 调用方。 'VertexList.TristripToGraphicsPath()' 似乎没有上游 public 或 protected 调用方。 避免调用有问题的方法 避免进行不必要和具有潜在危险的方法调用。 从 {0} 中移除对 SafeHandle.DangerousGetHandle 的调用。 http://msdn.microsoft.com/library/bb385973.aspx [none] Error 避免使用未调用的私有代码 存在对外部不可见的未调用代码,该代码不是已知的运行时入口点。如果错误地引发此冲突,请向 Visual Studio Code Analysis 团队发送问题报告。 {0} 似乎没有上游 public 或 protected 调用方。 http://msdn.microsoft.com/library/ms182264.aspx [none] Warning 标识符应正确拼写 组成标识符的各单词不应缩写,并且应正确拼写。如果此规则对应识别的词条产生了误报,请将该词添加到 FxCop 自定义字典中。 在委托 {0} 中,考虑将参数名称 {1} 改为一个更能体现其意义的名称。 在方法 {0} 中,考虑将参数名称 {1} 改为一个更能体现其意义的名称。 http://msdn.microsoft.com/library/bb264492.aspx [none] CriticalWarning 用 NeutralResourcesLanguageAttribute 标记程序集 NeutralResourcesLanguage 特性将用来呈现非特定区域性的程序集资源的语言通知给 ResourceManager。在查找与非特定区域性语言具有相同区域性的资源时,ResourceManager 会自动使用位于主程序集内的资源,而不是搜索具有当前线程的当前用户界面区域性的附属程序集。这会改进所加载的第一个资源的查找性能,并缩小工作集。 由于程序集 {0} 包含基于 ResX 的资源文件,因此请使用 NeutralResourcesLanguage 特性来标记它,并指定该程序集内的资源所采用的语言。这会改进首次检索资源时的查找性能。 http://msdn.microsoft.com/library/bb385967.aspx [none] Warning P/Invoke 声明应为可移植声明 . 如代码中所声明的,P/Invoke {1} 的参数 {0} 在 {3} 平台上的字节宽度将为 {2}。这是不正确的,因为此 API 的实际本机声明表明该参数在 {3} 平台上的字节宽度应为 {4}。请参考 MSDN Platform SDK 文档来获取帮助,确定应使用哪种数据类型来代替 {5}。 如代码中所声明的,P/Invoke {0} 的返回类型在 {2} 平台上的字节宽度将为 {1}。这是不正确的,因为此 API 的实际本机声明表明该返回类型在 {2} 平台上的字节宽度应为 {3}。请参考 MSDN Platform SDK 文档来获取帮助,确定应使用哪种数据类型来代替 {4}。 http://msdn.microsoft.com/library/ms182284(VS.100).aspx [none] Error P/Invokes 应该是不可见的 互操作层不应该是公共的。DllImport 特性不应该应用于可公开访问的成员(公共成员或受保护的成员)。 更改 P/Invoke {0} 的可访问性,使它在自己的程序集外部不再是可见的。 http://msdn.microsoft.com/library/ms182209.aspx [none] CriticalError 检查令人误解的字段名 检查字段名,按照惯例,字段名会指示字段是实例字段还是静态字段,但实际上并非如此。此规则会对前缀为“s”的实例字段以及前缀为“m_”的静态字段引发。 从字段名 {0} 可看出该字段是实例数据,但它被声明为 Static (在 Visual Basic 中为 Shared)。请检查此成员,验证它是否应为静态数据,或者考虑更改字段名。 http://msdn.microsoft.com/library/bb164506.aspx [none] Warning 指定 StringComparison 如果存在采用 StringComparison 参数的重载,则始终先调用此重载,而不是那些不接受该参数的重载。 由于 {0} 的行为可能会因当前用户的区域设置不同而不同,请将 {1} 中的此调用替换为对 {2} 的调用。如果要向用户显示 {2} 的结果(例如,在对一个项列表进行排序以便在列表框中显示时),请指定“StringComparison.CurrentCulture”或“StringComparison.CurrentCultureIgnoreCase”作为“StringComparison”参数。如果比较不区分大小写的标识符(例如,文件路径、环境变量或注册表项和值),则指定“StringComparison.OrdinalIgnoreCase”。或者,如果比较区分大小写的标识符,则指定“StringComparison.Ordinal”。 http://msdn.microsoft.com/library/bb386080.aspx [none] Error 使用按顺序的 StringComparison 对于非语义比较,应使用 StringComparison.Ordinal 或 StringComparison.OrdinalIgnoreCase,而不使用区分语义的 StringComparison.InvariantCulture。 {0} 将“{1}”作为“StringComparison”参数传递给 {2}。若要执行非语义比较,请改为指定“StringComparison.Ordinal”或“StringComparison.OrdinalIgnoreCase”。 http://msdn.microsoft.com/library/bb385972.aspx [none] Error 类别 确定性 全部折叠 检查 ID 错误 错误 全部展开 帮助 消息 [位置未存储在 Pdb 中] 项目 解析 规则 规则文件 规则说明 状态 目标 警告 警告 代码分析报告