+2008-02-10 Sebastien Pouliot <sebastien@ximian.com>
+
+ * gdipFunctions.cs: Seal GdiPlusStreamHelper class. Found using
+ Gendarme.
+ * carbonFunctions.cs: Seal Carbon class before 2.0, make it static
+ from 2.0. Issues reported by Gendarme.
+ * ColorConverter.cs: Seal internal IComparer class CompareColors.
+ Found using Gendarme.
+ * FontConverter.cs: Don't ignore result of String.Trim. Found
+ using Gendarme.
+ * Graphics.cs: Document unused FillMode on DrawCloseCurve (part
+ of the API but unused) and remove unused internal code. Both found
+ using Gendarme.
+ * SRDescriptionAttribute.cs: Seal internal attribute. Found using
+ Gendarme.
+
2008-02-01 Geoff Norton <gnorton@novell.com>
* carbonFunction.cs: More clipping fixes. Include a variable to
return true;
}
- class CompareColors : IComparer
- {
+ sealed class CompareColors : IComparer {
+
public int Compare (object x, object y)
{
return String.Compare (((Color) x).Name, ((Color) y).Name);
}
font = (string)value;
- font.Trim();
+ font = font.Trim ();
if (font.Length == 0) {
return null;
GDIPlus.CheckStatus (status);
}
+ // according to MSDN fillmode "is required but ignored" which makes _some_ sense since the unmanaged
+ // GDI+ call doesn't support it (issue spotted using Gendarme's AvoidUnusedParametersRule)
public void DrawClosedCurve (Pen pen, Point [] points, float tension, FillMode fillmode)
{
if (pen == null)
status = GDIPlus.GdipDrawClosedCurve2I (nativeObject, pen.nativeObject, points, points.Length, tension);
GDIPlus.CheckStatus (status);
}
-
+
+ // according to MSDN fillmode "is required but ignored" which makes _some_ sense since the unmanaged
+ // GDI+ call doesn't support it (issue spotted using Gendarme's AvoidUnusedParametersRule)
public void DrawClosedCurve (Pen pen, PointF [] points, float tension, FillMode fillmode)
{
if (pen == null)
GDIPlus.CheckStatus (status);
}
- internal void DrawRectangle (Pen pen, RectangleF rect)
- {
- if (pen == null)
- throw new ArgumentNullException ("pen");
- DrawRectangle (pen, rect.Left, rect.Top, rect.Width, rect.Height);
- }
-
public void DrawRectangle (Pen pen, Rectangle rect)
{
if (pen == null)
namespace System.Drawing
{
[AttributeUsage(AttributeTargets.All)]
- internal class SRDescriptionAttribute : DescriptionAttribute
- {
+ internal sealed class SRDescriptionAttribute : DescriptionAttribute {
+
private bool isReplaced = false;
public SRDescriptionAttribute (string description)
namespace System.Drawing {
[SuppressUnmanagedCodeSecurity]
- internal class Carbon {
+#if NET_2_0
+ internal static class Carbon {
+#else
+ internal sealed class Carbon {
+#endif
internal static Hashtable contextReference = new Hashtable ();
internal static object lockobj = new object ();
public delegate void StreamCloseDelegate ();
public delegate long StreamSizeDelegate ();
- internal class GdiPlusStreamHelper
- {
+ internal sealed class GdiPlusStreamHelper {
public Stream stream;
private StreamGetHeaderDelegate sghd = null;