A game about forced loneliness, made by TACStudios
1using System.Collections;
2using System.Collections.Generic;
3
4namespace UnityEditor.ShaderGraph
5{
6 [GenerationAPI]
7 internal class AdditionalCommandCollection : IEnumerable<AdditionalCommandCollection.Item>
8 {
9 public class Item
10 {
11 public AdditionalCommandDescriptor field { get; }
12
13 public Item(AdditionalCommandDescriptor field)
14 {
15 this.field = field;
16 }
17 }
18
19 readonly List<AdditionalCommandCollection.Item> m_Items;
20
21 public AdditionalCommandCollection()
22 {
23 m_Items = new List<AdditionalCommandCollection.Item>();
24 }
25
26 public AdditionalCommandCollection Add(AdditionalCommandCollection fields)
27 {
28 foreach (AdditionalCommandCollection.Item item in fields)
29 {
30 m_Items.Add(item);
31 }
32
33 return this;
34 }
35
36 public AdditionalCommandCollection Add(AdditionalCommandDescriptor field)
37 {
38 m_Items.Add(new Item(field));
39 return this;
40 }
41
42 public IEnumerator<AdditionalCommandCollection.Item> GetEnumerator()
43 {
44 return m_Items.GetEnumerator();
45 }
46
47 IEnumerator IEnumerable.GetEnumerator()
48 {
49 return GetEnumerator();
50 }
51 }
52}