浏览代码

Code cleanup.

Tig 4 周之前
父节点
当前提交
bc48545da0

+ 2 - 0
Terminal.Gui/Drawing/Region.cs

@@ -917,6 +917,8 @@ public class Region
     /// </param>
     public void FillRectangles (IDriver? driver, Attribute? attribute, Rune? fillRune = null)
     {
+        ArgumentNullException.ThrowIfNull (driver);
+
         if (_rectangles.Count == 0)
         {
             return;

+ 1 - 0
Terminal.Gui/Drawing/Ruler.cs

@@ -26,6 +26,7 @@ internal class Ruler
     public void Draw (IDriver? driver, Point location, int start = 0)
     {
         ArgumentNullException.ThrowIfNull (driver);
+
         if (start < 0)
         {
             throw new ArgumentException ("start must be greater than or equal to 0");

+ 2 - 0
Terminal.Gui/Drawing/Sixel/SixelSupportDetector.cs

@@ -16,6 +16,8 @@ public class SixelSupportDetector ()
     /// <param name="driver"></param>
     public SixelSupportDetector (IDriver? driver) : this ()
     {
+        ArgumentNullException.ThrowIfNull (driver);
+
         _driver = driver;
     }