Here are the examples of the csharp api class System.Collections.Generic.List.Add(string) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
200 Examples
0
1. Example
Project: unity_sdk
Source File: AdjustEvent.cs
Source File: AdjustEvent.cs
public void addCallbackParameter(string key, string value) { if (callbackList == null) { callbackList = new List<string>(); } callbackList.Add(key); callbackList.Add(value); }
0
2. Example
Project: unity_sdk
Source File: AdjustEvent.cs
Source File: AdjustEvent.cs
public void addPartnerParameter(string key, string value) { if (partnerList == null) { partnerList = new List<string>(); } partnerList.Add(key); partnerList.Add(value); }
0
3. Example
Project: NoFuserEx
Source File: DeobfuscatorManager.cs
Source File: DeobfuscatorManager.cs
void DetectConfuserVersion() { Logger.Verbose("Detecting ConfuserEx version..."); var versions = new List<string>(); var module = assemblyManager.Module; foreach (var attribute in module.CustomAttributes) { if (attribute.TypeFullName != "ConfusedByAttribute") continue; foreach (var argument in attribute.ConstructorArguments) { if (argument.Type.ElementType != ElementType.String) continue; var value = argument.Value.ToString(); if (!value.Contains("ConfuserEx")) continue; Logger.Info($"Detected: {value}"); versions.Add(value); } } if (versions.Count >= 1) return; if (Options.ForceDeobfuscation) { Logger.Info("Forced deobfuscation."); return; } Logger.Exclamation("ConfuserEx doesn't detected. Use de4dot."); Logger.Exit(); }
0
4. Example
Project: TraceLab
Source File: GraphHelperTest.cs
Source File: GraphHelperTest.cs
[TestMethod] public void EdgesBetweenDirectedTestOne() { List<string> set1 = new List<string>( ); set1.Add( one ); set1.Add( two ); List<string> set2 = new List<string>( ); set2.Add( three ); set2.Add( four ); List<Edge<string>> result = directedGraph.GetEdgesBetween( set1, set2 ).ToList(); Assert.AreEqual( 2, result.Count ); Assert.AreEqual( one, result[ 0 ].Source ); Assert.AreEqual( four, result[ 0 ].Target ); Assert.AreEqual( one, result[ 1 ].Source ); Assert.AreEqual( three, result[ 1 ].Target ); }
0
5. Example
Project: TraceLab
Source File: GraphHelperTest.cs
Source File: GraphHelperTest.cs
[TestMethod] public void EdgesBetweenDirectedTestTwo() { List<string> set1 = new List<string>( ); set1.Add( one ); set1.Add( two ); List<string> set2 = new List<string>( ); set2.Add( three ); set2.Add( four ); List<Edge<string>> result = directedGraph.GetEdgesBetween( set2, set1 ).ToList(); Assert.AreEqual( 1, result.Count ); Assert.AreEqual( four, result[ 0 ].Source ); Assert.AreEqual( two, result[ 0 ].Target ); }
0
6. Example
Project: TraceLab
Source File: tracer.cs
Source File: tracer.cs
private static void Init() { allTraceSwitches[Compiler.DisplayName] = Compiler; allTraceSwitches[FxBug.DisplayName] = FxBug; allTraceSwitches[ClassLoading.DisplayName] = ClassLoading; allTraceSwitches[Verifier.DisplayName] = Verifier; allTraceSwitches[Runtime.DisplayName] = Runtime; allTraceSwitches[Jni.DisplayName] = Jni; try { Trace.AutoFlush = true; #if !STUB_GENERATOR /* If the app config file gives some method trace - add it */ string trace = ConfigurationManager.AppSettings["Traced Methods"]; if(trace != null) { methodtraces.Add(trace); } #endif } catch(ConfigurationException) { // app.config is malformed, ignore } }
0
7. Example
Project: TraceLab
Source File: tracer.cs
Source File: tracer.cs
public static void HandleMethodTrace(string name) { methodtraces.Add(name); }
0
8. Example
Project: TraceLab
Source File: DefiningBenchmark.cs
Source File: DefiningBenchmark.cs
private void GetPublishableExperimentResults() { m_publishableExperimentResults = new List<string>(); foreach (ExperimentNode node in m_baseExperiment.Vertices) { IConfigurableAndIOSpecifiable metadata = node.Data.Metadata as IConfigurableAndIOSpecifiable; if (metadata != null) { foreach (IOItem outputItem in metadata.IOSpec.Output.Values) { //if output item type is an ExperimentResult it can be published if (outputItem.IOItemDefinition.Type.Equals(typeof(TraceLabSDK.Types.Contests.TLExperimentResults).FullName)) { //add it to the list of potential publishable results m_publishableExperimentResults.Add(outputItem.MappedTo); } } } } }
0
9. Example
Project: TraceLab
Source File: SettingsDialog.cs
Source File: SettingsDialog.cs
private List<String> getEntryListForModel(Gtk.ListStore model) { List<String> outList = new List<string>(); Gtk.TreeIter iter; model.GetIterFirst(out iter); if(iter.Equals(null)) return null; do { outList.Add(model.GetValue (iter, 0).ToString()); }while(model.IterNext(ref iter)); return outList; }
0
10. Example
Project: Nako
Source File: SignRawTransaction.cs
Source File: SignRawTransaction.cs
public void AddKey(string privateKey) { this.PrivateKeys.Add(privateKey); }
0
11. Example
Project: Nako
Source File: SignRawTransaction.cs
Source File: SignRawTransaction.cs
public void AddKey(string privateKey) { this.PrivateKeys.Add(privateKey); }
0
12. Example
Project: TESUnity
Source File: MusicPlayer.cs
Source File: MusicPlayer.cs
public void AddSong(string songFilePath) { songFilePaths.Add(songFilePath); }
0
13. Example
Project: TESUnity
Source File: CellManager.cs
Source File: CellManager.cs
private List<string> GetLANDTextureFilePaths(LANDRecord LAND) { // Don't return anything if the LAND doesn't have height data or texture data. if((LAND.VHGT == null) || (LAND.VTEX == null)) { return null; } var textureFilePaths = new List<string>(); var distinctTextureIndices = LAND.VTEX.textureIndices.Distinct().ToList(); for(int i = 0; i < distinctTextureIndices.Count; i++) { short textureIndex = (short)((short)distinctTextureIndices[i] - 1); if(textureIndex < 0) { textureFilePaths.Add(defaultLandTextureFilePath); continue; } else { var LTEX = dataReader.FindLTEXRecord(textureIndex); var textureFilePath = LTEX.DATA.value; textureFilePaths.Add(textureFilePath); } } return textureFilePaths; }
0
14. Example
Project: Krypton
Source File: Form1.cs
Source File: Form1.cs
private List<string> GetOpenFilenames() { List<String> filenames = new List<string>(); // Scan all cells KryptonWorkspaceCell cell = kryptonWorkspace.FirstCell(); while (cell != null) { // Scan all pages in the cell foreach (KryptonPage page in cell.Pages) { // If the contents come from a file if ((bool)page.Tag) filenames.Add(page.TextDescription.TrimEnd('*')); } cell = kryptonWorkspace.NextCell(cell); } return filenames; }
0
15. Example
Project: SmoONE
Source File: frmDepartmentCreate.cs
Source File: frmDepartmentCreate.cs
private void btnSave_Click(object sender, EventArgs e) { try { /n ..... /n //View Source file for more details /n }
0
16. Example
Project: SmoONE
Source File: frmRegister.cs
Source File: frmRegister.cs
private void btnSave_Press(object sender, EventArgs e) { try { /n ..... /n //View Source file for more details /n }
0
17. Example
Project: concordion-net
Source File: LineContinuationsTest.cs
Source File: LineContinuationsTest.cs
public void addSnippet(string snippet) { snippets.Add(snippet); }
0
18. Example
Project: concordion-net
Source File: SetupMethodTest.cs
Source File: SetupMethodTest.cs
[TestFixtureSetUp] public void Setup1() { CalledMethods.Add("Setup1"); }
0
19. Example
Project: concordion-net
Source File: SetupMethodTest.cs
Source File: SetupMethodTest.cs
[TestFixtureSetUp] public void Setup2() { CalledMethods.Add("Setup2"); }
0
20. Example
Project: concordion-net
Source File: PartialMatchesTest.cs
Source File: PartialMatchesTest.cs
public void setUpUser(string username) { usernamesInSystem.Add(username); }
0
21. Example
Project: contentful.net
Source File: SortOrderBuilder.cs
Source File: SortOrderBuilder.cs
public SortOrderBuilder<T> ThenBy(string field, SortOrder order = SortOrder.Normal) { _orderList.Add($",{(order == SortOrder.Reversed ? "-" : "")}{field}"); return this; }
0
22. Example
Project: ContinuousTests
Source File: ProjectDocument.cs
Source File: ProjectDocument.cs
public void AddReference(string reference) { _references.Add(reference); }
0
23. Example
Project: ContinuousTests
Source File: ProjectDocument.cs
Source File: ProjectDocument.cs
public void AddReferencedBy(string reference) { _referencedBy.Add(reference); }
0
24. Example
Project: ContinuousTests
Source File: ProjectDocument.cs
Source File: ProjectDocument.cs
public void AddBinaryReference(string reference) { _binaryReferences.Add(reference); }
0
25. Example
Project: ContinuousTests
Source File: ProjectReferenceParser.cs
Source File: ProjectReferenceParser.cs
public void Push(string node) { _nodes.Add(node); }
0
26. Example
Project: ContinuousTests
Source File: RecursiveRunCauseConsumer.cs
Source File: RecursiveRunCauseConsumer.cs
public void Consume(FileChangeMessage message) { foreach (var file in message.Files) _changedFiles.Add(file.FullName); }
0
27. Example
Project: ContinuousTests
Source File: EditorEngineMessage.cs
Source File: EditorEngineMessage.cs
private static IEnumerable<string> getRemainingChunks(List<string> chunks) { if (chunks.Count < 2) return new string[] {}; var list = new List<string>(); for (int i = 1; i < chunks.Count; i++) list.Add(chunks[i]); return list; }
0
28. Example
Project: ContinuousTests
Source File: FakeCache.cs
Source File: FakeCache.cs
public void Add<T>(string key) where T : IRecord { if (_throwErrorOnAdd) throw new Exception("Add casued an error"); _addedFields.Add(key); }
0
29. Example
Project: ContinuousTests
Source File: PathTranslatorTests.cs
Source File: PathTranslatorTests.cs
[SetUp] public void Setup() { _createdDirectories = new List<string>(); _createDirectory = (s) => _createdDirectories.Add(s); }
0
30. Example
Project: ContinuousTests
Source File: RunOptions.cs
Source File: RunOptions.cs
public void AddCategory(string category) { _categories.Add(category); }
0
31. Example
Project: ContinuousTests
Source File: RunOptions.cs
Source File: RunOptions.cs
public void AddTest(string test) { _tests.Add(test); }
0
32. Example
Project: ContinuousTests
Source File: RunOptions.cs
Source File: RunOptions.cs
public void AddMember(string member) { _members.Add(member); }
0
33. Example
Project: ContinuousTests
Source File: RunOptions.cs
Source File: RunOptions.cs
public void AddNamespace(string ns) { _namespaces.Add(ns); }
0
34. Example
Project: ContinuousTests
Source File: MinimizingPreProcessor.cs
Source File: MinimizingPreProcessor.cs
private List<string> getAdditionalNamespaces() { var namespaces = new List<string>(); var setting = _configuration.AllSettings("mm-ProfilerNamespaces"); if (setting == null) return namespaces; foreach (var item in setting.Split(new[] { "</Namespace>" }, StringSplitOptions.RemoveEmptyEntries)) namespaces.Add(item.Replace("<Namespace>", "").Replace(Environment.NewLine, "")); return namespaces; }
0
35. Example
Project: ContinuousTests
Source File: RecursiveRunCauseConsumer.cs
Source File: RecursiveRunCauseConsumer.cs
public void Consume(FileChangeMessage message) { foreach (var file in message.Files) _changedFiles.Add(file.FullName); }
0
36. Example
Project: IL2CPU
Source File: DebugInfo.cs
Source File: DebugInfo.cs
private Field_Map DoGetFieldMap(string aName) { var xMap = new Field_Map(); xMap.TypeName = aName; var xRows = mConnection.GetList<FIELD_MAPPING>(Predicates.Field<FIELD_MAPPING>(q => q.TYPE_NAME, Operator.Eq, aName)); foreach (var xFieldName in xRows) { xMap.FieldNames.Add(xFieldName.FIELD_NAME); } return xMap; }
0
37. Example
Project: Linq2Couchbase
Source File: QueryPartsAggregator.cs
Source File: QueryPartsAggregator.cs
public void AddGroupByPart(string value) { if (GroupByParts == null) { GroupByParts = new List<string>(); } GroupByParts.Add(value); }
0
38. Example
Project: Linq2Couchbase
Source File: QueryPartsAggregator.cs
Source File: QueryPartsAggregator.cs
public void AddHavingPart(string value) { if (HavingParts == null) { HavingParts = new List<string>(); } HavingParts.Add(value); }
0
39. Example
Project: Linq2Couchbase
Source File: QueryPartsAggregator.cs
Source File: QueryPartsAggregator.cs
public void AddWrappingFunction(string function) { if (WrappingFunctions == null) { WrappingFunctions = new List<string>(); } WrappingFunctions.Add(function); }
0
40. Example
Project: Linq2Couchbase
Source File: QueryPartsAggregator.cs
Source File: QueryPartsAggregator.cs
public void AddUnionPart(string unionPart) { if (UnionParts == null) { UnionParts = new List<string>(); } UnionParts.Add(unionPart); }
0
41. Example
Project: xRM-Portals-Community-Edition
Source File: CrmMetadataDataSourceView.cs
Source File: CrmMetadataDataSourceView.cs
private IEnumerable<string> GetCacheDependencies(IEnumerable results) { CacheParameters cacheParameters = Owner.GetCacheParameters(); var dependencies = new List<string>(); dependencies.Add("xrm:dependency:metadata:*"); // get the global dependencies foreach (CacheKeyDependency ckd in cacheParameters.Dependencies) { dependencies.Add(ckd.GetCacheKey(Context, Owner, Owner)); } // get the item dependencies foreach (object result in results) { foreach (CacheKeyDependency ckd in cacheParameters.ItemDependencies) { dependencies.Add(ckd.GetCacheKey(Context, Owner, result)); } } return dependencies; }
0
42. Example
Project: GameCloud.Orleans
Source File: EntityDef.cs
Source File: EntityDef.cs
public void declareComponent<T>() where T : ComponentDef { string name = typeof(T).Name; mListComponentDef.Add(name); }
0
43. Example
Project: GameCloud.Orleans
Source File: Inventory.cs
Source File: Inventory.cs
public List<string> GetAllOwnedSkus(string itemType) { List<string> result = new List<string>(); foreach (Purchase p in _purchaseMap.Values) { if (p.ItemType == itemType) result.Add(p.Sku); } return result; }
0
44. Example
Project: GameCloud.Orleans
Source File: EntityDef.cs
Source File: EntityDef.cs
public void declareComponent<T>() where T : ComponentDef { string name = typeof(T).Name; mListComponentDef.Add(name); }
0
45. Example
Project: SF-Boilerplate
Source File: CachingSiteResolver.cs
Source File: CachingSiteResolver.cs
protected override IEnumerable<string> GetTenantIdentifiers(TenantContext<SiteContext> context) { var identifiers = new List<string>(); if (multiTenantOptions.Mode == MultiTenantMode.FolderName) { if (context.Tenant.SiteFolderName.Length > 0) { identifiers.Add(context.Tenant.SiteFolderName); } else { identifiers.Add("root"); } } var siteGuid = context.Tenant.Id.ToString(); identifiers.Add(siteGuid); return identifiers; }
0
46. Example
Project: mesh_maker_vr
Source File: Materials.cs
Source File: Materials.cs
public List<string> MaterialNames() { List<string> materialNames = new List<string>(); for (int i = 0; i < triangleMaterials.Count; i++) { materialNames.Add(materials[triangleMaterials[i]].name); } return materialNames; }
0
47. Example
Project: CLAP
Source File: Samples.cs
Source File: Samples.cs
public void Print(String text) { PrintedTexts.Add(text); }
0
48. Example
Project: BoC
Source File: Container.cs
Source File: Container.cs
public static int Of(string message) { Messages.Add(message); return FirstErrorCode + Messages.Count - 1; }
0
49. Example
Project: TinyPNG
Source File: DownloadExtensions.cs
Source File: DownloadExtensions.cs
private static HttpContent CreateContent(PreserveMetadata metadata, string type) { if (metadata == PreserveMetadata.None) return null; var preserve = new List<string>(); if (metadata.HasFlag(PreserveMetadata.Copyright)) { preserve.Add("copyright"); } if (metadata.HasFlag(PreserveMetadata.Creation)) { if (type != JpegType) throw new InvalidOperationException($"Creation metadata can only be preserved with type {JpegType}"); preserve.Add("creation"); } if (metadata.HasFlag(PreserveMetadata.Location)) { if (type != JpegType) throw new InvalidOperationException($"Location metadata can only be preserved with type {JpegType}"); preserve.Add("location"); } string json = JsonConvert.SerializeObject(new { preserve }); return new StringContent(json, System.Text.Encoding.UTF8, "application/json"); }
0
50. Example
Project: Ensconce
Source File: Options.cs
Source File: Options.cs
public void Add (string item) {values.Add (item);}