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 0c324ef commit f4a638bCopy full SHA for f4a638b
src/KubernetesClient.Models/IItems.cs
@@ -12,4 +12,12 @@ public interface IItems<T>
12
/// </summary>
13
IList<T> Items { get; set; }
14
}
15
+
16
+ public static class ItemsExt
17
+ {
18
+ public static IEnumerator<T> GetEnumerator<T>(this IItems<T> items)
19
20
+ return items.Items.GetEnumerator();
21
+ }
22
23
tests/KubernetesClient.Tests/ItemsEnumTests.cs
@@ -0,0 +1,22 @@
1
+using Xunit;
2
+using k8s.Models;
3
4
+namespace k8s.Tests;
5
6
+public class ItemsEnumTests
7
+{
8
+ [Fact]
9
+ public void EnsureIItemsEnumerable()
10
11
+ var pods = new V1PodList
+ Items = new[] { new V1Pod() },
+ };
+ // ensure no sytax err
+ foreach (var pod in pods)
+ Assert.NotNull(pod);
+}
0 commit comments