55 references to KeyValuePairUtil
Microsoft.CodeAnalysis (9)
DiagnosticAnalyzer\AnalyzerExecutor.cs (2)
944var tuples = nodeActionsByKind.Select(kvp => KeyValuePairUtil.Create(kvp.Key, kvp.Value.ToImmutableAndFree())); 1043var tuples = operationActionsByKind.Select(kvp => KeyValuePairUtil.Create(kvp.Key, kvp.Value.ToImmutableAndFree()));
DocumentationComments\DocumentationCommentIncludeCache.cs (1)
58return KeyValuePairUtil.Create(resolvedPath, document);
MetadataReader\MetadataDecoder.cs (1)
410argumentsBuilder.Add(KeyValuePairUtil.Create(DecodeTypeOrThrow(ref ppSig, typeCode, out argumentRefersToNoPia), modifiers));
MetadataReader\MetadataHelpers.cs (1)
902nestedNamespaces[keyIndex] = KeyValuePairUtil.Create(primaryPair.Key, primaryPair.Value.Concat(pair.Value));
MetadataReference\AssemblyIdentityMap.cs (1)
100var pair = KeyValuePairUtil.Create(identity, value);
PEWriter\MetadataWriter.cs (2)
1144_signatureIndex.Add(methodReference, KeyValuePairUtil.Create(result, signatureBlob)); 1290_signatureIndex.Add(propertyDef, KeyValuePairUtil.Create(result, blob));
ReferenceManager\CommonReferenceManager.State.cs (1)
682return ReferencedAssembliesMap.Select(ra => KeyValuePairUtil.Create(ra.Key, (IAssemblySymbolInternal)ReferencedAssemblies[ra.Value]));
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (17)
ScriptTests.cs (17)
650KeyValuePairUtil.Create("a.csx", "return 42;")); 668KeyValuePairUtil.Create("a.csx", @" 691KeyValuePairUtil.Create("a.csx", @" 714KeyValuePairUtil.Create("a.csx", "1"), 715KeyValuePairUtil.Create("b.csx", @" 724KeyValuePairUtil.Create("a.csx", "1"), 725KeyValuePairUtil.Create("b.csx", "2")); 734KeyValuePairUtil.Create("a.csx", "1"), 735KeyValuePairUtil.Create("b.csx", "2")); 749KeyValuePairUtil.Create("a.csx", "return 1;"), 750KeyValuePairUtil.Create("b.csx", @" 759KeyValuePairUtil.Create("a.csx", "return 1;"), 760KeyValuePairUtil.Create("b.csx", "2")); 769KeyValuePairUtil.Create("a.csx", "return 1;"), 770KeyValuePairUtil.Create("b.csx", "2")); 784KeyValuePairUtil.Create("a.csx", @" 833KeyValuePairUtil.Create("a.csx", @"
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Compilation\CompilationAPITests.cs (1)
3360KeyValuePairUtil.Create("a.csx", "return \"Who returns a string?\";"));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Syntax\SyntaxTreeTests.cs (1)
232new[] { KeyValuePair.Create("CS00778", ReportDiagnostic.Suppress) });
Microsoft.CodeAnalysis.Test.Utilities (2)
TestHelpers.cs (2)
29=> ImmutableDictionary.CreateRange(comparer, entries.Select(KeyValuePair.ToKeyValuePair)); 32=> ImmutableDictionary.CreateRange(entries.Select(KeyValuePair.ToKeyValuePair));
Microsoft.CodeAnalysis.UnitTests (25)
Analyzers\AnalyzerConfigTests.cs (24)
46new[] { KeyValuePair.Create("my_global_prop", "my_global_val"), 47KeyValuePair.Create("root", "true") }, 53new[] { KeyValuePair.Create("my_prop", "my_val") }, 80new[] { KeyValuePair.Create("build_metadata.compile.toretrieve", "abc123") }, 86new[] { KeyValuePair.Create("build_metadata.compile.toretrieve", "def456") }, 92new[] { KeyValuePair.Create("build_metadata.compile.toretrieve", "ghi789") }, 171new[] { KeyValuePair.Create("my_prop", "my_val") }, 185Assert.Equal(new[] { KeyValuePair.Create("my_prop", "my_val") }, properties); 207AnalyzerConfig.ReservedKeys.Select(k => KeyValuePair.Create("my_" + k, "MY_VAL")).ToList(), 219Assert.Equal(new[] { KeyValuePair.Create("my_prop", "my_other_val") }, properties); 230Assert.Equal(new[] { KeyValuePair.Create("my_prop", "my_other_val") }, properties); 242new[] { KeyValuePair.Create("my_prop", "my_val2") }, 255new[] { KeyValuePair.Create("my_prop1", ""), 256KeyValuePair.Create("my_prop2", "my_val") }, 269new[] { KeyValuePair.Create("my_prop2", "my val2") }, 281new[] { KeyValuePair.Create("my_prop2", "my val2") }, 305new[] { KeyValuePair.Create("my", "key1 = my_val"), 306KeyValuePair.Create("my_key2", "my:val")}, 319new[] { KeyValuePair.Create("my_key2", "my@val") }, 336new[] { KeyValuePair.Create("long", "this value continues") }, 356AnalyzerConfig.ReservedValues.Select(v => KeyValuePair.Create("my_key" + (index++), v)).ToList(), 366AnalyzerConfig.ReservedKeys.Select(k => KeyValuePair.Create(k, "my_val")).ToList(), 1246expected[i].Select(KeyValuePair.ToKeyValuePair), 1609Assert.Equal(KeyValuePair.Create("cs000", ReportDiagnostic.Warn), options[0].TreeOptions.Single());
Diagnostics\CompilationWithAnalyzersTests.cs (1)
41new[] { KeyValuePairUtil.Create($"CS{(int)ErrorCode.WRN_AlwaysNull:D4}", ReportDiagnostic.Suppress) }));