Here are the examples of the csharp api System.Collections.Generic.List.GetEnumerator() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
2074 Examples
19
Source : ExifValueCollection.cs
with MIT License
from 0xC0000054
with MIT License
from 0xC0000054
public IEnumerator<MetadataEntry> GetEnumerator()
{
return this.exifMetadata.GetEnumerator();
}
19
Source : ExifValueCollection.cs
with MIT License
from 0xC0000054
with MIT License
from 0xC0000054
IEnumerator IEnumerable.GetEnumerator()
{
return this.exifMetadata.GetEnumerator();
}
19
Source : TextureCollection.cs
with MIT License
from 0xC0000054
with MIT License
from 0xC0000054
public IEnumerator<Texture> GetEnumerator()
{
return this.items.GetEnumerator();
}
19
Source : TextureCollection.cs
with MIT License
from 0xC0000054
with MIT License
from 0xC0000054
IEnumerator IEnumerable.GetEnumerator()
{
return this.items.GetEnumerator();
}
19
Source : ExifValueCollection.cs
with MIT License
from 0xC0000054
with MIT License
from 0xC0000054
public IEnumerator<MetadataEntry> GetEnumerator()
{
return exifMetadata.GetEnumerator();
}
19
Source : ExifValueCollection.cs
with MIT License
from 0xC0000054
with MIT License
from 0xC0000054
IEnumerator IEnumerable.GetEnumerator()
{
return exifMetadata.GetEnumerator();
}
19
Source : Assets.cs
with GNU General Public License v3.0
from 1330-Studios
with GNU General Public License v3.0
from 1330-Studios
[HarmonyPrefix]
public static bool Prefix(Factory __instance, string objectId, Il2CppSystem.Action<UnityDisplayNode> onComplete) {
using (var enumerator = allreplacedetsKnown.GetEnumerator()) {
while (enumerator.MoveNext()) {
replacedetInfo curreplacedet = enumerator.Current;
if (objectId.Equals(curreplacedet.CustomreplacedetName)) {
GameObject obj = Object.Instantiate(new GameObject(objectId + "(Clone)"), __instance.PrototypeRoot);
var sr = obj.AddComponent<SpriteRenderer>();
sr.sprite = SpriteBuilder.createBloon(CacheBuilder.Get(objectId));
var udn = obj.AddComponent<UnityDisplayNode>();
udn.transform.position = new(-3000, 0);
onComplete.Invoke(udn);
return false;
}
}
}
return true;
}
19
Source : CollectionAbstract.cs
with MIT License
from 17MKH
with MIT License
from 17MKH
public IEnumerator<TEnreplacedy> GetEnumerator()
{
return Collection.GetEnumerator();
}
19
Source : GameManager.cs
with MIT License
from 39M
with MIT License
from 39M
void InitWithBuildInBeatmap()
{
// Load beatmap
music = RuntimeData.selectedMusic;
if (music == null)
{
var beatmapreplacedet = Resources.Load<Textreplacedet>(GameConst.BEATMAP_PATH + "Bangarang");
music = Music.FromJson(beatmapreplacedet.text);
}
beatmap = RuntimeData.selectedBeatmap;
if (beatmap == null)
{
beatmap = music.beatmapList[0];
}
noteList = beatmap.noteList;
//int remainNote = 100;
//noteList.RemoveRange(remainNote, noteList.Count - remainNote);
noteEnum = noteList.GetEnumerator();
noteEnum.MoveNext();
currentNote = noteEnum.Current;
// Load and play audio
audio.clip = Utils.LoadAudio(music.audioFilename);
if (currentNote.time < noteSpawnAdvanceTime / 2)
{
audio.PlayDelayed(2f);
}
else
{
audio.Play();
}
if (music.soundEffectFilename != null && music.soundEffectFilename.Length > 0)
{
hitSoundClip = Utils.LoadSoundEffect(music.soundEffectFilename);
}
else
{
hitSoundClip = Utils.LoadSoundEffect(GameConst.DEFAULT_SOUND_EFFECT_FILENAME);
}
}
19
Source : SynchSubscribers.cs
with MIT License
from 3F
with MIT License
from 3F
public IEnumerator<T> GetEnumerator()
{
IEnumerator<T> result;
lock(sync) {
result = listeners.GetEnumerator();
}
return result;
}
19
Source : AdjacentSeats.cs
with Apache License 2.0
from 42skillz
with Apache License 2.0
from 42skillz
public IEnumerator<Seat> GetEnumerator()
{
return _seats.GetEnumerator();
}
19
Source : SimpleJSON.cs
with MIT License
from 71
with MIT License
from 71
public override Enumerator GetEnumerator() { return new Enumerator(m_List.GetEnumerator()); }
19
Source : DeserializeableList.cs
with MIT License
from absurd-joy
with MIT License
from absurd-joy
public IEnumerator<T> GetEnumerator() {return _Data.GetEnumerator();}
19
Source : FileCache.cs
with Apache License 2.0
from acarteas
with Apache License 2.0
from acarteas
public IEnumerator<KeyValuePair<string, object>> GetEnumerator(string regionName = null)
{
string region = "";
if (string.IsNullOrEmpty(regionName) == false)
{
region = regionName;
}
//AC: This seems inefficient. Wouldn't it be better to do this using a cursor?
List<KeyValuePair<string, object>> enumerator = new List<KeyValuePair<string, object>>();
var keys = CacheManager.GetKeys(regionName);
foreach (string key in keys)
{
enumerator.Add(new KeyValuePair<string, object>(key, this.Get(key, regionName)));
}
return enumerator.GetEnumerator();
}
19
Source : MappingToken.cs
with MIT License
from actions
with MIT License
from actions
public IEnumerator<KeyValuePair<ScalarToken, TemplateToken>> GetEnumerator()
{
if (m_items?.Count > 0)
{
return m_items.GetEnumerator();
}
else
{
return (new List<KeyValuePair<ScalarToken, TemplateToken>>(0)).GetEnumerator();
}
}
19
Source : MappingToken.cs
with MIT License
from actions
with MIT License
from actions
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
{
if (m_items?.Count > 0)
{
return m_items.GetEnumerator();
}
else
{
return (new KeyValuePair<ScalarToken, TemplateToken>[0]).GetEnumerator();
}
}
19
Source : SequenceToken.cs
with MIT License
from actions
with MIT License
from actions
public IEnumerator<TemplateToken> GetEnumerator()
{
if (m_items?.Count > 0)
{
return m_items.GetEnumerator();
}
else
{
return (new TemplateToken[0] as IEnumerable<TemplateToken>).GetEnumerator();
}
}
19
Source : SequenceToken.cs
with MIT License
from actions
with MIT License
from actions
IEnumerator IEnumerable.GetEnumerator()
{
if (m_items?.Count > 0)
{
return m_items.GetEnumerator();
}
else
{
return (new TemplateToken[0] as IEnumerable<TemplateToken>).GetEnumerator();
}
}
19
Source : SequenceToken.cs
with MIT License
from actions
with MIT License
from actions
IEnumerator IReadOnlyArray.GetEnumerator()
{
if (m_items?.Count > 0)
{
return m_items.GetEnumerator();
}
else
{
return (new TemplateToken[0] as IEnumerable<TemplateToken>).GetEnumerator();
}
}
19
Source : TestMutableComposite.cs
with GNU Affero General Public License v3.0
from active-logic
with GNU Affero General Public License v3.0
from active-logic
[Test] public void FuncReset_ordered(){
var arr = new List<Func<status>>();
x.ι = arr.GetEnumerator();
x.ordered = true;
o ( x.Reset(), @void() );
}
19
Source : ObservableList.cs
with MIT License
from Adam4lexander
with MIT License
from Adam4lexander
public List<T>.Enumerator GetEnumerator() {
return m_list.GetEnumerator();
}
19
Source : Diagnostics.cs
with MIT License
from adamant
with MIT License
from adamant
public IEnumerator<Diagnostic> GetEnumerator()
{
return items.GetEnumerator();
}
19
Source : CustomPOHelper.cs
with MIT License
from adams85
with MIT License
from adams85
public IEnumerator<string> GetEnumerator() => _translations.GetEnumerator();
19
Source : RxGeometryGroup.cs
with MIT License
from adospace
with MIT License
from adospace
public IEnumerator<IRxGeometry> GetEnumerator()
{
return _internalChildren.GetEnumerator();
}
19
Source : RxGeometryGroup.cs
with MIT License
from adospace
with MIT License
from adospace
IEnumerator IEnumerable.GetEnumerator()
{
return _internalChildren.GetEnumerator();
}
19
Source : RxContentPage.cs
with MIT License
from adospace
with MIT License
from adospace
public IEnumerator<VisualNode> GetEnumerator()
{
return _contents.GetEnumerator();
}
19
Source : RxLayout.cs
with MIT License
from adospace
with MIT License
from adospace
public IEnumerator<VisualNode> GetEnumerator()
{
return _internalChildren.GetEnumerator();
}
19
Source : RxNavigationPage.cs
with MIT License
from adospace
with MIT License
from adospace
public IEnumerator<VisualNode> GetEnumerator()
{
return new List<VisualNode>(new[] { _rootPage }).GetEnumerator();
}
19
Source : RxComponent.cs
with MIT License
from adospace
with MIT License
from adospace
public IEnumerator<VisualNode> GetEnumerator()
{
return _children.GetEnumerator();
}
19
Source : RxShellSection.cs
with MIT License
from adospace
with MIT License
from adospace
public IEnumerator<VisualNode> GetEnumerator()
{
return _items.GetEnumerator();
}
19
Source : RxMap.cs
with MIT License
from adospace
with MIT License
from adospace
public IEnumerator<RxPin> GetEnumerator()
{
return _internalChildren.GetEnumerator();
}
19
Source : RxShellItem.cs
with MIT License
from adospace
with MIT License
from adospace
public IEnumerator<IRxShellSection> GetEnumerator()
{
return _items.GetEnumerator();
}
19
Source : RxTableView.cs
with MIT License
from adospace
with MIT License
from adospace
public IEnumerator<RxTableRoot> GetEnumerator()
{
return _children.GetEnumerator();
}
19
Source : CompositeCrmSiteMapNodeValidator.cs
with MIT License
from Adoxio
with MIT License
from Adoxio
public IEnumerator<ICrmSiteMapNodeValidator> GetEnumerator()
{
return _validators.GetEnumerator();
}
19
Source : CodePatches.cs
with GNU General Public License v3.0
from aedenthorn
with GNU General Public License v3.0
from aedenthorn
public static bool doSetVisibleWallpaper_Prefix(DecoratableLocation __instance, int whichRoom, int which)
{
if (!ModEntry.config.EnableMod || !ModEntry.floorsWallsDataDict.ContainsKey(__instance.Name))
return true;
int idx = -1;
for (int i = 0; i < __instance.map.TileSheets.Count; i++)
{
if (__instance.map.TileSheets[i].Id == "walls_and_floors")
{
idx = i;
break;
}
}
if (idx == -1)
{
return true;
}
__instance.updateMap();
List<Rectangle> rooms = __instance.getWalls();
int tileSheetIndex = which % 16 + which / 16 * 48;
if (whichRoom == -1)
{
using (List<Rectangle>.Enumerator enumerator = rooms.GetEnumerator())
{
while (enumerator.MoveNext())
{
Rectangle r = enumerator.Current;
for (int x = r.X; x < r.Right; x++)
{
if (IsFloorableOrWallpaperableTile(x, r.Y, "Back", __instance))
{
SetWallpaperTile(x, r.Y, tileSheetIndex, "Back", __instance, idx);
}
if (IsFloorableOrWallpaperableTile(x, r.Y + 1, "Back", __instance))
{
SetWallpaperTile(x, r.Y + 1, tileSheetIndex + 16, "Back", __instance, idx);
}
if (r.Height >= 3)
{
if (IsFloorableOrWallpaperableTile(x, r.Y + 2, "Buildings", __instance))
{
SetWallpaperTile(x, r.Y + 2, tileSheetIndex + 32, "Buildings", __instance, idx);
}
if (IsFloorableOrWallpaperableTile(x, r.Y + 2, "Back", __instance))
{
SetWallpaperTile(x, r.Y + 2, tileSheetIndex + 32, "Back", __instance, idx);
}
}
}
}
return false;
}
}
if (rooms.Count > whichRoom)
{
Rectangle r2 = rooms[whichRoom];
for (int x2 = r2.X; x2 < r2.Right; x2++)
{
if (IsFloorableOrWallpaperableTile(x2, r2.Y, "Back", __instance))
{
SetWallpaperTile(x2, r2.Y, tileSheetIndex, "Back", __instance, idx);
}
if (IsFloorableOrWallpaperableTile(x2, r2.Y + 1, "Back", __instance))
{
SetWallpaperTile(x2, r2.Y + 1, tileSheetIndex + 16, "Back", __instance, idx);
}
if (r2.Height >= 3)
{
if (IsFloorableOrWallpaperableTile(x2, r2.Y + 2, "Buildings", __instance))
{
SetWallpaperTile(x2, r2.Y + 2, tileSheetIndex + 32, "Buildings", __instance, idx);
}
else if (IsFloorableOrWallpaperableTile(x2, r2.Y + 2, "Back", __instance))
{
SetWallpaperTile(x2, r2.Y + 2, tileSheetIndex + 32, "Back", __instance, idx);
}
}
}
}
return false;
}
19
Source : CodePatches.cs
with GNU General Public License v3.0
from aedenthorn
with GNU General Public License v3.0
from aedenthorn
public static bool doSetVisibleFloor_Prefix(DecoratableLocation __instance, int whichRoom, int which)
{
if (!ModEntry.config.EnableMod || !ModEntry.floorsWallsDataDict.ContainsKey(__instance.Name))
return true;
int idx = -1;
for (int i = 0; i < __instance.map.TileSheets.Count; i++)
{
if (__instance.map.TileSheets[i].Id == "walls_and_floors")
{
idx = i;
break;
}
}
if (idx == -1)
{
return true;
}
List<Rectangle> rooms = __instance.getFloors();
int tileSheetIndex = 336 + which % 8 * 2 + which / 8 * 32;
if (whichRoom == -1)
{
using (List<Rectangle>.Enumerator enumerator = rooms.GetEnumerator())
{
while (enumerator.MoveNext())
{
Rectangle r = enumerator.Current;
for (int x = r.X; x < r.Right; x += 2)
{
for (int y = r.Y; y < r.Bottom; y += 2)
{
if (r.Contains(x, y) && IsFloorableTile(x, y, "Back", __instance))
{
SetFlooringTile(tileSheetIndex, x, y, r, __instance, idx);
}
if (r.Contains(x + 1, y) && IsFloorableTile(x + 1, y, "Back", __instance))
{
SetFlooringTile(tileSheetIndex, x + 1, y, r, __instance, idx);
}
if (r.Contains(x, y + 1) && IsFloorableTile(x, y + 1, "Back", __instance))
{
SetFlooringTile(tileSheetIndex, x, y + 1, r, __instance, idx);
}
if (r.Contains(x + 1, y + 1) && IsFloorableTile(x + 1, y + 1, "Back", __instance))
{
SetFlooringTile(tileSheetIndex, x + 1, y + 1, r, __instance, idx);
}
}
}
}
return false;
}
}
if (rooms.Count > whichRoom)
{
Rectangle r2 = rooms[whichRoom];
for (int x2 = r2.X; x2 < r2.Right; x2 += 2)
{
for (int y2 = r2.Y; y2 < r2.Bottom; y2 += 2)
{
if (r2.Contains(x2, y2) && IsFloorableTile(x2, y2, "Back", __instance))
{
SetFlooringTile(tileSheetIndex, x2, y2, r2, __instance, idx);
}
if (r2.Contains(x2 + 1, y2) && IsFloorableTile(x2 + 1, y2, "Back", __instance))
{
SetFlooringTile(tileSheetIndex, x2 + 1, y2, r2, __instance, idx);
}
if (r2.Contains(x2, y2 + 1) && IsFloorableTile(x2, y2 + 1, "Back", __instance))
{
SetFlooringTile(tileSheetIndex, x2, y2 + 1, r2, __instance, idx);
}
if (r2.Contains(x2 + 1, y2 + 1) && IsFloorableTile(x2 + 1, y2 + 1, "Back", __instance))
{
SetFlooringTile(tileSheetIndex, x2 + 1, y2 + 1, r2, __instance, idx);
}
}
}
}
return false;
}
19
Source : SyncList.cs
with GNU General Public License v3.0
from aelariane
with GNU General Public License v3.0
from aelariane
public IEnumerator<T> GetEnumerator()
{
return items.GetEnumerator();
}
19
Source : SyncList.cs
with GNU General Public License v3.0
from aelariane
with GNU General Public License v3.0
from aelariane
IEnumerator IEnumerable.GetEnumerator()
{
return items.GetEnumerator();
}
19
Source : EpubFile.cs
with MIT License
from Aeroblast
with MIT License
from Aeroblast
public IEnumerator<Itemref> GetEnumerator()
{
return items.GetEnumerator();
}
19
Source : CurveControlPointList.cs
with The Unlicense
from aeroson
with The Unlicense
from aeroson
public List<CurveControlPoint<TValue>>.Enumerator GetEnumerator()
{
return list.GetEnumerator();
}
19
Source : CurveControlPointList.cs
with The Unlicense
from aeroson
with The Unlicense
from aeroson
IEnumerator<CurveControlPoint<TValue>> IEnumerable<CurveControlPoint<TValue>>.GetEnumerator()
{
return list.GetEnumerator();
}
19
Source : CurveControlPointList.cs
with The Unlicense
from aeroson
with The Unlicense
from aeroson
IEnumerator IEnumerable.GetEnumerator()
{
return list.GetEnumerator();
}
19
Source : ZMessage.cs
with Mozilla Public License 2.0
from agebullhu
with Mozilla Public License 2.0
from agebullhu
public IEnumerator<ZFrame> GetEnumerator()
{
return _frames.GetEnumerator();
}
19
Source : Objects.cs
with MIT License
from agens-no
with MIT License
from agens-no
IEnumerator<string> IEnumerable<string>.GetEnumerator() { return m_List.GetEnumerator(); }
19
Source : Objects.cs
with MIT License
from agens-no
with MIT License
from agens-no
IEnumerator IEnumerable.GetEnumerator() { return m_List.GetEnumerator(); }
19
Source : MongoDbXmlRepositoryTest.cs
with Apache License 2.0
from Aguafrommars
with Apache License 2.0
from Aguafrommars
[Fact]
public void GetAllElements_should_return_all_elements()
{
var collectionMock = new Mock<IMongoCollection<DataProtectionKey>>();
var queryableMock = new Mock<IMongoQueryable<DataProtectionKey>>();
var fake = new List<DataProtectionKey>
{
new DataProtectionKey
{
Xml = "<a/>"
}
};
queryableMock.Setup(m => m.GetEnumerator()).Returns(fake.GetEnumerator());
var provider = new ServiceCollection()
.AddLogging()
.AddTransient(p => new MongoCollectionWrapper<DataProtectionKey>(collectionMock.Object, queryableMock.Object))
.BuildServiceProvider();
var sut = new MongoDbXmlRepository<DataProtectionKey>(provider, provider.GetRequiredService<ILoggerFactory>());
var result = sut.GetAllElements();
replacedert.Single(result);
}
19
Source : RavenDbXmlRepositoryTest.cs
with Apache License 2.0
from Aguafrommars
with Apache License 2.0
from Aguafrommars
[Fact]
public void GetAllElements_should_return_all_elements_whwn_parse_xml_failed()
{
var sessionMock = new Mock<IDoreplacedentSession>();
var queryableMock = new Mock<IRavenQueryable<KeyRotationKey>>();
var fake = new List<KeyRotationKey>
{
new KeyRotationKey
{
}
};
queryableMock.Setup(m => m.GetEnumerator()).Returns(fake.GetEnumerator());
sessionMock.Setup(m => m.Query<KeyRotationKey>(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<bool>())).Returns(queryableMock.Object);
var provider = new ServiceCollection()
.AddLogging()
.AddTransient(p => new DoreplacedentSessionWrapper(sessionMock.Object))
.BuildServiceProvider();
var sut = new RavenDbXmlRepository<KeyRotationKey>(provider, provider.GetRequiredService<ILoggerFactory>());
var result = sut.GetAllElements();
replacedert.Single(result);
}
19
Source : RavenDbXmlRepositoryTest.cs
with Apache License 2.0
from Aguafrommars
with Apache License 2.0
from Aguafrommars
[Fact]
public void GetAllElements_should_return_all_elements()
{
var sessionMock = new Mock<IDoreplacedentSession>();
var queryableMock = new Mock<IRavenQueryable<DataProtectionKey>>();
var fake = new List<DataProtectionKey>
{
new DataProtectionKey
{
Xml = "<a/>"
}
};
queryableMock.Setup(m => m.GetEnumerator()).Returns(fake.GetEnumerator());
sessionMock.Setup(m => m.Query<DataProtectionKey>(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<bool>())).Returns(queryableMock.Object);
var provider = new ServiceCollection()
.AddLogging()
.AddTransient(p => new DoreplacedentSessionWrapper(sessionMock.Object))
.BuildServiceProvider();
var sut = new RavenDbXmlRepository<DataProtectionKey>(provider, provider.GetRequiredService<ILoggerFactory>());
var result = sut.GetAllElements();
replacedert.Single(result);
}
19
Source : MongoDbXmlRepositoryTest.cs
with Apache License 2.0
from Aguafrommars
with Apache License 2.0
from Aguafrommars
[Fact]
public void GetAllElements_should_return_all_elements_whwn_parse_xml_failed()
{
var collectionMock = new Mock<IMongoCollection<KeyRotationKey>>();
var queryableMock = new Mock<IMongoQueryable<KeyRotationKey>>();
var fake = new List<KeyRotationKey>
{
new KeyRotationKey
{
}
};
queryableMock.Setup(m => m.GetEnumerator()).Returns(fake.GetEnumerator());
var provider = new ServiceCollection()
.AddLogging()
.AddTransient(p => new MongoCollectionWrapper<KeyRotationKey>(collectionMock.Object, queryableMock.Object))
.BuildServiceProvider();
var sut = new MongoDbXmlRepository<KeyRotationKey>(provider, provider.GetRequiredService<ILoggerFactory>());
var result = sut.GetAllElements();
replacedert.Single(result);
}
19
Source : SimpleArray.cs
with GNU General Public License v3.0
from ahmed605
with GNU General Public License v3.0
from ahmed605
public IEnumerator<T> GetEnumerator()
{
return Values.GetEnumerator();
}
See More Examples