4 writes to LinearColors
System.Drawing.Common.Tests (4)
System\Drawing\Drawing2D\LinearGradientBrushTests.cs (4)
535using LinearGradientBrush brush = new(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true) { LinearColors = colors }; 543Assert.Throws<NullReferenceException>(() => brush.LinearColors = null); 552Assert.Throws<IndexOutOfRangeException>(() => brush.LinearColors = new Color[length]); 562AssertExtensions.Throws<ArgumentException>(null, () => brush.LinearColors = [Color.Red, Color.Wheat]);
12 references to LinearColors
System.Drawing.Common.Tests (12)
System\Drawing\Drawing2D\LinearGradientBrushTests.cs (12)
30Assert.Equal(new Color[] { Color.FromArgb(color1.ToArgb()), Color.FromArgb(color2.ToArgb()) }, brush.LinearColors); 57Assert.Equal(new Color[] { Color.FromArgb(color1.ToArgb()), Color.FromArgb(color2.ToArgb()) }, brush.LinearColors); 91Assert.Equal(new Color[] { Color.FromArgb(color1.ToArgb()), Color.FromArgb(color2.ToArgb()) }, brush.LinearColors); 108Assert.Equal(new Color[] { Color.FromArgb(color1.ToArgb()), Color.FromArgb(color2.ToArgb()) }, brush.LinearColors); 134Assert.Equal(new Color[] { Color.FromArgb(color1.ToArgb()), Color.FromArgb(color2.ToArgb()) }, brush.LinearColors); 151Assert.Equal(new Color[] { Color.FromArgb(color1.ToArgb()), Color.FromArgb(color2.ToArgb()) }, brush.LinearColors); 177Assert.Equal(new Color[] { Color.FromArgb(color1.ToArgb()), Color.FromArgb(color2.ToArgb()) }, brush.LinearColors); 194Assert.Equal(new Color[] { Color.FromArgb(color1.ToArgb()), Color.FromArgb(color2.ToArgb()) }, brush.LinearColors); 241Assert.Equal(brush.LinearColors, clone.LinearColors); 536Assert.Equal(colors.Take(2).Select(c => Color.FromArgb(c.ToArgb())), brush.LinearColors); 561AssertExtensions.Throws<ArgumentException>(null, () => brush.LinearColors);