Here are the examples of the csharp api class System.Collections.Concurrent.ConcurrentBag.Add(UiNode) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
3 Examples
0
1. Example
Project: Pulse
Source File: UiChildPackageBuilder.cs
Source File: UiChildPackageBuilder.cs
private bool TryAddMoviesListing(ArchiveListing parentListing, ArchiveEntry entry, String entryName) { switch (entryName) { case "movie_items.win32.wdb": case "movie_items_us.win32.wdb": break; default: return false; } UiArchiveExtension extension = GetArchiveExtension(entry); UiDataTableNode node = new UiDataTableNode(parentListing, extension, entry); ConcurrentBag<UiNode> container = ProvideRootNodeChilds(extension); container.Add(node); return true; }
0
2. Example
Project: Pulse
Source File: UiChildPackageBuilder.cs
Source File: UiChildPackageBuilder.cs
private bool SetPairedEntry(ArchiveListing listing, ArchiveEntry entry, string ext, string longName) { Pair<ArchiveEntry, ArchiveEntry> pair = ProvidePair(longName); if (ext == ".win32.imgb") pair.Item2 = entry; else pair.Item1 = entry; if (!pair.IsAnyEmpty) { UiArchiveExtension extension = GetArchiveExtension(pair.Item1); UiFileTableNode node = new UiFileTableNode(listing, extension, pair.Item1, pair.Item2); ConcurrentBag<UiNode> container = ProvideRootNodeChilds(extension); container.Add(node); } return true; }
0
3. Example
Project: Pulse
Source File: UiChildPackageBuilder.cs
Source File: UiChildPackageBuilder.cs
private bool TryAddZoneListing(ArchiveListing parentListing, ArchiveEntry entry, string entryPath) { if (_areasDirectory == null) return false; if (!entryPath.StartsWith("zone/filelist")) return false; // Slip an empty archives if (entryPath.EndsWith("2")) return false; string binaryName; switch (InteractionService.GamePart) { case FFXIIIGamePart.Part1: binaryName = $"white_{entryPath.Substring(14, 5)}_img{(entryPath.EndsWith("2") ? "2" : string.Empty)}.win32.bin"; break; case FFXIIIGamePart.Part2: binaryName = $"white_{entryPath.Substring(14, 6)}_img{(entryPath.EndsWith("2") ? "2" : string.Empty)}.win32.bin"; break; default: throw new NotSupportedException("InteractionService.GamePart"); } string binaryPath = Path.Combine(_areasDirectory, binaryName); if (!File.Exists(binaryPath)) return false; ArchiveAccessor accessor = parentListing.Accessor.CreateDescriptor(binaryPath, entry); ConcurrentBag<UiNode> container = ProvideRootNodeChilds(UiArchiveExtension.Bin); container.Add(new UiArchiveNode(accessor, parentListing)); return true; }