You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// If the ICanvasBrushElement was not created, then the ICanvasStroke cannot be created
71
70
if(_brush==null)
72
71
{
73
-
ThrowHelper.ThrowArgumentException("Unable to create a valid ICanvasBrush for the "+
74
-
$"ICanvasStroke with the following Brush data - '{group.Value}'");
72
+
staticvoidThrow(stringvalue)=>thrownewArgumentException($"Unable to create a valid ICanvasBrush for the ICanvasStroke with the following Brush data - '{value}'.");
// If no match is found or no captures in the match, then it means that the brush data is invalid.
29
-
Guard.IsFalse(matches.Count==0,"(brushData matches.Count == 0)",$"BRUSH_ERR001:Invalid Brush data! No matching brush data found!\nBrush Data: {brushData}");
29
+
if(matches.Count==0)
30
+
{
31
+
ThrowForZeroCount();
32
+
}
30
33
31
-
// If the match contains more than one captures, it means that there are multiple brushes present in the brush data. There should be only one brush defined in the brush data.
32
-
Guard.IsFalse(matches.Count>1,"(brushData matches.Count > 1)","BRUSH_ERR002:Multiple Brushes defined in Brush Data! "+
33
-
"There should be only one Brush definition within the Brush Data. "+
34
-
"You can either remove Brush definitions or split the Brush Data "+
35
-
"into multiple Brush Data and call the CanvasPathGeometry.CreateBrush() method on each of them."+
36
-
$"\nBrush Data: {brushData}");
34
+
// If the match contains more than one captures, it means that there are multiple brushes present in the brush data.
35
+
// There should be only one brush defined in the brush data.
0 commit comments