522 references to Throws
Microsoft.VisualBasic.Tests (2)
Microsoft\VisualBasic\ApplicationServices\StartupEventArgsTests.cs (1)
21
AssertExtensions.
Throws
<ArgumentNullException>("list", () => new StartupEventArgs(null));
Microsoft\VisualBasic\ApplicationServices\StartupNextInstanceEventArgsTests.cs (1)
24
AssertExtensions.
Throws
<ArgumentNullException>("list", () => new StartupNextInstanceEventArgs(null, bringToForegroundFlag: true));
System.Drawing.Common.Tests (517)
System\Drawing\BitmapTests.cs (61)
69
AssertExtensions.
Throws
<ArgumentNullException>("path", () => new Bitmap((string)null));
70
AssertExtensions.
Throws
<ArgumentNullException>("path", () => new Bitmap((string)null, false));
107
AssertExtensions.
Throws
<ArgumentException>(null, () => new Bitmap(type, resource));
154
AssertExtensions.
Throws
<ArgumentException>(null, () => new Bitmap(stream));
155
AssertExtensions.
Throws
<ArgumentException>(null, () => new Bitmap(stream, false));
156
AssertExtensions.
Throws
<ArgumentException>(null, () => new Bitmap(stream, true));
221
AssertExtensions.
Throws
<ArgumentException>(null, () => new Bitmap(width, 1));
222
AssertExtensions.
Throws
<ArgumentException>(null, () => new Bitmap(width, 1, Graphics.FromImage(new Bitmap(1, 1))));
223
AssertExtensions.
Throws
<ArgumentException>(null, () => new Bitmap(new Bitmap(1, 1), width, 1));
224
AssertExtensions.
Throws
<ArgumentException>(null, () => new Bitmap(new Bitmap(1, 1), new Size(width, 1)));
225
AssertExtensions.
Throws
<ArgumentException>(null, () => new Bitmap(width, 1, PixelFormat.Format16bppArgb1555));
226
AssertExtensions.
Throws
<ArgumentException>(null, () => new Bitmap(width, 1, 0, PixelFormat.Format16bppArgb1555, IntPtr.Zero));
236
AssertExtensions.
Throws
<ArgumentException>(null, () => new Bitmap(1, height));
237
AssertExtensions.
Throws
<ArgumentException>(null, () => new Bitmap(1, height, Graphics.FromImage(new Bitmap(1, 1))));
238
AssertExtensions.
Throws
<ArgumentException>(null, () => new Bitmap(new Bitmap(1, 1), 1, height));
239
AssertExtensions.
Throws
<ArgumentException>(null, () => new Bitmap(new Bitmap(1, 1), new Size(1, height)));
240
AssertExtensions.
Throws
<ArgumentException>(null, () => new Bitmap(1, height, PixelFormat.Format16bppArgb1555));
241
AssertExtensions.
Throws
<ArgumentException>(null, () => new Bitmap(1, height, 0, PixelFormat.Format16bppArgb1555, IntPtr.Zero));
257
AssertExtensions.
Throws
<ArgumentException>(null, () => new Bitmap(1, 1, format));
258
AssertExtensions.
Throws
<ArgumentException>(null, () => new Bitmap(1, 1, 0, format, IntPtr.Zero));
352
AssertExtensions.
Throws
<ArgumentException>(null, () => new Bitmap(image));
353
AssertExtensions.
Throws
<ArgumentException>(null, () => new Bitmap(image, 1, 1));
354
AssertExtensions.
Throws
<ArgumentException>(null, () => new Bitmap(image, new Size(1, 1)));
426
AssertExtensions.
Throws
<ArgumentException>(null, () => bitmap.Clone(new Rectangle(0, 0, width, height), bitmap.PixelFormat));
427
AssertExtensions.
Throws
<ArgumentException>(null, () => bitmap.Clone(new RectangleF(0, 0, width, height), bitmap.PixelFormat));
484
AssertExtensions.
Throws
<ArgumentException>(null, bitmap.Clone);
485
AssertExtensions.
Throws
<ArgumentException>(null, () => bitmap.Clone(new Rectangle(0, 0, 1, 1), PixelFormat.Format32bppArgb));
486
AssertExtensions.
Throws
<ArgumentException>(null, () => bitmap.Clone(new RectangleF(0, 0, 1, 1), PixelFormat.Format32bppArgb));
505
AssertExtensions.
Throws
<ArgumentException>(null, () => bitmap.GetFrameCount(FrameDimension.Page));
527
AssertExtensions.
Throws
<ArgumentException>(null, () => bitmap.SelectActiveFrame(FrameDimension.Page, 0));
559
AssertExtensions.
Throws
<ArgumentOutOfRangeException>("x", () => bitmap.GetPixel(x, 0));
568
AssertExtensions.
Throws
<ArgumentOutOfRangeException>("y", () => bitmap.GetPixel(0, y));
575
AssertExtensions.
Throws
<ArgumentException>(null, () => bitmap.GetPixel(0, 0));
584
AssertExtensions.
Throws
<ArgumentException>(null, () => bitmap.GetPixel(0, 0));
640
AssertExtensions.
Throws
<ArgumentException>(null, () => bitmap.GetHbitmap());
649
AssertExtensions.
Throws
<ArgumentException>(null, () => bitmap.GetHbitmap());
713
AssertExtensions.
Throws
<ArgumentException>(null, () => bitmap.GetHicon());
722
AssertExtensions.
Throws
<ArgumentException>(null, () => bitmap.GetHicon());
760
AssertExtensions.
Throws
<ArgumentException>(null, () => Bitmap.FromHicon(IntPtr.Zero));
768
AssertExtensions.
Throws
<ArgumentException>(null, () => Bitmap.FromHicon(icon.Handle));
774
AssertExtensions.
Throws
<ArgumentException>(null, () => Bitmap.FromResource(IntPtr.Zero, "Name"));
781
AssertExtensions.
Throws
<ArgumentException>(null, () => Bitmap.FromResource(IntPtr.Zero, "Name"));
1095
AssertExtensions.
Throws
<ArgumentNullException>("bitmapData", () => bitmap.LockBits(Rectangle.Empty, ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb, null));
1113
AssertExtensions.
Throws
<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(x, y, width, height), ImageLockMode.ReadOnly, bitmap.PixelFormat));
1116
AssertExtensions.
Throws
<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(x, y, width, height), ImageLockMode.ReadOnly, bitmap.PixelFormat, bitmapData));
1134
AssertExtensions.
Throws
<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), lockMode, format));
1137
AssertExtensions.
Throws
<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), lockMode, format, bitmapData));
1146
AssertExtensions.
Throws
<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadOnly, PixelFormat.Format16bppGrayScale));
1147
AssertExtensions.
Throws
<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadOnly, PixelFormat.Format16bppGrayScale, new BitmapData()));
1149
AssertExtensions.
Throws
<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadWrite, PixelFormat.Format16bppGrayScale));
1150
AssertExtensions.
Throws
<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadWrite, PixelFormat.Format16bppGrayScale, new BitmapData()));
1163
AssertExtensions.
Throws
<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), lockMode, bitmap.PixelFormat));
1166
AssertExtensions.
Throws
<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), lockMode, bitmap.PixelFormat, bitmapData));
1175
AssertExtensions.
Throws
<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb));
1178
AssertExtensions.
Throws
<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb, bitmapData));
1270
AssertExtensions.
Throws
<ArgumentException>(null, () => bitmap.Width);
1271
AssertExtensions.
Throws
<ArgumentException>(null, () => bitmap.Height);
1272
AssertExtensions.
Throws
<ArgumentException>(null, () => bitmap.Size);
1457
AssertExtensions.
Throws
<ArgumentException>(null, () => bitmap.Palette);
1458
AssertExtensions.
Throws
<ArgumentException>(null, () => bitmap.Palette = palette);
1459
AssertExtensions.
Throws
<ArgumentException>(null, () => bitmap.Size);
System\Drawing\BufferedGraphicsContextTests.cs (2)
151
AssertExtensions.
Throws
<ArgumentException>(null, () => context.Allocate(graphics, largeRectangle));
152
AssertExtensions.
Throws
<ArgumentException>(null, () => context.Allocate(graphics, Rectangle.Empty));
System\Drawing\Drawing2D\CustomLineCapTests.cs (7)
72
AssertExtensions.
Throws
<ArgumentException>(null, () => new CustomLineCap(fillPath, null));
161
AssertExtensions.
Throws
<ArgumentException>(null, () => customLineCap.BaseCap = baseCap);
213
AssertExtensions.
Throws
<ArgumentException>(null, () => customLineCap.StrokeJoin);
214
AssertExtensions.
Throws
<ArgumentException>(null, () => customLineCap.BaseCap);
215
AssertExtensions.
Throws
<ArgumentException>(null, () => customLineCap.BaseInset);
216
AssertExtensions.
Throws
<ArgumentException>(null, () => customLineCap.WidthScale);
217
AssertExtensions.
Throws
<ArgumentException>(null, customLineCap.Clone);
System\Drawing\Drawing2D\GraphicsPathIteratorTests.cs (5)
264
AssertExtensions.
Throws
<ArgumentException>(null, () => gpi.Enumerate(ref points, ref types));
277
AssertExtensions.
Throws
<ArgumentException>(null, () => gpi.Enumerate(ref points, ref types));
302
AssertExtensions.
Throws
<ArgumentException>(null, () => gpi.CopyData(ref points, ref types, 0, points.Length));
324
AssertExtensions.
Throws
<ArgumentException>(null, () => gpi.CopyData(ref resultPoints, ref resultTypes, startIndex, endIndex));
343
AssertExtensions.
Throws
<ArgumentException>(null, () => gpi.CopyData(ref resultPoints, ref resultTypes, startIndex, endIndex));
System\Drawing\Drawing2D\GraphicsPathTests.cs (7)
82
AssertExtensions.
Throws
<ArgumentNullException>("pts", () => new GraphicsPath((Point[])null, new byte[1]));
95
AssertExtensions.
Throws
<ArgumentException>(null, () => new GraphicsPath(new Point[pointsLength], new byte[typesLength]));
96
AssertExtensions.
Throws
<ArgumentException>(null, () => new GraphicsPath(new PointF[pointsLength], new byte[typesLength]));
1739
AssertExtensions.
Throws
<ArgumentNullException>("pen", () => gp.IsOutlineVisible(1, 1, null));
1740
AssertExtensions.
Throws
<ArgumentNullException>("pen", () => gp.IsOutlineVisible(1.0f, 1.0f, null));
1741
AssertExtensions.
Throws
<ArgumentNullException>("pen", () => gp.IsOutlineVisible(default, null));
1742
AssertExtensions.
Throws
<ArgumentNullException>("pen", () => gp.IsOutlineVisible(default(PointF), null));
System\Drawing\Drawing2D\HatchBrushTests.cs (4)
85
AssertExtensions.
Throws
<ArgumentException>(null, brush.Clone);
94
AssertExtensions.
Throws
<ArgumentException>(null, () => brush.HatchStyle);
103
AssertExtensions.
Throws
<ArgumentException>(null, () => brush.ForegroundColor);
112
AssertExtensions.
Throws
<ArgumentException>(null, () => brush.BackgroundColor);
System\Drawing\Drawing2D\LinearGradientBrushTests.cs (33)
204
AssertExtensions.
Throws
<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 0, 4), Color.Empty, Color.Empty, 0f));
205
AssertExtensions.
Throws
<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 0, 4), Color.Empty, Color.Empty, 0f));
206
AssertExtensions.
Throws
<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 0, 4), Color.Empty, Color.Empty, LinearGradientMode.BackwardDiagonal));
207
AssertExtensions.
Throws
<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 0, 4), Color.Empty, Color.Empty, LinearGradientMode.BackwardDiagonal));
208
AssertExtensions.
Throws
<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 0, 4), Color.Empty, Color.Empty, 0, true));
209
AssertExtensions.
Throws
<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 0, 4), Color.Empty, Color.Empty, 0, true));
215
AssertExtensions.
Throws
<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 3, 0), Color.Empty, Color.Empty, 0f));
216
AssertExtensions.
Throws
<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 3, 0), Color.Empty, Color.Empty, 0f));
217
AssertExtensions.
Throws
<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 3, 0), Color.Empty, Color.Empty, LinearGradientMode.BackwardDiagonal));
218
AssertExtensions.
Throws
<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 3, 0), Color.Empty, Color.Empty, LinearGradientMode.BackwardDiagonal));
219
AssertExtensions.
Throws
<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 3, 0), Color.Empty, Color.Empty, 0, true));
220
AssertExtensions.
Throws
<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 3, 0), Color.Empty, Color.Empty, 0, true));
252
AssertExtensions.
Throws
<ArgumentException>(null, brush.Clone);
305
AssertExtensions.
Throws
<ArgumentException>(null, () => brush.Blend = blend);
340
AssertExtensions.
Throws
<ArgumentException>(null, () => brush.Blend = new Blend { Factors = [], Positions = [] });
349
AssertExtensions.
Throws
<ArgumentException>(null, () => brush.Blend);
350
AssertExtensions.
Throws
<ArgumentException>(null, () => brush.Blend = new Blend());
368
AssertExtensions.
Throws
<ArgumentException>(null, () => brush.GammaCorrection);
369
AssertExtensions.
Throws
<ArgumentException>(null, () => brush.GammaCorrection = true);
412
AssertExtensions.
Throws
<ArgumentNullException>("value", () => brush.InterpolationColors = null);
428
AssertExtensions.
Throws
<ArgumentException>(
447
AssertExtensions.
Throws
<ArgumentException>("value", () => brush.InterpolationColors = new ColorBlend
460
AssertExtensions.
Throws
<ArgumentException>(null, () => brush.InterpolationColors = new ColorBlend
480
AssertExtensions.
Throws
<ArgumentException>(null, () => brush.InterpolationColors);
481
AssertExtensions.
Throws
<ArgumentException>(null, () => brush.InterpolationColors = new ColorBlend
561
AssertExtensions.
Throws
<ArgumentException>(null, () => brush.LinearColors);
562
AssertExtensions.
Throws
<ArgumentException>(null, () => brush.LinearColors = [Color.Red, Color.Wheat]);
571
AssertExtensions.
Throws
<ArgumentException>(null, () => brush.Rectangle);
595
AssertExtensions.
Throws
<ArgumentException>(null, () => brush.Transform);
596
AssertExtensions.
Throws
<ArgumentException>(null, () => brush.Transform = new Matrix());
623
AssertExtensions.
Throws
<ArgumentException>(null, () => brush.WrapMode = WrapMode.Clamp);
632
AssertExtensions.
Throws
<ArgumentException>(null, () => brush.WrapMode);
633
AssertExtensions.
Throws
<ArgumentException>(null, () => brush.WrapMode = WrapMode.TileFlipX);
System\Drawing\Drawing2D\MatrixTests.cs (11)
130
AssertExtensions.
Throws
<ArgumentNullException>("plgpts", () => new Matrix(default(RectangleF), null));
131
AssertExtensions.
Throws
<ArgumentNullException>("plgpts", () => new Matrix(default, null));
140
AssertExtensions.
Throws
<ArgumentException>(null, () => new Matrix(default, new PointF[length]));
141
AssertExtensions.
Throws
<ArgumentException>(null, () => new Matrix(default, new Point[length]));
170
AssertExtensions.
Throws
<ArgumentException>(null, () => CreateDisposedMatrix().Clone());
216
AssertExtensions.
Throws
<ArgumentException>(null, () => CreateDisposedMatrix().Equals(new Matrix()));
222
AssertExtensions.
Throws
<ArgumentException>(null, () => new Matrix().Equals(CreateDisposedMatrix()));
228
AssertExtensions.
Throws
<ArgumentException>(null, () => CreateDisposedMatrix().Elements);
278
AssertExtensions.
Throws
<ArgumentException>(null, () => CreateDisposedMatrix().IsIdentity);
284
AssertExtensions.
Throws
<ArgumentException>(null, () => CreateDisposedMatrix().IsInvertible);
805
AssertExtensions.
Throws
<ArgumentException>(null, () => matrix.VectorTransformPoints([]));
System\Drawing\Drawing2D\PathGradientBrushTests.cs (17)
69
AssertExtensions.
Throws
<ArgumentNullException>("points", () => new PathGradientBrush((Point[])null));
70
AssertExtensions.
Throws
<ArgumentNullException>("points", () => new PathGradientBrush((PointF[])null));
106
AssertExtensions.
Throws
<ArgumentNullException>("path", () => new PathGradientBrush((GraphicsPath)null));
134
AssertExtensions.
Throws
<ArgumentException>(null, brush.Clone);
154
AssertExtensions.
Throws
<ArgumentException>(null, () => brush.CenterColor = Color.Blue);
192
AssertExtensions.
Throws
<ArgumentException>(null, () => brush.SurroundColors = colors);
206
AssertExtensions.
Throws
<ArgumentException>(null, () => brush.SurroundColors = colors);
240
AssertExtensions.
Throws
<ArgumentException>(null, () => brush.CenterPoint);
292
AssertExtensions.
Throws
<ArgumentException>(null, () => brush.Blend);
309
AssertExtensions.
Throws
<ArgumentException>(null, () => brush.Blend = blend);
568
AssertExtensions.
Throws
<ArgumentException>(null, () => brush.InterpolationColors);
601
AssertExtensions.
Throws
<ArgumentException>(null, () => brush.InterpolationColors = new ColorBlend());
608
AssertExtensions.
Throws
<ArgumentException>(null, () =>
654
AssertExtensions.
Throws
<ArgumentException>(null, () => brush.Transform);
669
AssertExtensions.
Throws
<ArgumentException>(null, () => brush.Transform = nonInvertible);
912
AssertExtensions.
Throws
<ArgumentException>(null, () => brush.FocusScales);
930
AssertExtensions.
Throws
<ArgumentException>(null, () => brush.WrapMode);
System\Drawing\FontFamilyTests.cs (12)
49
AssertExtensions.
Throws
<ArgumentException>(null, () => new FontFamily(name));
50
AssertExtensions.
Throws
<ArgumentException>(null, () => new FontFamily(name, null));
56
AssertExtensions.
Throws
<ArgumentNullException>("name", () => new FontFamily(null!));
57
AssertExtensions.
Throws
<ArgumentNullException>("name", () => new FontFamily(null!, null));
64
AssertExtensions.
Throws
<ArgumentException>(null, () => new FontFamily("Times New Roman", fontCollection));
150
AssertExtensions.
Throws
<ArgumentNullException>("graphics", () => FontFamily.GetFamilies(null));
196
AssertExtensions.
Throws
<ArgumentException>(null, () => family.IsStyleAvailable(FontStyle.Italic));
208
AssertExtensions.
Throws
<ArgumentException>(null, () => family.GetEmHeight(FontStyle.Italic));
237
AssertExtensions.
Throws
<ArgumentException>(null, () => family.GetName(0));
249
AssertExtensions.
Throws
<ArgumentException>(null, () => family.GetCellAscent(FontStyle.Italic));
261
AssertExtensions.
Throws
<ArgumentException>(null, () => family.GetCellDescent(FontStyle.Italic));
273
AssertExtensions.
Throws
<ArgumentException>(null, () => family.GetLineSpacing(FontStyle.Italic));
System\Drawing\FontTests.cs (48)
326
AssertExtensions.
Throws
<ArgumentNullException>("family", () => new Font((FontFamily)null, 10));
327
AssertExtensions.
Throws
<ArgumentNullException>("family", () => new Font((FontFamily)null, 10, FontStyle.Italic));
328
AssertExtensions.
Throws
<ArgumentNullException>("family", () => new Font((FontFamily)null, 10, GraphicsUnit.Display));
329
AssertExtensions.
Throws
<ArgumentNullException>("family", () => new Font((FontFamily)null, 10, FontStyle.Italic, GraphicsUnit.Display));
330
AssertExtensions.
Throws
<ArgumentNullException>("family", () => new Font((FontFamily)null, 10, FontStyle.Italic, GraphicsUnit.Display, 10));
331
AssertExtensions.
Throws
<ArgumentNullException>("family", () => new Font((FontFamily)null, 10, FontStyle.Italic, GraphicsUnit.Display, 10, gdiVerticalFont: true));
343
AssertExtensions.
Throws
<ArgumentException>(null, () => new Font(family, 10));
344
AssertExtensions.
Throws
<ArgumentException>(null, () => new Font(family, 10, FontStyle.Italic));
345
AssertExtensions.
Throws
<ArgumentException>(null, () => new Font(family, 10, GraphicsUnit.Display));
346
AssertExtensions.
Throws
<ArgumentException>(null, () => new Font(family, 10, FontStyle.Italic, GraphicsUnit.Display));
347
AssertExtensions.
Throws
<ArgumentException>(null, () => new Font(family, 10, FontStyle.Italic, GraphicsUnit.Display, 10));
348
AssertExtensions.
Throws
<ArgumentException>(null, () => new Font(family, 10, FontStyle.Italic, GraphicsUnit.Display, 10, gdiVerticalFont: true));
360
AssertExtensions.
Throws
<ArgumentException>("emSize", () => new Font(family, emSize));
361
AssertExtensions.
Throws
<ArgumentException>("emSize", () => new Font(family.Name, emSize));
362
AssertExtensions.
Throws
<ArgumentException>("emSize", () => new Font(family, emSize, FontStyle.Italic));
363
AssertExtensions.
Throws
<ArgumentException>("emSize", () => new Font(family.Name, emSize, FontStyle.Italic));
364
AssertExtensions.
Throws
<ArgumentException>("emSize", () => new Font(family, emSize, GraphicsUnit.Document));
365
AssertExtensions.
Throws
<ArgumentException>("emSize", () => new Font(family.Name, emSize, GraphicsUnit.Document));
366
AssertExtensions.
Throws
<ArgumentException>("emSize", () => new Font(family, emSize, FontStyle.Italic, GraphicsUnit.Document));
367
AssertExtensions.
Throws
<ArgumentException>("emSize", () => new Font(family.Name, emSize, FontStyle.Italic, GraphicsUnit.Document));
368
AssertExtensions.
Throws
<ArgumentException>("emSize", () => new Font(family, emSize, FontStyle.Italic, GraphicsUnit.Document, 10));
369
AssertExtensions.
Throws
<ArgumentException>("emSize", () => new Font(family.Name, emSize, FontStyle.Italic, GraphicsUnit.Document, 10));
370
AssertExtensions.
Throws
<ArgumentException>("emSize", () => new Font(family, emSize, FontStyle.Italic, GraphicsUnit.Document, 10, gdiVerticalFont: true));
371
AssertExtensions.
Throws
<ArgumentException>("emSize", () => new Font(family.Name, emSize, FontStyle.Italic, GraphicsUnit.Document, 10, gdiVerticalFont: true));
381
AssertExtensions.
Throws
<ArgumentException>(null, () => new Font(family, 10, unit));
382
AssertExtensions.
Throws
<ArgumentException>(null, () => new Font(family.Name, 10, unit));
383
AssertExtensions.
Throws
<ArgumentException>(null, () => new Font(family, 10, FontStyle.Italic, unit));
384
AssertExtensions.
Throws
<ArgumentException>(null, () => new Font(family.Name, 10, FontStyle.Italic, unit));
385
AssertExtensions.
Throws
<ArgumentException>(null, () => new Font(family, 10, FontStyle.Italic, unit, 10));
386
AssertExtensions.
Throws
<ArgumentException>(null, () => new Font(family.Name, 10, FontStyle.Italic, unit, 10));
387
AssertExtensions.
Throws
<ArgumentException>(null, () => new Font(family, 10, FontStyle.Italic, unit, 10, gdiVerticalFont: true));
388
AssertExtensions.
Throws
<ArgumentException>(null, () => new Font(family.Name, 10, FontStyle.Italic, unit, 10, gdiVerticalFont: true));
414
AssertExtensions.
Throws
<ArgumentException>(null, font.Clone);
461
AssertExtensions.
Throws
<ArgumentException>(null, () => Font.FromHdc(IntPtr.Zero));
472
AssertExtensions.
Throws
<ArgumentException>(null, () => Font.FromHdc(hdc));
483
AssertExtensions.
Throws
<ArgumentException>(null, () => Font.FromHfont(IntPtr.Zero));
526
AssertExtensions.
Throws
<ArgumentNullException>("graphics", () => font.GetHeight(null));
538
AssertExtensions.
Throws
<ArgumentException>("graphics", () => font.GetHeight(graphics));
550
AssertExtensions.
Throws
<ArgumentException>(null, () => font.GetHeight());
551
AssertExtensions.
Throws
<ArgumentException>(null, () => font.GetHeight(10));
552
AssertExtensions.
Throws
<ArgumentException>(null, () => font.GetHeight(graphics));
598
AssertExtensions.
Throws
<ArgumentException>(null, () => Font.FromLogFont(null));
599
AssertExtensions.
Throws
<ArgumentException>(null, () => Font.FromLogFont(null, hdc));
603
AssertExtensions.
Throws
<ArgumentNullException>("lf", () => Font.FromLogFont(null));
604
AssertExtensions.
Throws
<ArgumentNullException>("lf", () => Font.FromLogFont(null, hdc));
622
AssertExtensions.
Throws
<ArgumentException>(null, () => Font.FromLogFont(logFont));
623
AssertExtensions.
Throws
<ArgumentException>(null, () => Font.FromLogFont(logFont, hdc));
845
AssertExtensions.
Throws
<ArgumentException>(null, () => font.ToHfont());
System\Drawing\GraphicsTests.Core.cs (3)
19
AssertExtensions.
Throws
<ArgumentException>(null, () => graphics.TransformElements = matrix);
46
AssertExtensions.
Throws
<ArgumentException>(null, () => graphics.TransformElements);
47
AssertExtensions.
Throws
<ArgumentException>(null, () => graphics.TransformElements = Matrix3x2.Identity);
System\Drawing\GraphicsTests.cs (48)
77
AssertExtensions.
Throws
<ArgumentException>(null, () => graphics.GetHdc());
110
AssertExtensions.
Throws
<ArgumentNullException>("hdc", () => Graphics.FromHdc(IntPtr.Zero));
258
AssertExtensions.
Throws
<ArgumentNullException>("image", () => Graphics.FromImage(null));
279
AssertExtensions.
Throws
<ArgumentException>(null, () => Graphics.FromImage(image));
339
AssertExtensions.
Throws
<InvalidEnumArgumentException>("value", () => graphics.CompositingMode = compositingMode);
366
AssertExtensions.
Throws
<ArgumentException>(null, () => graphics.CompositingMode);
367
AssertExtensions.
Throws
<ArgumentException>(null, () => graphics.CompositingMode = CompositingMode.SourceCopy);
423
AssertExtensions.
Throws
<InvalidEnumArgumentException>("value", () => graphics.CompositingQuality = compositingQuality);
450
AssertExtensions.
Throws
<ArgumentException>(null, () => graphics.CompositingQuality);
451
AssertExtensions.
Throws
<ArgumentException>(null, () => graphics.CompositingQuality = CompositingQuality.AssumeLinear);
503
AssertExtensions.
Throws
<ArgumentException>(null, () => graphics.DpiX);
529
AssertExtensions.
Throws
<ArgumentException>(null, () => graphics.DpiX);
603
AssertExtensions.
Throws
<InvalidEnumArgumentException>("value", () => graphics.InterpolationMode = interpolationMode);
611
AssertExtensions.
Throws
<ArgumentException>(null, () => graphics.InterpolationMode = InterpolationMode.Invalid);
638
AssertExtensions.
Throws
<ArgumentException>(null, () => graphics.InterpolationMode);
639
AssertExtensions.
Throws
<ArgumentException>(null, () => graphics.InterpolationMode = InterpolationMode.HighQualityBilinear);
664
AssertExtensions.
Throws
<ArgumentException>(null, () => graphics.PageScale = pageScale);
691
AssertExtensions.
Throws
<ArgumentException>(null, () => graphics.PageScale);
692
AssertExtensions.
Throws
<ArgumentException>(null, () => graphics.PageScale = 10);
717
AssertExtensions.
Throws
<InvalidEnumArgumentException>("value", () => graphics.PageUnit = pageUnit);
725
AssertExtensions.
Throws
<ArgumentException>(null, () => graphics.PageUnit = GraphicsUnit.World);
752
AssertExtensions.
Throws
<ArgumentException>(null, () => graphics.PageUnit);
753
AssertExtensions.
Throws
<ArgumentException>(null, () => graphics.PageUnit = GraphicsUnit.Document);
777
AssertExtensions.
Throws
<InvalidEnumArgumentException>("value", () => graphics.PixelOffsetMode = pixelOffsetMode);
785
AssertExtensions.
Throws
<ArgumentException>(null, () => graphics.PixelOffsetMode = PixelOffsetMode.Invalid);
812
AssertExtensions.
Throws
<ArgumentException>(null, () => graphics.PixelOffsetMode);
813
AssertExtensions.
Throws
<ArgumentException>(null, () => graphics.PixelOffsetMode = PixelOffsetMode.Default);
894
AssertExtensions.
Throws
<ArgumentException>(null, () => graphics.RenderingOrigin);
895
AssertExtensions.
Throws
<ArgumentException>(null, () => graphics.RenderingOrigin = Point.Empty);
919
AssertExtensions.
Throws
<InvalidEnumArgumentException>("value", () => graphics.SmoothingMode = smoothingMode);
927
AssertExtensions.
Throws
<ArgumentException>(null, () => graphics.SmoothingMode = SmoothingMode.Invalid);
954
AssertExtensions.
Throws
<ArgumentException>(null, () => graphics.SmoothingMode);
955
AssertExtensions.
Throws
<ArgumentException>(null, () => graphics.SmoothingMode = SmoothingMode.AntiAlias);
977
AssertExtensions.
Throws
<ArgumentException>(null, () => graphics.TextContrast = textContrast);
1004
AssertExtensions.
Throws
<ArgumentException>(null, () => graphics.TextContrast);
1005
AssertExtensions.
Throws
<ArgumentException>(null, () => graphics.TextContrast = 5);
1030
AssertExtensions.
Throws
<InvalidEnumArgumentException>("value", () => graphics.TextRenderingHint = textRenderingHint);
1057
AssertExtensions.
Throws
<ArgumentException>(null, () => graphics.TextRenderingHint);
1058
AssertExtensions.
Throws
<ArgumentException>(null, () => graphics.TextRenderingHint = TextRenderingHint.SingleBitPerPixelGridFit);
1103
AssertExtensions.
Throws
<ArgumentException>(null, () => graphics.Transform = matrix);
1112
AssertExtensions.
Throws
<ArgumentException>(null, () => graphics.Transform = matrix);
1141
AssertExtensions.
Throws
<ArgumentException>(null, () => graphics.Transform);
1142
AssertExtensions.
Throws
<ArgumentException>(null, () => graphics.Transform = matrix);
1853
AssertExtensions.
Throws
<ArgumentException>(null, () => graphics.TransformPoints(destSpace, CoordinateSpace.World, [new(1, 1)]));
1864
AssertExtensions.
Throws
<ArgumentException>(null, () => graphics.TransformPoints(CoordinateSpace.World, srcSpace, [new(1, 1)]));
1910
AssertExtensions.
Throws
<ArgumentException>(null, () => graphics.TransformPoints(CoordinateSpace.Page, CoordinateSpace.Page, [Point.Empty]));
1911
AssertExtensions.
Throws
<ArgumentException>(null, () => graphics.TransformPoints(CoordinateSpace.Page, CoordinateSpace.Page, [PointF.Empty]));
1952
AssertExtensions.
Throws
<ArgumentException>(null, () => graphics.GetNearestColor(Color.Red));
System\Drawing\IconTests.cs (5)
89
AssertExtensions.
Throws
<ArgumentNullException>("path", () => new Icon((string)null));
90
AssertExtensions.
Throws
<ArgumentNullException>("path", () => new Icon((string)null, new Size(32, 32)));
91
AssertExtensions.
Throws
<ArgumentNullException>("path", () => new Icon((string)null, 32, 32));
269
AssertExtensions.
Throws
<ArgumentException>(null, () => new Icon(type, resource));
592
AssertExtensions.
Throws
<ArgumentOutOfRangeException>(null, icon.ToBitmap);
System\Drawing\ImageTests.cs (13)
112
AssertExtensions.
Throws
<ArgumentException>(null, () => bitmap.GetPropertyItem(propid));
122
AssertExtensions.
Throws
<ArgumentException>(null, () => bitmap.GetPropertyItem(propid));
139
AssertExtensions.
Throws
<ArgumentException>(null, () => bitmap.GetPropertyItem(PropertyTagExifUserComment));
144
AssertExtensions.
Throws
<ArgumentException>(null, () => bitmap.GetPropertyItem(PropertyTagLuminanceTable));
149
AssertExtensions.
Throws
<ArgumentException>(null, () => bitmap.GetPropertyItem(PropertyTagChrominanceTable));
159
AssertExtensions.
Throws
<ArgumentException>(null, () => bitmap.GetPropertyItem(PropertyTagExifUserComment));
164
AssertExtensions.
Throws
<ArgumentException>(null, () => bitmap.GetPropertyItem(PropertyTagLuminanceTable));
169
AssertExtensions.
Throws
<ArgumentException>(null, () => bitmap.GetPropertyItem(PropertyTagChrominanceTable));
503
AssertExtensions.
Throws
<ArgumentNullException>("path", () => Image.FromFile(null));
504
AssertExtensions.
Throws
<ArgumentNullException>("path", () => Image.FromFile(null, useEmbeddedColorManagement: true));
551
AssertExtensions.
Throws
<ArgumentException>(null, () => Image.FromStream(stream));
554
AssertExtensions.
Throws
<ArgumentException>(null, () => Image.FromStream(stream, useEmbeddedColorManagement: true));
555
AssertExtensions.
Throws
<ArgumentException>(null, () => Image.FromStream(stream, useEmbeddedColorManagement: true, validateImageData: true));
System\Drawing\Imaging\ImageAttributesTests.cs (1)
87
AssertExtensions.
Throws
<ArgumentException>(null, imageAttr.Clone);
System\Drawing\Imaging\MetafileTests.cs (69)
40
AssertExtensions.
Throws
<ArgumentException>(null, () => new Metafile(IntPtr.Zero, false));
66
AssertExtensions.
Throws
<ArgumentNullException>("path", () => new Metafile((string)null));
143
AssertExtensions.
Throws
<ArgumentException>(null, () => new Metafile(g.GetHdc(), emfType));
149
AssertExtensions.
Throws
<ArgumentException>(null, () => new Metafile((IntPtr)null, EmfType.EmfOnly));
155
AssertExtensions.
Throws
<ArgumentException>(null, () => new Metafile(IntPtr.Zero, EmfType.EmfOnly));
178
AssertExtensions.
Throws
<ArgumentException>(null, () => new Metafile(IntPtr.Zero, EmfType.EmfOnly, description));
274
AssertExtensions.
Throws
<ArgumentException>(null, () => new Metafile(IntPtr.Zero, _rectangleF));
275
AssertExtensions.
Throws
<ArgumentException>(null, () => new Metafile(IntPtr.Zero, _rectangleF, MetafileFrameUnit.Pixel));
276
AssertExtensions.
Throws
<ArgumentException>(null, () =>
278
AssertExtensions.
Throws
<ArgumentException>(null, () =>
281
AssertExtensions.
Throws
<ArgumentException>(null, () => new Metafile(IntPtr.Zero, _rectangle));
282
AssertExtensions.
Throws
<ArgumentException>(null, () => new Metafile(IntPtr.Zero, _rectangle, MetafileFrameUnit.Pixel));
283
AssertExtensions.
Throws
<ArgumentException>(null, () =>
285
AssertExtensions.
Throws
<ArgumentException>(null, () =>
304
AssertExtensions.
Throws
<ArgumentException>(null, () => new Metafile(referenceHdc, _rectangleF, farameUnit));
305
AssertExtensions.
Throws
<ArgumentException>(null, () => new Metafile(referenceHdc, _rectangleF, farameUnit, EmfType.EmfOnly));
306
AssertExtensions.
Throws
<ArgumentException>(null, () =>
309
AssertExtensions.
Throws
<ArgumentException>(null, () => new Metafile(referenceHdc, _rectangle, farameUnit));
310
AssertExtensions.
Throws
<ArgumentException>(null, () => new Metafile(referenceHdc, _rectangle, farameUnit, EmfType.EmfOnly));
311
AssertExtensions.
Throws
<ArgumentException>(null, () =>
322
AssertExtensions.
Throws
<ArgumentException>(null, () =>
324
AssertExtensions.
Throws
<ArgumentException>(null, () =>
327
AssertExtensions.
Throws
<ArgumentException>(null, () =>
329
AssertExtensions.
Throws
<ArgumentException>(null, () =>
386
AssertExtensions.
Throws
<ArgumentException>(null, () => new Metafile(fileName, IntPtr.Zero));
387
AssertExtensions.
Throws
<ArgumentException>(null, () => new Metafile(fileName, IntPtr.Zero, EmfType.EmfOnly));
388
AssertExtensions.
Throws
<ArgumentException>(null, () => new Metafile(fileName, IntPtr.Zero, EmfType.EmfOnly, "description"));
400
AssertExtensions.
Throws
<ArgumentException>(null, () => new Metafile(fileName, referenceHdc, emfType));
401
AssertExtensions.
Throws
<ArgumentException>(null, () => new Metafile(fileName, referenceHdc, emfType, "description"));
411
AssertExtensions.
Throws
<ArgumentNullException>("path", () => new Metafile((string)null, referenceHdc));
412
AssertExtensions.
Throws
<ArgumentNullException>("path", () => new Metafile((string)null, referenceHdc, EmfType.EmfOnly));
413
AssertExtensions.
Throws
<ArgumentNullException>("path", () => new Metafile((string)null, referenceHdc, EmfType.EmfOnly, "description"));
614
AssertExtensions.
Throws
<ArgumentException>(null, () => new Metafile(fileName, IntPtr.Zero, _rectangleF));
615
AssertExtensions.
Throws
<ArgumentException>(null, () => new Metafile(fileName, IntPtr.Zero, _rectangleF, MetafileFrameUnit.GdiCompatible));
616
AssertExtensions.
Throws
<ArgumentException>(null, () =>
618
AssertExtensions.
Throws
<ArgumentException>(null, () =>
621
AssertExtensions.
Throws
<ArgumentException>(null, () => new Metafile(fileName, IntPtr.Zero, _rectangle));
622
AssertExtensions.
Throws
<ArgumentException>(null, () => new Metafile(fileName, IntPtr.Zero, _rectangle, MetafileFrameUnit.GdiCompatible));
623
AssertExtensions.
Throws
<ArgumentException>(null, () =>
625
AssertExtensions.
Throws
<ArgumentException>(null, () =>
638
AssertExtensions.
Throws
<ArgumentException>(null, () => new Metafile(fileName, referenceHdc, _rectangleF, frameUnit));
639
AssertExtensions.
Throws
<ArgumentException>(null, () =>
641
AssertExtensions.
Throws
<ArgumentException>(null, () =>
644
AssertExtensions.
Throws
<ArgumentException>(null, () => new Metafile(fileName, referenceHdc, _rectangle, frameUnit));
645
AssertExtensions.
Throws
<ArgumentException>(null, () =>
647
AssertExtensions.
Throws
<ArgumentException>(null, () =>
660
AssertExtensions.
Throws
<ArgumentException>(null, () =>
662
AssertExtensions.
Throws
<ArgumentException>(null, () =>
665
AssertExtensions.
Throws
<ArgumentException>(null, () =>
667
AssertExtensions.
Throws
<ArgumentException>(null, () =>
678
AssertExtensions.
Throws
<ArgumentNullException>("path", () => new Metafile((string)null, referenceHdc, _rectangleF));
679
AssertExtensions.
Throws
<ArgumentNullException>("path", () =>
681
AssertExtensions.
Throws
<ArgumentNullException>("path", () =>
683
AssertExtensions.
Throws
<ArgumentNullException>("path", () =>
784
AssertExtensions.
Throws
<ArgumentException>(null, () => new Metafile(stream, IntPtr.Zero, _rectangle));
785
AssertExtensions.
Throws
<ArgumentException>(null, () => new Metafile(stream, IntPtr.Zero, _rectangle, MetafileFrameUnit.GdiCompatible));
786
AssertExtensions.
Throws
<ArgumentException>(null, () =>
788
AssertExtensions.
Throws
<ArgumentException>(null, () =>
800
AssertExtensions.
Throws
<ArgumentException>(null, () => new Metafile(stream, referenceHdc, _rectangle, frameUnit));
801
AssertExtensions.
Throws
<ArgumentException>(null, () =>
803
AssertExtensions.
Throws
<ArgumentException>(null, () =>
815
AssertExtensions.
Throws
<ArgumentException>(null, () =>
817
AssertExtensions.
Throws
<ArgumentException>(null, () =>
845
AssertExtensions.
Throws
<ArgumentException>(null, () => Metafile.GetMetafileHeader(IntPtr.Zero));
847
AssertExtensions.
Throws
<ArgumentException>(null, () => Metafile.GetMetafileHeader(metafile.GetHenhmetafile()));
861
AssertExtensions.
Throws
<ArgumentNullException>("path", () => Metafile.GetMetafileHeader((string)null));
882
AssertExtensions.
Throws
<ArgumentException>(null, () => Metafile.GetMetafileHeader(stream));
901
AssertExtensions.
Throws
<ArgumentException>(null, metafile.GetMetafileHeader);
917
AssertExtensions.
Throws
<ArgumentException>(null, () => metafile.GetHenhmetafile());
System\Drawing\PensTests.cs (1)
164
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.Color = Color.AliceBlue);
System\Drawing\PenTests.cs (56)
77
AssertExtensions.
Throws
<ArgumentNullException>("brush", () => new Pen(null));
78
AssertExtensions.
Throws
<ArgumentNullException>("brush", () => new Pen(null, 0));
87
AssertExtensions.
Throws
<ArgumentException>(null, () => new Pen(brush));
88
AssertExtensions.
Throws
<ArgumentException>(null, () => new Pen(brush, 10));
145
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.Alignment);
146
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.Alignment = PenAlignment.Center);
163
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.Brush = new SubBrush());
176
AssertExtensions.
Throws
<ArgumentNullException>("value", () => pen.Brush = null);
185
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.Brush = brush);
195
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.Brush);
196
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.Brush = brush);
231
AssertExtensions.
Throws
<ArgumentException>(null, pen.Clone);
260
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.Color);
290
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.Color = Color.Black);
300
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.Color);
301
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.Color = Color.Red);
333
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.CompoundArray = []);
349
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.CompoundArray = compoundArray);
359
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.CompoundArray);
360
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.CompoundArray = [1]);
385
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.CustomEndCap = null);
398
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.CustomEndCap = lineCap);
411
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.CustomEndCap);
412
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.CustomEndCap = lineCap);
437
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.CustomStartCap = null);
450
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.CustomStartCap = lineCap);
463
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.CustomStartCap);
464
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.CustomStartCap = lineCap);
497
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.DashCap);
498
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.DashCap = DashCap.Triangle);
523
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.DashOffset);
524
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.DashOffset = 10);
550
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.DashPattern = null);
558
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.DashPattern = []);
570
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.DashPattern = pattern);
580
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.DashPattern);
581
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.DashPattern = [1]);
637
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.DashStyle);
638
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.DashStyle = DashStyle.Dash);
691
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.EndCap);
692
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.EndCap = LineCap.ArrowAnchor);
725
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.LineJoin);
726
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.LineJoin = LineJoin.Miter);
751
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.MiterLimit);
752
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.MiterLimit = 10);
1055
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.StartCap);
1056
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.StartCap = LineCap.ArrowAnchor);
1079
AssertExtensions.
Throws
<ArgumentNullException>("value", () => pen.Transform = null);
1088
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.Transform = matrix);
1099
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.Transform = matrix);
1110
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.Transform);
1111
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.Transform = matrix);
1196
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.Width);
1197
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.Width = 10);
1208
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.CustomEndCap);
1209
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.CustomStartCap);
System\Drawing\Printing\PrinterSettingsTests.cs (7)
75
AssertExtensions.
Throws
<ArgumentException>(null, () => printerSettings.Copies = copies);
155
AssertExtensions.
Throws
<ArgumentException>(null, () => printerSettings.FromPage = pageNumber);
231
AssertExtensions.
Throws
<ArgumentException>(null, () => printerSettings.MaximumPage = maximumPage);
260
AssertExtensions.
Throws
<ArgumentException>(null, () => printerSettings.MinimumPage = minimumPage);
279
AssertExtensions.
Throws
<ArgumentNullException>(null, () => printerSettings.PrintFileName = null);
286
AssertExtensions.
Throws
<ArgumentNullException>(string.Empty, () => printerSettings.PrintFileName = string.Empty);
442
AssertExtensions.
Throws
<ArgumentException>(null, () => printerSettings.ToPage = toPage);
System\Drawing\RegionTests.cs (40)
121
AssertExtensions.
Throws
<ArgumentNullException>("rgnData", () => new Region((RegionData)null));
130
AssertExtensions.
Throws
<ArgumentException>(null, () => new Region(regionData));
245
AssertExtensions.
Throws
<ArgumentNullException>("path", () => new Region((GraphicsPath)null));
254
AssertExtensions.
Throws
<ArgumentException>(null, () => new Region(path));
275
AssertExtensions.
Throws
<ArgumentException>(null, () => CreateDisposedRegion().Clone());
592
AssertExtensions.
Throws
<ArgumentNullException>("region", () => region.Equals(null, s_graphic));
599
AssertExtensions.
Throws
<ArgumentNullException>("g", () => region.Equals(region, null));
610
AssertExtensions.
Throws
<ArgumentException>(null, () => region.Equals(region, graphics));
618
AssertExtensions.
Throws
<ArgumentException>(null, () => disposedRegion.Equals(new Region(), s_graphic));
619
AssertExtensions.
Throws
<ArgumentException>(null, () => new Region().Equals(disposedRegion, s_graphic));
930
AssertExtensions.
Throws
<ArgumentException>(null, () => Region.FromHrgn(IntPtr.Zero));
961
AssertExtensions.
Throws
<ArgumentNullException>("g", () => region.GetHrgn(null));
967
AssertExtensions.
Throws
<ArgumentException>(null, () => CreateDisposedRegion().GetHrgn(s_graphic));
981
AssertExtensions.
Throws
<ArgumentNullException>("g", () => region.GetBounds(null));
991
AssertExtensions.
Throws
<ArgumentException>(null, () => region.GetBounds(graphics));
997
AssertExtensions.
Throws
<ArgumentException>(null, () => CreateDisposedRegion().GetBounds(s_graphic));
1003
AssertExtensions.
Throws
<ArgumentException>(null, () => CreateDisposedRegion().GetRegionData());
1023
AssertExtensions.
Throws
<ArgumentNullException>("matrix", () => region.GetRegionScans(null));
1030
AssertExtensions.
Throws
<ArgumentException>(null, () => CreateDisposedRegion().GetRegionScans(matrix));
1039
AssertExtensions.
Throws
<ArgumentException>(null, () => region.GetRegionScans(matrix));
1269
AssertExtensions.
Throws
<ArgumentNullException>("g", () => region.IsEmpty(null));
1275
AssertExtensions.
Throws
<ArgumentException>(null, () => CreateDisposedRegion().IsEmpty(s_graphic));
1282
AssertExtensions.
Throws
<ArgumentNullException>("g", () => region.IsInfinite(null));
1292
AssertExtensions.
Throws
<ArgumentException>(null, () => region.IsInfinite(graphics));
1298
AssertExtensions.
Throws
<ArgumentException>(null, () => CreateDisposedRegion().IsInfinite(s_graphic));
1415
AssertExtensions.
Throws
<ArgumentException>(null, () => disposedRegion.IsVisible(1f, 2f));
1416
AssertExtensions.
Throws
<ArgumentException>(null, () => disposedRegion.IsVisible(new PointF(1, 2)));
1417
AssertExtensions.
Throws
<ArgumentException>(null, () => disposedRegion.IsVisible(new Point(1, 2)));
1419
AssertExtensions.
Throws
<ArgumentException>(null, () => disposedRegion.IsVisible(1f, 2f, s_graphic));
1420
AssertExtensions.
Throws
<ArgumentException>(null, () => disposedRegion.IsVisible(new PointF(1, 2), s_graphic));
1421
AssertExtensions.
Throws
<ArgumentException>(null, () => disposedRegion.IsVisible(new Point(1, 2), s_graphic));
1423
AssertExtensions.
Throws
<ArgumentException>(null, () => disposedRegion.IsVisible(1f, 2f, 3f, 4f));
1424
AssertExtensions.
Throws
<ArgumentException>(null, () => disposedRegion.IsVisible(new Rectangle(1, 2, 3, 4)));
1425
AssertExtensions.
Throws
<ArgumentException>(null, () => disposedRegion.IsVisible(new RectangleF(1, 2, 3, 4)));
1427
AssertExtensions.
Throws
<ArgumentException>(null, () => disposedRegion.IsVisible(1f, 2f, 3f, 4f, s_graphic));
1428
AssertExtensions.
Throws
<ArgumentException>(null, () => disposedRegion.IsVisible(new Rectangle(1, 2, 3, 4), s_graphic));
1429
AssertExtensions.
Throws
<ArgumentException>(null, () => disposedRegion.IsVisible(new RectangleF(1, 2, 3, 4), s_graphic));
1431
AssertExtensions.
Throws
<ArgumentException>(null, () => disposedRegion.IsVisible(1, 2, s_graphic));
1432
AssertExtensions.
Throws
<ArgumentException>(null, () => disposedRegion.IsVisible(1, 2, 3, 4));
1433
AssertExtensions.
Throws
<ArgumentException>(null, () => disposedRegion.IsVisible(1, 2, 3, 4, s_graphic));
System\Drawing\SolidBrushTests.cs (4)
56
AssertExtensions.
Throws
<ArgumentException>(null, brush.Clone);
65
AssertExtensions.
Throws
<ArgumentException>(null, () => brush.Color);
90
AssertExtensions.
Throws
<ArgumentException>(null, () => brush.Color = Color.WhiteSmoke);
97
AssertExtensions.
Throws
<ArgumentException>(null, () => brush.Color = Color.AntiqueWhite);
System\Drawing\StringFormatTests.cs (19)
78
AssertExtensions.
Throws
<ArgumentNullException>("format", () => new StringFormat(null));
87
AssertExtensions.
Throws
<ArgumentException>(null, () => new StringFormat(format));
122
AssertExtensions.
Throws
<ArgumentException>(null, format.Clone);
170
AssertExtensions.
Throws
<ArgumentException>(null, () => format.SetTabStops(-1, []));
186
AssertExtensions.
Throws
<ArgumentException>(null, () => format.SetTabStops(0, []));
195
AssertExtensions.
Throws
<ArgumentException>(null, () => format.GetTabStops(out float firstTabOffset));
262
AssertExtensions.
Throws
<ArgumentException>(null, () => format.Alignment);
263
AssertExtensions.
Throws
<ArgumentException>(null, () => format.Alignment = StringAlignment.Center);
272
AssertExtensions.
Throws
<ArgumentException>(null, () => format.DigitSubstitutionMethod);
281
AssertExtensions.
Throws
<ArgumentException>(null, () => format.DigitSubstitutionLanguage);
300
AssertExtensions.
Throws
<ArgumentException>(null, () => format.FormatFlags);
301
AssertExtensions.
Throws
<ArgumentException>(null, () => format.FormatFlags = StringFormatFlags.NoClip);
329
AssertExtensions.
Throws
<ArgumentException>(null, () => format.LineAlignment);
330
AssertExtensions.
Throws
<ArgumentException>(null, () => format.LineAlignment = StringAlignment.Center);
358
AssertExtensions.
Throws
<ArgumentException>(null, () => format.HotkeyPrefix);
359
AssertExtensions.
Throws
<ArgumentException>(null, () => format.HotkeyPrefix = HotkeyPrefix.Hide);
385
AssertExtensions.
Throws
<ArgumentException>(null, () => format.Trimming);
386
AssertExtensions.
Throws
<ArgumentException>(null, () => format.Trimming = StringTrimming.Word);
432
AssertExtensions.
Throws
<ArgumentException>(null, format.ToString);
System\Drawing\SystemBrushesTests.cs (2)
53
AssertExtensions.
Throws
<ArgumentException>(null, () => brush.Color = Color.Red);
61
AssertExtensions.
Throws
<ArgumentException>(null, () => SystemBrushes.FromSystemColor(Color.Blue));
System\Drawing\SystemPensTest.cs (17)
61
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.Alignment = PenAlignment.Center);
62
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.Brush = null);
63
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.Color = Color.AliceBlue);
64
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.CompoundArray = null);
65
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.CustomEndCap = null);
66
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.CustomStartCap = null);
67
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.DashCap = DashCap.Flat);
68
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.DashStyle = DashStyle.Custom);
69
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.DashOffset = 10);
70
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.DashPattern = null);
71
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.EndCap = LineCap.RoundAnchor);
72
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.LineJoin = LineJoin.MiterClipped);
73
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.MiterLimit = 10);
74
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.StartCap = LineCap.RoundAnchor);
77
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.Transform = matrix);
80
AssertExtensions.
Throws
<ArgumentException>(null, () => pen.Width = 10);
86
AssertExtensions.
Throws
<ArgumentException>(null, () => SystemPens.FromSystemColor(Color.Blue));
System\Drawing\Text\PrivateFontCollectionTests.cs (1)
203
AssertExtensions.
Throws
<ArgumentException>(null, () => fontCollection.Families);
System\Drawing\TextureBrushTests.cs (24)
241
AssertExtensions.
Throws
<ArgumentNullException>("image", () => new TextureBrush((Image)null));
242
AssertExtensions.
Throws
<ArgumentNullException>("image", () => new TextureBrush(null, WrapMode.Tile));
243
AssertExtensions.
Throws
<ArgumentNullException>("image", () => new TextureBrush(null, RectangleF.Empty));
244
AssertExtensions.
Throws
<ArgumentNullException>("image", () => new TextureBrush(null, Rectangle.Empty));
245
AssertExtensions.
Throws
<ArgumentNullException>("image", () => new TextureBrush(null, RectangleF.Empty, null));
246
AssertExtensions.
Throws
<ArgumentNullException>("image", () => new TextureBrush(null, Rectangle.Empty, null));
247
AssertExtensions.
Throws
<ArgumentNullException>("image", () => new TextureBrush(null, WrapMode.Tile, RectangleF.Empty));
248
AssertExtensions.
Throws
<ArgumentNullException>("image", () => new TextureBrush(null, WrapMode.Tile, Rectangle.Empty));
257
AssertExtensions.
Throws
<ArgumentException>(null, () => new TextureBrush(image));
258
AssertExtensions.
Throws
<ArgumentException>(null, () => new TextureBrush(image, WrapMode.Tile));
259
AssertExtensions.
Throws
<ArgumentException>(null, () => new TextureBrush(image, RectangleF.Empty));
260
AssertExtensions.
Throws
<ArgumentException>(null, () => new TextureBrush(image, Rectangle.Empty));
261
AssertExtensions.
Throws
<ArgumentException>(null, () => new TextureBrush(image, RectangleF.Empty, null));
262
AssertExtensions.
Throws
<ArgumentException>(null, () => new TextureBrush(image, Rectangle.Empty, null));
263
AssertExtensions.
Throws
<ArgumentException>(null, () => new TextureBrush(image, WrapMode.Tile, RectangleF.Empty));
264
AssertExtensions.
Throws
<ArgumentException>(null, () => new TextureBrush(image, WrapMode.Tile, Rectangle.Empty));
318
AssertExtensions.
Throws
<ArgumentException>(null, brush.Clone);
328
AssertExtensions.
Throws
<ArgumentException>(null, () => brush.Image);
597
AssertExtensions.
Throws
<ArgumentNullException>("value", () => brush.Transform = null);
608
AssertExtensions.
Throws
<ArgumentException>(null, () => brush.Transform = matrix);
619
AssertExtensions.
Throws
<ArgumentException>(null, () => brush.Transform);
620
AssertExtensions.
Throws
<ArgumentException>(null, () => brush.Transform = matrix);
718
AssertExtensions.
Throws
<ArgumentException>(null, () => brush.WrapMode);
719
AssertExtensions.
Throws
<ArgumentException>(null, () => brush.WrapMode = WrapMode.Tile);
System.Windows.Forms.Tests (3)
System\Drawing\Design\PaintValueEventArgsTests.cs (1)
35
AssertExtensions.
Throws
<ArgumentNullException>("graphics", () => new PaintValueEventArgs(null, new object(), null, Rectangle.Empty));
System\Windows\Forms\ListBoxTests.cs (2)
3277
AssertExtensions.
Throws
<ArgumentException>("value", () => control.SelectedItem = "item");
3283
AssertExtensions.
Throws
<ArgumentException>("value", () => control.SelectedItem = null);