541 references to Throws
System.Drawing.Common.Tests (538)
System\Drawing\BitmapTests.cs (14)
885AssertExtensions.Throws<ArgumentException>(null, bitmap.MakeTransparent); 886AssertExtensions.Throws<ArgumentException>(null, () => bitmap.MakeTransparent(Color.Red)); 893AssertExtensions.Throws<ArgumentException>(null, bitmap.MakeTransparent); 942AssertExtensions.Throws<ArgumentOutOfRangeException>("x", () => bitmap.SetPixel(x, 0, Color.Red)); 951AssertExtensions.Throws<ArgumentOutOfRangeException>("y", () => bitmap.SetPixel(0, y, Color.Red)); 958AssertExtensions.Throws<ArgumentException>(null, () => bitmap.SetPixel(0, 0, Color.Red)); 967AssertExtensions.Throws<ArgumentException>(null, () => bitmap.SetPixel(0, 0, Color.Red)); 988AssertExtensions.Throws<ArgumentException>(null, () => bitmap.SetResolution(xDpi, 1)); 999AssertExtensions.Throws<ArgumentException>(null, () => bitmap.SetResolution(1, yDpi)); 1008AssertExtensions.Throws<ArgumentException>(null, () => bitmap.SetResolution(1, 1)); 1078AssertExtensions.Throws<ArgumentException>(null, () => bitmap.UnlockBits(data)); 1153AssertExtensions.Throws<ArgumentException>(null, () => bitmap.UnlockBits(data)); 1235AssertExtensions.Throws<ArgumentNullException>("bitmapdata", () => bitmap.UnlockBits(null)); 1261AssertExtensions.Throws<ArgumentException>(null, () => bitmap.UnlockBits(new BitmapData()));
System\Drawing\Drawing2D\CustomLineCapTests.cs (3)
112AssertExtensions.Throws<ArgumentException>(null, () => customLineCap.SetStrokeCaps(startCap, endCap)); 218AssertExtensions.Throws<ArgumentException>(null, () => customLineCap.SetStrokeCaps(LineCap.Flat, LineCap.Flat)); 219AssertExtensions.Throws<ArgumentException>(null, () => customLineCap.GetStrokeCaps(out LineCap startCap, out LineCap endCap));
System\Drawing\Drawing2D\GraphicsPathTests.cs (28)
316AssertExtensions.Throws<ArgumentNullException>("points", () => new GraphicsPath().AddLines((Point[])null)); 317AssertExtensions.Throws<ArgumentNullException>("points", () => new GraphicsPath().AddLines((PointF[])null)); 360AssertExtensions.Throws<ArgumentException>(null, () => gp.AddArc(1, 1, width, height, Pi4, Pi4)); 361AssertExtensions.Throws<ArgumentException>(null, () => gp.AddArc(1.0f, 1.0f, width, height, Pi4, Pi4)); 427AssertExtensions.Throws<ArgumentNullException>("points", () => gp.AddBeziers((PointF[])null)); 428AssertExtensions.Throws<ArgumentNullException>("points", () => gp.AddBeziers((Point[])null)); 444AssertExtensions.Throws<ArgumentException>(null, () => gp.AddBeziers(points)); 558AssertExtensions.Throws<ArgumentException>(null, () => gp.AddCurve((PointF[])null)); 559AssertExtensions.Throws<ArgumentException>(null, () => gp.AddCurve((Point[])null)); 666AssertExtensions.Throws<ArgumentNullException>("points", () => gp.AddClosedCurve((PointF[])null)); 667AssertExtensions.Throws<ArgumentNullException>("points", () => gp.AddClosedCurve((Point[])null)); 682AssertExtensions.Throws<ArgumentException>(null, () => gp.AddClosedCurve(points)); 697AssertExtensions.Throws<ArgumentException>(null, () => gp.AddClosedCurve(points)); 806AssertExtensions.Throws<ArgumentNullException>("rects", () => gp.AddRectangles((RectangleF[])null)); 807AssertExtensions.Throws<ArgumentNullException>("rects", () => gp.AddRectangles((Rectangle[])null)); 879AssertExtensions.Throws<ArgumentException>(null, () => gp.AddPie(1, 1, height, width, Pi4, Pi4)); 880AssertExtensions.Throws<ArgumentException>(null, () => gp.AddPie(1f, 1f, height, width, Pi4, Pi4)); 881AssertExtensions.Throws<ArgumentException>(null, () => gp.AddPie(new Rectangle(1, 1, height, width), Pi4, Pi4)); 939AssertExtensions.Throws<ArgumentNullException>("points", () => new GraphicsPath().AddPolygon((Point[])null)); 940AssertExtensions.Throws<ArgumentNullException>("points", () => new GraphicsPath().AddPolygon((PointF[])null)); 955AssertExtensions.Throws<ArgumentException>(null, () => gp.AddPolygon(points)); 970AssertExtensions.Throws<ArgumentException>(null, () => gp.AddPolygon(points)); 987AssertExtensions.Throws<ArgumentNullException>("addingPath", () => new GraphicsPath().AddPath(null, false)); 1112AssertExtensions.Throws<ArgumentNullException>("matrix", () => gp.Transform(null)); 1281AssertExtensions.Throws<ArgumentNullException>("destPoints", () => gp.Warp(null, default)); 1684AssertExtensions.Throws<ArgumentNullException>("pen", () => gp.Widen(null)); 1685AssertExtensions.Throws<ArgumentNullException>("pen", () => gp.Widen(null, new Matrix())); 1686AssertExtensions.Throws<ArgumentNullException>("pen", () => gp.Widen(null, new Matrix(), 0.67f));
System\Drawing\Drawing2D\LinearGradientBrushTests.cs (20)
652AssertExtensions.Throws<ArgumentException>(null, brush.ResetTransform); 696AssertExtensions.Throws<ArgumentNullException>("matrix", () => brush.MultiplyTransform(null)); 697AssertExtensions.Throws<ArgumentNullException>("matrix", () => brush.MultiplyTransform(null, MatrixOrder.Append)); 719AssertExtensions.Throws<ArgumentException>(null, () => brush.MultiplyTransform(matrix)); 720AssertExtensions.Throws<ArgumentException>(null, () => brush.MultiplyTransform(matrix, MatrixOrder.Append)); 729AssertExtensions.Throws<ArgumentException>(null, () => brush.MultiplyTransform(new Matrix())); 730AssertExtensions.Throws<ArgumentException>(null, () => brush.MultiplyTransform(new Matrix(), MatrixOrder.Prepend)); 770AssertExtensions.Throws<ArgumentException>(null, () => brush.TranslateTransform(0, 0, order)); 779AssertExtensions.Throws<ArgumentException>(null, () => brush.TranslateTransform(0, 0)); 780AssertExtensions.Throws<ArgumentException>(null, () => brush.TranslateTransform(0, 0, MatrixOrder.Append)); 820AssertExtensions.Throws<ArgumentException>(null, () => brush.ScaleTransform(0, 0, order)); 829AssertExtensions.Throws<ArgumentException>(null, () => brush.ScaleTransform(0, 0)); 830AssertExtensions.Throws<ArgumentException>(null, () => brush.ScaleTransform(0, 0, MatrixOrder.Append)); 871AssertExtensions.Throws<ArgumentException>(null, () => brush.RotateTransform(0, order)); 880AssertExtensions.Throws<ArgumentException>(null, () => brush.RotateTransform(0)); 881AssertExtensions.Throws<ArgumentException>(null, () => brush.RotateTransform(0, MatrixOrder.Append)); 924AssertExtensions.Throws<ArgumentException>(null, () => brush.SetSigmaBellShape(0)); 925AssertExtensions.Throws<ArgumentException>(null, () => brush.SetSigmaBellShape(0, 1)); 984AssertExtensions.Throws<ArgumentException>(null, () => brush.SetBlendTriangularShape(0)); 985AssertExtensions.Throws<ArgumentException>(null, () => brush.SetBlendTriangularShape(0, 1));
System\Drawing\Drawing2D\MatrixTests.cs (43)
261AssertExtensions.Throws<ArgumentException>(null, matrix1.Invert); 262AssertExtensions.Throws<ArgumentException>(null, matrix2.Invert); 263AssertExtensions.Throws<ArgumentException>(null, matrix3.Invert); 264AssertExtensions.Throws<ArgumentException>(null, matrix4.Invert); 265AssertExtensions.Throws<ArgumentException>(null, matrix5.Invert); 266AssertExtensions.Throws<ArgumentException>(null, matrix6.Invert); 272AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedMatrix().Invert()); 337AssertExtensions.Throws<ArgumentNullException>("matrix", () => matrix.Multiply(null)); 338AssertExtensions.Throws<ArgumentNullException>("matrix", () => matrix.Multiply(null, MatrixOrder.Prepend)); 348AssertExtensions.Throws<ArgumentException>(null, () => matrix.Multiply(other, order)); 357AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.Multiply(other)); 358AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.Multiply(other, MatrixOrder.Prepend)); 367AssertExtensions.Throws<ArgumentException>(null, () => matrix.Multiply(disposedMatrix)); 368AssertExtensions.Throws<ArgumentException>(null, () => matrix.Multiply(disposedMatrix, MatrixOrder.Prepend)); 393AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedMatrix().Reset()); 477AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedMatrix().Rotate(1, MatrixOrder.Append)); 486AssertExtensions.Throws<ArgumentException>(null, () => matrix.Rotate(1, order)); 494AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.RotateAt(1, PointF.Empty)); 495AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.RotateAt(1, PointF.Empty, MatrixOrder.Append)); 504AssertExtensions.Throws<ArgumentException>(null, () => matrix.RotateAt(1, PointF.Empty, order)); 561AssertExtensions.Throws<ArgumentException>(null, () => matrix.Shear(1, 2, order)); 569AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.Scale(1, 2)); 570AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.Scale(1, 2, MatrixOrder.Append)); 627AssertExtensions.Throws<ArgumentException>(null, () => matrix.Shear(1, 2, order)); 635AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.Shear(1, 2)); 636AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.Shear(1, 2, MatrixOrder.Append)); 684AssertExtensions.Throws<ArgumentException>(null, () => matrix.Translate(1, 2, order)); 692AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.Translate(1, 2)); 693AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.Translate(1, 2, MatrixOrder.Append)); 730AssertExtensions.Throws<ArgumentNullException>("pts", () => matrix.TransformPoints((Point[])null)); 731AssertExtensions.Throws<ArgumentNullException>("pts", () => matrix.TransformPoints((PointF[])null)); 738AssertExtensions.Throws<ArgumentException>(null, () => matrix.TransformPoints(Array.Empty<Point>())); 739AssertExtensions.Throws<ArgumentException>(null, () => matrix.TransformPoints(Array.Empty<PointF>())); 747AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.TransformPoints(new Point[1])); 748AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.TransformPoints(new PointF[1])); 796AssertExtensions.Throws<ArgumentNullException>("pts", () => matrix.VectorTransformPoints(null)); 797AssertExtensions.Throws<ArgumentNullException>("pts", () => matrix.TransformVectors((Point[])null)); 798AssertExtensions.Throws<ArgumentNullException>("pts", () => matrix.TransformVectors((PointF[])null)); 806AssertExtensions.Throws<ArgumentException>(null, () => matrix.TransformVectors(Array.Empty<Point>())); 807AssertExtensions.Throws<ArgumentException>(null, () => matrix.TransformVectors(Array.Empty<PointF>())); 815AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.VectorTransformPoints(new Point[1])); 816AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.TransformPoints(new Point[1])); 817AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.TransformVectors(new PointF[1]));
System\Drawing\Drawing2D\PathGradientBrushTests.cs (17)
418AssertExtensions.Throws<ArgumentException>(null, () => brush.SetSigmaBellShape(1f)); 419AssertExtensions.Throws<ArgumentException>(null, () => brush.SetSigmaBellShape(1f, 1f)); 502AssertExtensions.Throws<ArgumentException>(null, () => brush.SetBlendTriangularShape(1f)); 503AssertExtensions.Throws<ArgumentException>(null, () => brush.SetBlendTriangularShape(1f, 1f)); 691AssertExtensions.Throws<ArgumentException>(null, brush.ResetTransform); 725AssertExtensions.Throws<ArgumentException>(null, () => brush.MultiplyTransform(matrix, MatrixOrder.Append)); 732AssertExtensions.Throws<ArgumentNullException>("matrix", () => brush.MultiplyTransform(null)); 733AssertExtensions.Throws<ArgumentNullException>("matrix", () => brush.MultiplyTransform(null, MatrixOrder.Append)); 755AssertExtensions.Throws<ArgumentException>(null, () => brush.MultiplyTransform(matrix, (MatrixOrder)int.MinValue)); 763AssertExtensions.Throws<ArgumentException>(null, () => brush.MultiplyTransform(nonInvertible)); 764AssertExtensions.Throws<ArgumentException>(null, () => brush.MultiplyTransform(nonInvertible, MatrixOrder.Append)); 795AssertExtensions.Throws<ArgumentException>(null, () => brush.TranslateTransform(20f, 30f, MatrixOrder.Append)); 802AssertExtensions.Throws<ArgumentException>(null, () => brush.TranslateTransform(20f, 30f, (MatrixOrder)int.MinValue)); 845AssertExtensions.Throws<ArgumentException>(null, () => brush.ScaleTransform(0.25f, 2, MatrixOrder.Append)); 852AssertExtensions.Throws<ArgumentException>(null, () => brush.ScaleTransform(1, 1, (MatrixOrder)int.MinValue)); 886AssertExtensions.Throws<ArgumentException>(null, () => brush.RotateTransform(45, MatrixOrder.Append)); 893AssertExtensions.Throws<ArgumentException>(null, () => brush.RotateTransform(45, (MatrixOrder)int.MinValue));
System\Drawing\FontTests.cs (1)
775AssertExtensions.Throws<ArgumentNullException>("graphics", () => font.ToLogFont(new LOGFONT(), null));
System\Drawing\Graphics_DrawBezierTests.cs (20)
65AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawBezier(null, 1, 2, 3, 4, 5, 6, 7, 8)); 66AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawBezier(null, Point.Empty, Point.Empty, Point.Empty, Point.Empty)); 67AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawBezier(null, PointF.Empty, PointF.Empty, PointF.Empty, PointF.Empty)); 78AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawBezier(pen, 1, 2, 3, 4, 5, 6, 7, 8)); 79AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawBezier(pen, Point.Empty, Point.Empty, Point.Empty, Point.Empty)); 80AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawBezier(pen, PointF.Empty, PointF.Empty, PointF.Empty, PointF.Empty)); 110AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new Rectangle(0, 0, 1, 1), 0, 90)); 111AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, 0, 0, 1, 1, 0, 90)); 112AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new RectangleF(0, 0, 1, 1), 0, 90)); 113AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, 0f, 0f, 1f, 1f, 0, 90)); 121AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawBeziers(null, new Point[2])); 122AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawBeziers(null, new PointF[2])); 133AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawBeziers(pen, new Point[2])); 134AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawBeziers(pen, new PointF[2])); 143AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawBeziers(pen, (Point[])null)); 144AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawBeziers(pen, (PointF[])null)); 153AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawBeziers(pen, Array.Empty<Point>())); 154AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawBeziers(pen, Array.Empty<PointF>())); 183AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawBeziers(pen, new Point[2])); 184AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawBeziers(pen, new PointF[2]));
System\Drawing\Graphics_DrawLineTests.cs (22)
43AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawLine(null, Point.Empty, Point.Empty)); 44AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawLine(null, 0, 0, 0, 0)); 45AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawLine(null, PointF.Empty, PointF.Empty)); 46AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawLine(null, 0f, 0f, 0f, 0f)); 57AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLine(pen, Point.Empty, Point.Empty)); 58AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLine(pen, 0, 0, 0, 0)); 59AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLine(pen, PointF.Empty, PointF.Empty)); 60AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLine(pen, 0f, 0f, 0f, 0f)); 91AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLine(pen, Point.Empty, Point.Empty)); 92AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLine(pen, 0, 0, 0, 0)); 93AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLine(pen, PointF.Empty, PointF.Empty)); 94AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLine(pen, 0f, 0f, 0f, 0f)); 102AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawLines(null, new Point[2])); 103AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawLines(null, new PointF[2])); 114AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLines(pen, new Point[2])); 115AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLines(pen, new PointF[2])); 124AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawLines(pen, (Point[])null)); 125AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawLines(pen, (PointF[])null)); 136AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLines(pen, new Point[length])); 137AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLines(pen, new PointF[length])); 166AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLines(pen, new Point[2])); 167AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLines(pen, new PointF[2]));
System\Drawing\GraphicsTests.Core.cs (8)
75AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawRectangle(null, new RectangleF(0f, 0f, 1f, 1f))); 88AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangle(pen, new RectangleF(0f, 0f, 1f, 1f))); 119AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangle(pen, new RectangleF(0f, 0f, 1f, 1f))); 129AssertExtensions.Throws<ArgumentNullException>("brush", () => graphics.FillPie(null, new RectangleF(0, 0, 1, 1), 0, 90)); 142AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, new RectangleF(0, 0, 1, 1), 0, 90)); 153AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, new RectangleF(0, 0, 0, 1), 0, 90)); 164AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, new RectangleF(0, 0, 1, 0), 0, 90)); 195AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, new RectangleF(0, 0, 1, 1), 0, 90));
System\Drawing\GraphicsTests.cs (206)
139AssertExtensions.Throws<ArgumentException>(null, () => graphics.ReleaseHdc(hdc)); 140AssertExtensions.Throws<ArgumentException>(null, () => graphics.ReleaseHdcInternal(hdc)); 144AssertExtensions.Throws<ArgumentException>(null, graphics.ReleaseHdc); 145AssertExtensions.Throws<ArgumentException>(null, () => graphics.ReleaseHdcInternal(hdc)); 149AssertExtensions.Throws<ArgumentException>(null, graphics.ReleaseHdc); 150AssertExtensions.Throws<ArgumentException>(null, () => graphics.ReleaseHdcInternal(hdc)); 179AssertExtensions.Throws<ArgumentException>(null, () => graphics1.ReleaseHdc(hdc1)); 182AssertExtensions.Throws<ArgumentException>(null, () => graphics2.ReleaseHdc(hdc2)); 190AssertExtensions.Throws<ArgumentException>(null, graphics.ReleaseHdc); 191AssertExtensions.Throws<ArgumentException>(null, () => graphics.ReleaseHdc(IntPtr.Zero)); 192AssertExtensions.Throws<ArgumentException>(null, () => graphics.ReleaseHdcInternal(IntPtr.Zero)); 202AssertExtensions.Throws<ArgumentException>(null, graphics.ReleaseHdc); 203AssertExtensions.Throws<ArgumentException>(null, () => graphics.ReleaseHdc(IntPtr.Zero)); 204AssertExtensions.Throws<ArgumentException>(null, () => graphics.ReleaseHdcInternal(IntPtr.Zero)); 575AssertExtensions.Throws<ArgumentException>(null, graphics.Flush); 576AssertExtensions.Throws<ArgumentException>(null, () => graphics.Flush(FlushIntention.Flush)); 1181AssertExtensions.Throws<ArgumentException>(null, graphics.ResetTransform); 1221AssertExtensions.Throws<ArgumentNullException>("matrix", () => graphics.MultiplyTransform(null)); 1222AssertExtensions.Throws<ArgumentNullException>("matrix", () => graphics.MultiplyTransform(null, MatrixOrder.Append)); 1246AssertExtensions.Throws<ArgumentException>(null, () => graphics.MultiplyTransform(matrix)); 1247AssertExtensions.Throws<ArgumentException>(null, () => graphics.MultiplyTransform(matrix, MatrixOrder.Append)); 1258AssertExtensions.Throws<ArgumentException>(null, () => graphics.MultiplyTransform(matrix, order)); 1287AssertExtensions.Throws<ArgumentException>(null, () => graphics.MultiplyTransform(matrix)); 1288AssertExtensions.Throws<ArgumentException>(null, () => graphics.MultiplyTransform(matrix, MatrixOrder.Prepend)); 1335AssertExtensions.Throws<ArgumentException>(null, () => graphics.TranslateTransform(0, 0, order)); 1362AssertExtensions.Throws<ArgumentException>(null, () => graphics.TranslateTransform(0, 0)); 1363AssertExtensions.Throws<ArgumentException>(null, () => graphics.TranslateTransform(0, 0, MatrixOrder.Append)); 1405AssertExtensions.Throws<ArgumentException>(null, () => graphics.ScaleTransform(0, 0)); 1406AssertExtensions.Throws<ArgumentException>(null, () => graphics.ScaleTransform(0, 0, MatrixOrder.Append)); 1416AssertExtensions.Throws<ArgumentException>(null, () => graphics.ScaleTransform(0, 0, order)); 1443AssertExtensions.Throws<ArgumentException>(null, () => graphics.ScaleTransform(0, 0)); 1444AssertExtensions.Throws<ArgumentException>(null, () => graphics.ScaleTransform(0, 0, MatrixOrder.Append)); 1492AssertExtensions.Throws<ArgumentException>(null, () => graphics.RotateTransform(0, order)); 1519AssertExtensions.Throws<ArgumentException>(null, () => graphics.RotateTransform(0)); 1520AssertExtensions.Throws<ArgumentException>(null, () => graphics.RotateTransform(0, MatrixOrder.Append)); 1678AssertExtensions.Throws<ArgumentException>(null, () => graphics.CopyFromScreen(0, 0, 0, 0, Size.Empty)); 1679AssertExtensions.Throws<ArgumentException>(null, () => graphics.CopyFromScreen(0, 0, 0, 0, Size.Empty, CopyPixelOperation.MergeCopy)); 1680AssertExtensions.Throws<ArgumentException>(null, () => graphics.CopyFromScreen(Point.Empty, Point.Empty, Size.Empty)); 1681AssertExtensions.Throws<ArgumentException>(null, () => graphics.CopyFromScreen(Point.Empty, Point.Empty, Size.Empty, CopyPixelOperation.MergeCopy)); 1854AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformPoints(destSpace, CoordinateSpace.World, new PointF[] { new(1, 1) })); 1865AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformPoints(CoordinateSpace.World, srcSpace, new PointF[] { new(1, 1) })); 1873AssertExtensions.Throws<ArgumentNullException>("pts", () => graphics.TransformPoints(CoordinateSpace.Page, CoordinateSpace.Page, (Point[])null)); 1874AssertExtensions.Throws<ArgumentNullException>("pts", () => graphics.TransformPoints(CoordinateSpace.Page, CoordinateSpace.Page, (PointF[])null)); 1882AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformPoints(CoordinateSpace.Page, CoordinateSpace.Page, Array.Empty<Point>())); 1883AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformPoints(CoordinateSpace.Page, CoordinateSpace.Page, Array.Empty<PointF>())); 1960AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawArc(null, new Rectangle(0, 0, 1, 1), 0, 90)); 1961AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawArc(null, 0, 0, 1, 1, 0, 90)); 1962AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawArc(null, new RectangleF(0, 0, 1, 1), 0, 90)); 1963AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawArc(null, 0f, 0f, 1f, 1f, 0, 90)); 1974AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new Rectangle(0, 0, 1, 1), 0, 90)); 1975AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, 0, 0, 1, 1, 0, 90)); 1976AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new RectangleF(0, 0, 1, 1), 0, 90)); 1977AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, 0f, 0f, 1f, 1f, 0, 90)); 1986AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new Rectangle(0, 0, 0, 1), 0, 90)); 1987AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, 0, 0, 0, 1, 0, 90)); 1988AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new RectangleF(0, 0, 0, 1), 0, 90)); 1989AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, 0f, 0f, 0f, 1f, 0, 90)); 1998AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new Rectangle(0, 0, 1, 0), 0, 90)); 1999AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, 0, 0, 1, 0, 0, 90)); 2000AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new RectangleF(0, 0, 1, 0), 0, 90)); 2001AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, 0f, 0f, 1f, 0f, 0, 90)); 2032AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new Rectangle(0, 0, 1, 1), 0, 90)); 2033AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, 0, 0, 1, 1, 0, 90)); 2034AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new RectangleF(0, 0, 1, 1), 0, 90)); 2035AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, 0f, 0f, 1f, 1f, 0, 90)); 2043AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawRectangle(null, new Rectangle(0, 0, 1, 1))); 2044AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawRectangle(null, 0, 0, 1, 1)); 2045AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawRectangle(null, 0f, 0f, 1f, 1f)); 2056AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangle(pen, new Rectangle(0, 0, 1, 1))); 2057AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangle(pen, 0, 0, 1, 1)); 2058AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangle(pen, 0f, 0f, 1f, 1f)); 2088AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangle(pen, new Rectangle(0, 0, 1, 1))); 2089AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangle(pen, 0, 0, 1, 1)); 2090AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangle(pen, 0f, 0f, 1f, 1f)); 2098AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawRectangles(null, new Rectangle[2])); 2099AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawRectangles(null, new RectangleF[2])); 2110AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangles(pen, new Rectangle[2])); 2111AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangles(pen, new RectangleF[2])); 2120AssertExtensions.Throws<ArgumentNullException>("rects", () => graphics.DrawRectangles(pen, (Rectangle[])null)); 2121AssertExtensions.Throws<ArgumentNullException>("rects", () => graphics.DrawRectangles(pen, (RectangleF[])null)); 2130AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangles(pen, Array.Empty<Rectangle>())); 2131AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangles(pen, Array.Empty<RectangleF>())); 2160AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangles(pen, new Rectangle[2])); 2161AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangles(pen, new RectangleF[2])); 2169AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawEllipse(null, new Rectangle(0, 0, 1, 1))); 2170AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawEllipse(null, 0, 0, 1, 1)); 2171AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawEllipse(null, new RectangleF(0, 0, 1, 1))); 2172AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawEllipse(null, 0f, 0f, 1f, 1f)); 2183AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawEllipse(pen, new Rectangle(0, 0, 1, 1))); 2184AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawEllipse(pen, 0, 0, 1, 1)); 2185AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawEllipse(pen, new RectangleF(0, 0, 1, 1))); 2186AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawEllipse(pen, 0f, 0f, 1f, 1f)); 2217AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawEllipse(pen, new Rectangle(0, 0, 1, 1))); 2218AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawEllipse(pen, 0, 0, 1, 1)); 2219AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawEllipse(pen, new RectangleF(0, 0, 1, 1))); 2220AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawEllipse(pen, 0f, 0f, 1f, 1f)); 2228AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawPie(null, new Rectangle(0, 0, 1, 1), 0, 90)); 2229AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawPie(null, 0, 0, 1, 1, 0, 90)); 2230AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawPie(null, new RectangleF(0, 0, 1, 1), 0, 90)); 2231AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawPie(null, 0f, 0f, 1f, 1f, 0, 90)); 2242AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, new Rectangle(0, 0, 1, 1), 0, 90)); 2243AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, 0, 0, 1, 1, 0, 90)); 2244AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, new RectangleF(0, 0, 1, 1), 0, 90)); 2245AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, 0f, 0f, 1f, 1f, 0, 90)); 2254AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, new Rectangle(0, 0, 0, 1), 0, 90)); 2255AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, 0, 0, 0, 1, 0, 90)); 2256AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, new RectangleF(0, 0, 0, 1), 0, 90)); 2257AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, 0f, 0f, 0f, 1f, 0, 90)); 2266AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new Rectangle(0, 0, 1, 0), 0, 90)); 2267AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, 0, 0, 1, 0, 0, 90)); 2268AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new RectangleF(0, 0, 1, 0), 0, 90)); 2269AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, 0f, 0f, 1f, 0f, 0, 90)); 2300AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, new Rectangle(0, 0, 1, 1), 0, 90)); 2301AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, 0, 0, 1, 1, 0, 90)); 2302AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, new RectangleF(0, 0, 1, 1), 0, 90)); 2303AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, 0f, 0f, 1f, 1f, 0, 90)); 2311AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawPolygon(null, new Point[2])); 2312AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawPolygon(null, new PointF[2])); 2323AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPolygon(pen, new Point[2])); 2324AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPolygon(pen, new PointF[2])); 2333AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawPolygon(pen, (Point[])null)); 2334AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawPolygon(pen, (PointF[])null)); 2345AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPolygon(pen, new Point[length])); 2346AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPolygon(pen, new PointF[length])); 2375AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPolygon(pen, new Point[2])); 2376AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPolygon(pen, new PointF[2])); 2385AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawPath(null, graphicsPath)); 2397AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPath(pen, graphicsPath)); 2406AssertExtensions.Throws<ArgumentNullException>("path", () => graphics.DrawPath(pen, null)); 2418AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPath(pen, graphicsPath)); 2448AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPath(pen, graphicsPath)); 2456AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawCurve(null, new Point[2])); 2457AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawCurve(null, new PointF[2])); 2458AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawCurve(null, new Point[2], 1)); 2459AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawCurve(null, new PointF[2], 1)); 2460AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawCurve(null, new PointF[2], 0, 2)); 2461AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawCurve(null, new Point[2], 0, 2, 1)); 2462AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawCurve(null, new PointF[2], 0, 2, 1)); 2473AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new Point[2])); 2474AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new PointF[2])); 2475AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new Point[2], 1)); 2476AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new PointF[2], 1)); 2477AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new PointF[2], 0, 2)); 2478AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new Point[2], 0, 2, 1)); 2479AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new PointF[2], 0, 2, 1)); 2488AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawCurve(pen, (Point[])null)); 2489AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawCurve(pen, (PointF[])null)); 2490AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawCurve(pen, (Point[])null, 1)); 2491AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawCurve(pen, (PointF[])null, 1)); 2492AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawCurve(pen, null, 0, 2)); 2493AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawCurve(pen, (Point[])null, 0, 2, 1)); 2494AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawCurve(pen, (PointF[])null, 0, 2, 1)); 2505AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new Point[length])); 2506AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new PointF[length])); 2507AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new Point[length], 1)); 2508AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new PointF[length], 1)); 2509AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new PointF[length], 0, length)); 2510AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new Point[length], 0, length, 1)); 2511AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new PointF[length], 0, length, 1)); 2525AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new PointF[length], offset, numberOfSegments)); 2526AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new Point[length], offset, numberOfSegments, 1)); 2527AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new PointF[length], offset, numberOfSegments, 1)); 2561AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new Point[2])); 2562AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new PointF[2])); 2563AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new Point[2], 1)); 2564AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new PointF[2], 1)); 2565AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new PointF[2], 0, 2)); 2566AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new Point[2], 0, 2, 1)); 2567AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new PointF[2], 0, 2, 1)); 2575AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawClosedCurve(null, new Point[3])); 2576AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawClosedCurve(null, new Point[3], 1, FillMode.Winding)); 2577AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawClosedCurve(null, new PointF[3])); 2578AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawClosedCurve(null, new PointF[3], 1, FillMode.Winding)); 2589AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new Point[3])); 2590AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new Point[3], 1, FillMode.Winding)); 2591AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new PointF[3])); 2592AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new PointF[3], 1, FillMode.Winding)); 2601AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawClosedCurve(pen, (Point[])null)); 2602AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawClosedCurve(pen, (Point[])null, 1, FillMode.Winding)); 2603AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawClosedCurve(pen, (PointF[])null)); 2604AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawClosedCurve(pen, (PointF[])null, 1, FillMode.Winding)); 2616AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new Point[length])); 2617AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new Point[length], 1, FillMode.Winding)); 2618AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new PointF[length])); 2619AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new PointF[length], 1, FillMode.Winding)); 2650AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new Point[3])); 2651AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new Point[3], 1, FillMode.Alternate)); 2652AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new PointF[3])); 2653AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new PointF[3], 1, FillMode.Alternate)); 2661AssertExtensions.Throws<ArgumentNullException>("brush", () => graphics.FillPie(null, new Rectangle(0, 0, 1, 1), 0, 90)); 2662AssertExtensions.Throws<ArgumentNullException>("brush", () => graphics.FillPie(null, 0, 0, 1, 1, 0, 90)); 2663AssertExtensions.Throws<ArgumentNullException>("brush", () => graphics.FillPie(null, 0f, 0f, 1f, 1f, 0, 90)); 2674AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, new Rectangle(0, 0, 1, 1), 0, 90)); 2675AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, 0, 0, 1, 1, 0, 90)); 2676AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, 0f, 0f, 1f, 1f, 0, 90)); 2685AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, new Rectangle(0, 0, 0, 1), 0, 90)); 2686AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, 0, 0, 0, 1, 0, 90)); 2687AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, 0f, 0f, 0f, 1f, 0, 90)); 2696AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, new Rectangle(0, 0, 1, 0), 0, 90)); 2697AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, 0, 0, 1, 0, 0, 90)); 2698AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, 0f, 0f, 1f, 0f, 0, 90)); 2728AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, new Rectangle(0, 0, 1, 1), 0, 90)); 2729AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, 0, 0, 1, 1, 0, 90)); 2730AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, 0f, 0f, 1f, 1f, 0, 90)); 2776AssertExtensions.Throws<ArgumentException>(null, () => graphics.Clear(Color.Red)); 2794AssertExtensions.Throws<ArgumentException>(
System\Drawing\ImageTests.cs (6)
140AssertExtensions.Throws<ArgumentException>(null, () => bitmap.RemovePropertyItem(PropertyTagExifUserComment)); 145AssertExtensions.Throws<ArgumentException>(null, () => bitmap.RemovePropertyItem(PropertyTagLuminanceTable)); 160AssertExtensions.Throws<ArgumentException>(null, () => bitmap.RemovePropertyItem(PropertyTagExifUserComment)); 165AssertExtensions.Throws<ArgumentException>(null, () => bitmap.RemovePropertyItem(PropertyTagLuminanceTable)); 208AssertExtensions.Throws<ArgumentException>(null, () => bitmap.RemovePropertyItem(propid)); 218AssertExtensions.Throws<ArgumentException>(null, () => bitmap.RemovePropertyItem(propid));
System\Drawing\Imaging\ImageAttributesTests.cs (68)
220AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetColorMatrix(_greenComponentToZeroColorMatrix)); 221AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetColorMatrix(_greenComponentToZeroColorMatrix, ColorMatrixFlag.Default)); 222AssertExtensions.Throws<ArgumentException>(null, () => 230AssertExtensions.Throws<ArgumentNullException>("newColorMatrix", () => imageAttr.SetColorMatrix(null)); 231AssertExtensions.Throws<ArgumentNullException>("newColorMatrix", () => imageAttr.SetColorMatrix(null, ColorMatrixFlag.Default)); 232AssertExtensions.Throws<ArgumentNullException>("newColorMatrix", () => 249AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetColorMatrix(_greenComponentToZeroColorMatrix, ColorMatrixFlag.Default, type)); 266AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetColorMatrix(_greenComponentToZeroColorMatrix, flag)); 267AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetColorMatrix(_greenComponentToZeroColorMatrix, flag, ColorAdjustType.Default)); 326AssertExtensions.Throws<ArgumentException>(null, imageAttr.ClearColorMatrix); 327AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearColorMatrix(ColorAdjustType.Default)); 335AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearColorMatrix(type)); 438AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetColorMatrices(_greenComponentToZeroColorMatrix, _grayMatrix)); 439AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetColorMatrices(_greenComponentToZeroColorMatrix, _grayMatrix, ColorMatrixFlag.Default)); 440AssertExtensions.Throws<ArgumentException>(null, () => 448AssertExtensions.Throws<ArgumentNullException>("newColorMatrix", () => imageAttr.SetColorMatrices(null, _grayMatrix)); 449AssertExtensions.Throws<ArgumentNullException>("newColorMatrix", () => imageAttr.SetColorMatrices(null, _grayMatrix, ColorMatrixFlag.Default)); 450AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetColorMatrices(_greenComponentToZeroColorMatrix, null, ColorMatrixFlag.AltGrays)); 451AssertExtensions.Throws<ArgumentNullException>("newColorMatrix", () => 453AssertExtensions.Throws<ArgumentException>(null, () => 462AssertExtensions.Throws<ArgumentException>(null, () => 474AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetColorMatrices(_greenComponentToZeroColorMatrix, _grayMatrix, flag)); 475AssertExtensions.Throws<ArgumentException>(null, () => 523AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetThreshold(0.5f)); 531AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetThreshold(0.5f, type)); 567AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearThreshold(ColorAdjustType.Default)); 575AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearThreshold(type)); 622AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetGamma(2.2f)); 623AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetGamma(2.2f, ColorAdjustType.Default)); 631AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetGamma(2.2f, type)); 655AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearGamma(ColorAdjustType.Default)); 663AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearGamma(type)); 702AssertExtensions.Throws<ArgumentException>(null, imageAttr.SetNoOp); 703AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetNoOp(ColorAdjustType.Default)); 711AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetNoOp(type)); 770AssertExtensions.Throws<ArgumentException>(null, imageAttr.ClearNoOp); 771AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearNoOp(ColorAdjustType.Default)); 779AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearNoOp(type)); 831AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetColorKey(Color.FromArgb(50, 50, 50), Color.FromArgb(150, 150, 150))); 832AssertExtensions.Throws<ArgumentException>(null, () => 841AssertExtensions.Throws<ArgumentException>(null, () => 880AssertExtensions.Throws<ArgumentException>(null, imageAttr.ClearColorKey); 881AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearColorKey(ColorAdjustType.Default)); 889AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearColorKey(type)); 976AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetOutputChannel(ColorChannelFlag.ColorChannelY)); 977AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetOutputChannel(ColorChannelFlag.ColorChannelY, ColorAdjustType.Default)); 985AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetOutputChannel(ColorChannelFlag.ColorChannelY, type)); 1002AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetOutputChannel(flag)); 1003AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetOutputChannel(flag, ColorAdjustType.Default)); 1041AssertExtensions.Throws<ArgumentException>(null, imageAttr.ClearOutputChannel); 1042AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearOutputChannel(ColorAdjustType.Default)); 1050AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearOutputChannel(type)); 1072AssertExtensions.Throws<ArgumentException>(null, () => 1074AssertExtensions.Throws<ArgumentException>(null, () => 1116AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetOutputChannelColorProfile("path", type)); 1156AssertExtensions.Throws<ArgumentException>(null, imageAttr.ClearOutputChannelColorProfile); 1157AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearOutputChannelColorProfile(ColorAdjustType.Default)); 1165AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearOutputChannelColorProfile(type)); 1212AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetRemapTable(_yellowToRedColorMap)); 1213AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetRemapTable(_yellowToRedColorMap, ColorAdjustType.Default)); 1278AssertExtensions.Throws<ArgumentException>(null, imageAttr.ClearRemapTable); 1279AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearRemapTable(ColorAdjustType.Default)); 1287AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearRemapTable(type)); 1296AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetWrapMode(WrapMode.Clamp)); 1297AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetWrapMode(WrapMode.Clamp, Color.Black)); 1298AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetWrapMode(WrapMode.Clamp, Color.Black, true)); 1308AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.GetAdjustedPalette(bitmap.Palette, ColorAdjustType.Default)); 1324AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.GetAdjustedPalette(bitmap.Palette, type));
System\Drawing\Imaging\MetafileTests.cs (1)
926AssertExtensions.Throws<ArgumentException>(null, () =>
System\Drawing\PenTests.cs (15)
807AssertExtensions.Throws<ArgumentException>(null, () => pen.MultiplyTransform(matrix)); 808AssertExtensions.Throws<ArgumentException>(null, () => pen.MultiplyTransform(matrix, MatrixOrder.Prepend)); 851AssertExtensions.Throws<ArgumentException>(null, () => pen.MultiplyTransform(matrix)); 852AssertExtensions.Throws<ArgumentException>(null, () => pen.MultiplyTransform(matrix, MatrixOrder.Prepend)); 878AssertExtensions.Throws<ArgumentException>(null, pen.ResetTransform); 924AssertExtensions.Throws<ArgumentException>(null, () => pen.RotateTransform(10, matrixOrder)); 935AssertExtensions.Throws<ArgumentException>(null, () => pen.RotateTransform(1)); 936AssertExtensions.Throws<ArgumentException>(null, () => pen.RotateTransform(1, MatrixOrder.Prepend)); 984AssertExtensions.Throws<ArgumentException>(null, () => pen.ScaleTransform(1, 2, matrixOrder)); 995AssertExtensions.Throws<ArgumentException>(null, () => pen.ScaleTransform(1, 2)); 996AssertExtensions.Throws<ArgumentException>(null, () => pen.ScaleTransform(1, 2, MatrixOrder.Prepend)); 1026AssertExtensions.Throws<ArgumentException>(null, () => pen.SetLineCap(LineCap.AnchorMask, LineCap.ArrowAnchor, DashCap.Flat)); 1159AssertExtensions.Throws<ArgumentException>(null, () => pen.TranslateTransform(1, 2, matrixOrder)); 1170AssertExtensions.Throws<ArgumentException>(null, () => pen.TranslateTransform(1, 2)); 1171AssertExtensions.Throws<ArgumentException>(null, () => pen.TranslateTransform(1, 2, MatrixOrder.Prepend));
System\Drawing\Printing\PrinterSettingsTests.cs (1)
581AssertExtensions.Throws<ArgumentException>(null, () => printerSettings.SetHdevmode(IntPtr.Zero));
System\Drawing\RegionTests.cs (42)
406AssertExtensions.Throws<ArgumentNullException>("region", () => region.Complement((Region)null)); 412AssertExtensions.Throws<ArgumentException>(null, () => new Region().Complement(CreateDisposedRegion())); 509AssertExtensions.Throws<ArgumentNullException>("path", () => region.Complement((GraphicsPath)null)); 519AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Complement(graphicPath)); 520AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Complement(default(Rectangle))); 521AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Complement(default(RectangleF))); 522AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Complement(disposedRegion)); 813AssertExtensions.Throws<ArgumentNullException>("region", () => region.Exclude((Region)null)); 819AssertExtensions.Throws<ArgumentException>(null, () => new Region().Exclude(CreateDisposedRegion())); 892AssertExtensions.Throws<ArgumentNullException>("path", () => region.Exclude((GraphicsPath)null)); 902AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Exclude(graphicsPath)); 903AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Exclude(default(Rectangle))); 904AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Exclude(default(RectangleF))); 905AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Exclude(other)); 974AssertExtensions.Throws<ArgumentNullException>("regionHandle", () => region.ReleaseHrgn(IntPtr.Zero)); 1146AssertExtensions.Throws<ArgumentNullException>("region", () => region.Intersect((Region)null)); 1152AssertExtensions.Throws<ArgumentException>(null, () => new Region().Intersect(CreateDisposedRegion())); 1249AssertExtensions.Throws<ArgumentNullException>("path", () => region.Intersect((GraphicsPath)null)); 1259AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Intersect(graphicsPath)); 1260AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Intersect(default(Rectangle))); 1261AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Intersect(default(RectangleF))); 1262AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Intersect(other)); 1460AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedRegion().MakeEmpty()); 1483AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedRegion().MakeInfinite()); 1708AssertExtensions.Throws<ArgumentNullException>("region", () => region.Union((Region)null)); 1715AssertExtensions.Throws<ArgumentException>(null, () => region.Union(CreateDisposedRegion())); 1788AssertExtensions.Throws<ArgumentNullException>("path", () => region.Union((GraphicsPath)null)); 1798AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Union(graphicsPath)); 1799AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Union(default(Rectangle))); 1800AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Union(default(RectangleF))); 1801AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Union(disposedRegion)); 1876AssertExtensions.Throws<ArgumentNullException>("matrix", () => region.Transform(null)); 1883AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedRegion().Transform(matrix)); 1967AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Translate(1, 2)); 1968AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Translate(1f, 2f)); 2066AssertExtensions.Throws<ArgumentNullException>("region", () => region.Xor((Region)null)); 2073AssertExtensions.Throws<ArgumentException>(null, () => region.Xor(CreateDisposedRegion())); 2146AssertExtensions.Throws<ArgumentNullException>("path", () => region.Xor((GraphicsPath)null)); 2156AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Xor(graphicsPath)); 2157AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Xor(default(Rectangle))); 2158AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Xor(default(RectangleF))); 2159AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Xor(other));
System\Drawing\SolidBrushTests.cs (1)
112AssertExtensions.Throws<ArgumentException>(null, brush.Dispose);
System\Drawing\StringFormatTests.cs (1)
144AssertExtensions.Throws<ArgumentException>(null, () => format.SetDigitSubstitution(0, StringDigitSubstitute.None));
System\Drawing\SystemPensTest.cs (2)
58AssertExtensions.Throws<ArgumentException>(null, pen.Dispose); 59AssertExtensions.Throws<ArgumentException>(null, () => pen.SetLineCap(LineCap.ArrowAnchor, LineCap.Custom, DashCap.Round));
System\Drawing\Text\PrivateFontCollectionTests.cs (3)
131AssertExtensions.Throws<ArgumentException>(null, () => fontCollection.AddFontFile(typeof(Font).Assembly.Location)); 159AssertExtensions.Throws<ArgumentException>(null, () => fontCollection.AddMemoryFont(IntPtr.Zero, 100)); 180AssertExtensions.Throws<ArgumentException>(null, () => fontCollection.AddMemoryFont(fontBuffer, length));
System\Drawing\TextureBrushTests.cs (16)
373AssertExtensions.Throws<ArgumentNullException>("matrix", () => brush.MultiplyTransform(null)); 374AssertExtensions.Throws<ArgumentNullException>("matrix", () => brush.MultiplyTransform(null, MatrixOrder.Prepend)); 383AssertExtensions.Throws<ArgumentException>(null, () => brush.MultiplyTransform(matrix)); 384AssertExtensions.Throws<ArgumentException>(null, () => brush.MultiplyTransform(matrix, MatrixOrder.Prepend)); 427AssertExtensions.Throws<ArgumentException>(null, () => brush.MultiplyTransform(matrix)); 428AssertExtensions.Throws<ArgumentException>(null, () => brush.MultiplyTransform(matrix, MatrixOrder.Prepend)); 453AssertExtensions.Throws<ArgumentException>(null, brush.ResetTransform); 503AssertExtensions.Throws<ArgumentException>(null, () => brush.RotateTransform(10, matrixOrder)); 514AssertExtensions.Throws<ArgumentException>(null, () => brush.RotateTransform(1)); 515AssertExtensions.Throws<ArgumentException>(null, () => brush.RotateTransform(1, MatrixOrder.Prepend)); 567AssertExtensions.Throws<ArgumentException>(null, () => brush.ScaleTransform(1, 2, matrixOrder)); 578AssertExtensions.Throws<ArgumentException>(null, () => brush.ScaleTransform(1, 2)); 579AssertExtensions.Throws<ArgumentException>(null, () => brush.ScaleTransform(1, 2, MatrixOrder.Prepend)); 672AssertExtensions.Throws<ArgumentException>(null, () => brush.TranslateTransform(1, 2, matrixOrder)); 683AssertExtensions.Throws<ArgumentException>(null, () => brush.TranslateTransform(1, 2)); 684AssertExtensions.Throws<ArgumentException>(null, () => brush.TranslateTransform(1, 2, MatrixOrder.Prepend));
System.Windows.Forms.Primitives.TestUtilities (3)
Extensions\AssertExtensions.cs (3)
168Throws<TNetCoreExceptionType>(expectedParamName, action); 197Throws<TNetFxExceptionType>(netFxParamName, action); 201Throws<TNetCoreExceptionType>(netCoreParamName, action);