We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 73d517d commit 5ad4310Copy full SHA for 5ad4310
src/Atc.Wpf.Controls/LabelControls/Extensions/LabelControlBaseExtensions.cs
@@ -6,4 +6,15 @@ public static class LabelControlBaseExtensions
6
public static bool IsValid(
7
this ILabelControlBase labelControl)
8
=> labelControl is not ILabelControl control || control.IsValid();
9
+
10
+ public static T? FindByIdentifier<T>(
11
+ this List<ILabelControlBase> labelControls,
12
+ string identifier)
13
+ where T : class, ILabelControlBase
14
+ {
15
+ ArgumentNullException.ThrowIfNull(labelControls);
16
+ ArgumentException.ThrowIfNullOrEmpty(identifier);
17
18
+ return labelControls.Find(x => x.Identifier == identifier) as T;
19
+ }
20
}
0 commit comments