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