227 references to GetString
BuildBoss (1)
CompilerNuGetCheckerUtil.cs (1)
392var assemblyName = metadataReader.GetString(assemblyReference.Name);
BuildValidator (4)
Util.cs (4)
68var @namespace = reader.GetString(typeDefinition.Namespace); 69var name = reader.GetString(typeDefinition.Name); 77var @namespace = reader.GetString(typeRef.Namespace); 78var name = reader.GetString(typeRef.Name);
Microsoft.Build.Tasks.Core (9)
AssemblyDependency\AssemblyInformation.cs (4)
506if (!string.Equals(metadataReader.GetString(name), "TargetFrameworkAttribute")) 524assemblyFiles.Add(metadataReader.GetString(metadataReader.GetAssemblyFile(fileHandle).Name)); 548Name = metadataReader.GetString(entry.Name), 550CultureName = metadataReader.GetString(entry.Culture)
ManifestUtil\MetadataReader.cs (5)
135? _reader.GetString(reference.Name) 136: _reader.GetString(reference.Namespace) + "." + _reader.GetString(reference.Name); 143string name = _reader.GetString(ad.Name); 146string culture = _reader.GetString(ad.Culture);
Microsoft.CodeAnalysis (37)
Compilation\DeterministicKeyBuilder.cs (2)
353writer.Write("name", peReader.GetString(assemblyDef.Name)); 360writer.Write("name", peReader.GetString(moduleDef.Name));
DiagnosticAnalyzer\AnalyzerFileReference.cs (1)
362return GetFullyQualifiedTypeName(declaringTypeDef, peModule) + "+" + peModule.MetadataReader.GetString(typeDef.Name);
MetadataReader\MetadataReaderExtensions.cs (2)
103string nameStr = reader.GetString(name); 109string cultureName = culture.IsNil ? null : reader.GetString(culture);
MetadataReader\PEModule.cs (30)
358_lazyName = MetadataReader.GetString(MetadataReader.GetModuleDefinition().Name); 392string moduleName = MetadataReader.GetString(file.Name); 445string resourceName = MetadataReader.GetString(resource.Name); 456return MetadataReader.GetString(MetadataReader.GetModuleReference(moduleRef).Name); 499var attributeTypeName = MetadataReader.GetString(nameHandle); 500var attributeTypeNamespaceName = MetadataReader.GetString(namespaceHandle); 529string name = MetadataReader.GetString(typeDefinition.Name); 544string namespaceName = MetadataReader.GetString(typeDefinition.Namespace); 560return MetadataReader.GetString(MetadataReader.GetTypeDefinition(typeDef).Namespace); 596name = MetadataReader.GetString(row.Name); 597@namespace = MetadataReader.GetString(row.Namespace); 2868name = MetadataReader.GetString(typeRef.Name); 2870@namespace = MetadataReader.GetString(typeRef.Namespace); 3288name = MetadataReader.GetString(row.Name); 3299return MetadataReader.GetString(MetadataReader.GetMethodDefinition(methodDef).Name); 3369name = MetadataReader.GetString(methodRow.Name); 3411string entryPointName = MetadataReader.GetString(methodImport.Name); 3435return metadataReader.GetString(metadataReader.GetMemberReference(memberRef).Name); 3459name = MetadataReader.GetString(row.Name); 3474name = MetadataReader.GetString(parameter.Name); 3482return MetadataReader.GetString(parameter.Name); 3498return MetadataReader.GetString(MetadataReader.GetPropertyDefinition(propertyDef).Name); 3514name = MetadataReader.GetString(property.Name); 3525return MetadataReader.GetString(MetadataReader.GetEventDefinition(eventDef).Name); 3536name = MetadataReader.GetString(eventRow.Name); 3548return MetadataReader.GetString(MetadataReader.GetFieldDefinition(fieldDef).Name); 3571name = MetadataReader.GetString(fieldRow.Name); 3855string name = MetadataReader.GetString(exportedType.Name); 3859string namespaceString = MetadataReader.GetString(ns); 3978return string.Equals(metadataReader.GetString(nameHandle), name, StringComparison.OrdinalIgnoreCase);
MetadataReference\AssemblyIdentityUtils.cs (2)
27string name = metadataReader.GetString(assemblyDefinition.Name); 31string? cultureName = (!cultureHandle.IsNil) ? metadataReader.GetString(cultureHandle) : null;
Microsoft.CodeAnalysis.CodeStyle (2)
src\Compilers\Core\Portable\MetadataReference\AssemblyIdentityUtils.cs (2)
27string name = metadataReader.GetString(assemblyDefinition.Name); 31string? cultureName = (!cultureHandle.IsNil) ? metadataReader.GetString(cultureHandle) : null;
Microsoft.CodeAnalysis.CSharp (4)
Emitter\EditAndContinue\PEDeltaAssemblyBuilder.cs (4)
132var key = new SynthesizedDelegateKey(reader.GetString(def.Name)); 143var name = MetadataHelpers.InferTypeArityAndUnmangleMetadataName(reader.GetString(def.Name), out _); 164var name = MetadataHelpers.InferTypeArityAndUnmangleMetadataName(reader.GetString(def.Name), out _); 210if (!GeneratedNameParser.TryParseAnonymousTypeParameterName(reader.GetString(typeParameter.Name), out var fieldName))
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (4)
CommandLineTests.cs (4)
4507Assert.Equal("aa", peReader.GetString(peReader.GetAssemblyDefinition().Name)); 4508Assert.Equal("hocusPocus", peReader.GetString(peReader.GetModuleDefinition().Name)); 7096Assert.Equal(PathUtilities.RemoveExtension(expectedOutputName), peReader.GetString(peReader.GetAssemblyDefinition().Name)); 7097Assert.Equal(expectedOutputName, peReader.GetString(peReader.GetModuleDefinition().Name));
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (20)
CodeGen\CodeGenAsyncIteratorTests.cs (2)
4215var types = metadataReader.TypeDefinitions.Select(t => metadataReader.GetString(metadataReader.GetTypeDefinition(t).Name)); 4216var type = metadataReader.TypeDefinitions.Single(t => metadataReader.GetString(metadataReader.GetTypeDefinition(t).Name) == methodName);
CodeGen\CodeGenAsyncMainTests.cs (1)
725=> metadataReader.GetString(metadataReader.GetMethodDefinition(handle).Name);
CodeGen\DestructorTests.cs (6)
776Single(pair => peFileReader.GetString(pair.row.Name) == "A" && 777string.IsNullOrEmpty(peFileReader.GetString(pair.row.Namespace))); 783Single(handle => peFileReader.GetString(peFileReader.GetMethodDefinition(handle).Name) == WellKnownMemberNames.DestructorName); 788Single(pair => peFileReader.GetString(pair.row.Name) == "Object" && 789peFileReader.GetString(pair.row.Namespace) == "System").handle; 795peFileReader.GetString(pair.row.Name) == WellKnownMemberNames.DestructorName).handle;
Emit\CompilationEmitTests.cs (11)
4031Assert.Equal(name, peReader.GetString(peReader.GetAssemblyDefinition().Name)); 4032Assert.Equal(nameWithExtension, peReader.GetString(peReader.GetModuleDefinition().Name)); 4067Assert.Equal(module.Name, peReader.GetString(peReader.GetModuleDefinition().Name)); 4097Assert.Equal(nameOverride, peReader.GetString(peReader.GetAssemblyDefinition().Name)); 4098Assert.Equal(module.Name, peReader.GetString(peReader.GetModuleDefinition().Name)); 4128Assert.Equal(nameOverride, peReader.GetString(peReader.GetAssemblyDefinition().Name)); 4129Assert.Equal(module.Name, peReader.GetString(peReader.GetModuleDefinition().Name)); 4159Assert.Equal(nameOverride, peReader.GetString(peReader.GetAssemblyDefinition().Name)); 4160Assert.Equal(module.Name, peReader.GetString(peReader.GetModuleDefinition().Name)); 4190Assert.Equal(nameOverride, peReader.GetString(peReader.GetAssemblyDefinition().Name)); 4191Assert.Equal(module.Name, peReader.GetString(peReader.GetModuleDefinition().Name));
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (4)
Emit\EditAndContinue\EditAndContinueTestBase.cs (1)
235var attributeData = readers[blobGeneration].GetString(genHandle);
PDB\PDBTests.cs (1)
688Assert.Equal("Main", mdReader.GetString(methodDef.Name));
PDB\PortablePdbTests.cs (1)
58var name = mdReader.GetString(method.Name);
PDB\TypeDefinitionDocumentTests.cs (1)
487return metadataReader.GetString(type.Name);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (26)
Attributes\AttributeTests_Assembly.cs (1)
954Assert.Equal(strData, peReader.GetString(row.Culture));
Attributes\AttributeTests_Tuples.cs (2)
896var name = reader.GetString(def.Name); 993var name = reader.GetString(def.Name);
Attributes\AttributeTests_WellKnownAttributes.cs (23)
47var name = metadataReader.GetString(type.Name); 63var name = metadataReader.GetString(method.Name); 1101string name = metadataReader.GetString(paramRow.Name); 1149string methodName = metadataReader.GetString(methodDef.Name); 1154string paramName = metadataReader.GetString(paramRow.Name); 1190string name = metadataReader.GetString(paramRow.Name); 2141string name = metadataReader.GetString(row.Name); 2320string name = metadataReader.GetString(row.Name); 2375string name = metadataReader.GetString(row.Name); 2644string moduleName = metadataReader.GetString(metadataReader.GetModuleReference(import.Module).Name); 2695Assert.Equal("mscorlib", metadataReader.GetString(moduleRefName)); 2818string moduleName = metadataReader.GetString(metadataReader.GetModuleReference(method.GetImport().Module).Name); 3079string methodName = peReader.GetString(methodDef.Name); 3153string methodName = metadataReader.GetString(methodDef.Name); 3287var name = peReader.GetString(row.Name); 3473var name = metadataReader.GetString(def.Name); 3556var name = metadataReader.GetString(row.Name); 4716var name = metadataReader.GetString(row.Name); 4743var name = metadataReader.GetString(field.Name); 4825var name = metadataReader.GetString(row.Name); 4851var name = metadataReader.GetString(field.Name); 10704var name = peReader.GetString(type.Name); 10725var name = peReader.GetString(method.Name);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (4)
Symbols\Metadata\PE\TypeForwarders.cs (4)
1804Assert.Equal(expectedType.Split('+').Last(), reader.GetString(exportedTypeRow.Name)); //Only the actual type name. 1805Assert.Equal("", reader.GetString(exportedTypeRow.Namespace)); //Empty - presumably there's enough info on the containing type. 1812Assert.Equal(expectedType, reader.GetString(exportedTypeRow.Name)); 1813Assert.Equal(expectedNamespace, reader.GetString(exportedTypeRow.Namespace));
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
EmitMetadataTestBase.cs (2)
145name = metadataReader.GetString(metadataReader.GetTypeDefinition((TypeDefinitionHandle)token).Name); 150name = metadataReader.GetString(metadataReader.GetMethodDefinition((MethodDefinitionHandle)token).Name);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Emit\CompilationOutputFilesTests.cs (1)
53Assert.Equal("lib", mdReader.GetString(mdReader.GetAssemblyDefinition().Name));
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (3)
MetadataUtilities.cs (1)
345var name = reader.GetString(assemblyFile.Name);
PDB\MethodDebugInfo.Portable.cs (2)
182localVariableNamesBuilder.SetItem(variable.Index, reader.GetString(variable.Name)); 207var name = reader.GetString(constant.Name);
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver (6)
MetadataDecoder.cs (3)
221return CreateTypeSignature(qualifier, _reader.GetString(typeDef.Name), typeArguments, ref typeArgumentOffset); 247return CreateTypeSignature(qualifier, _reader.GetString(typeRef.Name), typeArguments, ref typeArgumentOffset); 252var namespaceName = _reader.GetString(namespaceHandle);
MetadataResolver.cs (3)
162var namespaceName = _reader.GetString(typeDef.Namespace); 193var typeName = RemoveAritySeparatorIfAny(_reader.GetString(typeDef.Name)); 284var metadataName = _reader.GetString(memberName);
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver.UnitTests (5)
FunctionResolverTestBase.cs (5)
48builder.Append(reader.GetString(methodDef.Name)); 69return ImmutableArray.CreateRange(handles.Select(h => reader.GetString(reader.GetGenericParameter(h).Name))); 79var namespaceName = reader.GetString(typeDef.Namespace); 93var typeName = reader.GetString(typeDef.Name); 207builder.Add(reader.GetString(typeParameter.Name));
Microsoft.CodeAnalysis.Features (3)
PdbSourceDocument\ImplementationAssemblyLookupService.cs (3)
207assemblyName = md.GetString(assemblyReference.Name); 212var foundNamespace = md.GetString(et.Namespace); 213var foundTypeName = md.GetString(et.Name);
Microsoft.CodeAnalysis.Rebuild (4)
CompilationOptionsReader.cs (4)
146var methodName = mdReader.GetString(methodDefinition.Name); 158var typeName = mdReader.GetString(typeDefinition.Name); 161var namespaceName = mdReader.GetString(typeDefinition.Namespace); 271var name = metadataReader.GetString(resource.Name);
Microsoft.CodeAnalysis.Test.Utilities (28)
CompilationVerifier.cs (2)
242if (metadataReader.GetString(typeDef.Name) == typeName) 430var methodName = metadataReader.GetString(metadataReader.GetMethodDefinition(method).Name);
Metadata\AggregatedMetadataReader.cs (1)
43public string GetString(StringHandle handle) => GetValue(handle, (r, h) => r.GetString((StringHandle)h));
Metadata\MetadataReaderUtils.cs (16)
95return reader.GetString(MetadataTokens.StringHandle(index)); 231return reader.GetString(strHandle); 312.Select(row => $"{reader.GetString(row.Name)} {row.Version.Major}.{row.Version.Minor}"); 319.Select(t => $"{reader.GetString(t.Name)}, {reader.GetString(t.Namespace)}, {reader.Dump(t.ResolutionScope)}"); 341return reader.GetString(reader.GetAssemblyReference((AssemblyReferenceHandle)handle).Name); 354return $"{signature.ReturnType} {DumpRec(reader, method.GetDeclaringType())}.{reader.GetString(method.Name)}({parameters})"; 363return $"{signature.ReturnType} {DumpRec(reader, member.Parent)}.{reader.GetString(member.Name)}({parameters})"; 373var name = reader.GetString(field.Name); 396string name = reader.GetString(rightHandle); 399name = reader.GetString(leftHandle) + "." + name; 445var name = reader.GetString(typeDef.Name); 446return typeDef.Namespace.IsNil ? name : reader.GetString(typeDef.Namespace) + "." + name; 452var name = reader.GetString(typeRef.Name); 453return typeRef.Namespace.IsNil ? name : reader.GetString(typeRef.Namespace) + "." + name; 477.Select(n => metadataReader.GetString(n)),
Metadata\MetadataValidation.cs (9)
34return metadataReader.GetString(name); 40return metadataReader.GetString(name); 83string fieldName = metadataReader.GetString(field.Name); 109string memberName = metadataReader.GetString(methodDef.Name); 113string paramName = metadataReader.GetString(paramRow.Name); 144var ns = metadataReader.GetString(typeDef.Namespace); 145var name = metadataReader.GetString(typeDef.Name); 156var ns = metadataReader.GetString(typeDef.Namespace); 157var name = metadataReader.GetString(typeDef.Name);
Microsoft.CodeAnalysis.VisualBasic (1)
Emit\EditAndContinue\PEDeltaAssemblyBuilder.vb (1)
133Dim metadataName = reader.GetString(def.Name)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (5)
Emit\CompilationEmitTests.vb (2)
2592Dim name As String = metadataReader.GetString(typeDefRow.Name) 2608Dim name = metadataReader.GetString(metadataReader.GetMethodDefinition(methodDef).Name)
Emit\EditAndContinue\EditAndContinueTests.vb (1)
5264Select Case md0.MetadataReader.GetString(md0.MetadataReader.GetMethodDefinition(m).Name)
PDB\PDBTests.vb (1)
157Assert.Equal("Main", mdReader.GetString(methodDef.Name))
PDB\TypeDefinitionDocumentTests.vb (1)
370Return metadataReader.GetString(type.Name)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (4)
Semantics\FieldInitializerBindingTests.vb (4)
905Dim name = reader.GetString(field.Name) 973Dim name = reader.GetString(field.Name) 1313Dim name = reader.GetString(paramRow.Name) 1339Dim name = reader.GetString(reader.GetParameter(paramDef).Name)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (4)
SymbolsTests\Metadata\PE\TypeForwarders.vb (4)
1230Assert.Equal(expectedType.Split("+"c).Last(), reader.GetString(exportedTypeRow.Name)) 'Only the actual type name. 1231Assert.Equal("", reader.GetString(exportedTypeRow.Namespace)) 'Empty - presumably there's enough info on the containing type. 1236Assert.Equal(expectedType, reader.GetString(exportedTypeRow.Name)) 1237Assert.Equal(expectedNamespace, reader.GetString(exportedTypeRow.Namespace))
Microsoft.CodeAnalysis.Workspaces (8)
FindSymbols\SymbolTree\SymbolTreeInfo.Node.cs (2)
133var name = reader.GetString(type.Name); 140var name = reader.GetString(type.Name);
FindSymbols\SymbolTree\SymbolTreeInfo_Metadata.cs (4)
60return reader.GetString(name); 459var definition = new MetadataDefinition(MetadataDefinitionKind.Member, metadataReader.GetString(method.Name), firstParameterTypeInfo); 669simpleNames.Add(metadataReader.GetString(namespaceDefinition.Name)); 845reader.GetString(definition.Name),
src\Compilers\Core\Portable\MetadataReference\AssemblyIdentityUtils.cs (2)
27string name = metadataReader.GetString(assemblyDefinition.Name); 31string? cultureName = (!cultureHandle.IsNil) ? metadataReader.GetString(cultureHandle) : null;
Microsoft.DotNet.Build.Tasks.Packaging (2)
GetAssemblyReferences.cs (2)
62TaskItem referenceItem = new TaskItem(reader.GetString(reference.Name)); 72var moduleName = reader.GetString(moduleRef.Name);
Microsoft.DotNet.GenFacades (3)
GenPartialFacadeSourceGenerator.cs (3)
134return namespaceHandle.IsNil ? reader.GetString(typeHandle) : reader.GetString(namespaceHandle) + "." + reader.GetString(typeHandle);
Microsoft.DotNet.PackageTesting (7)
VerifyClosure.cs (3)
438var name = contractReader.GetString(assembly.Name); 463references[i] = new AssemblyReference(reader.GetString(reference.Name), reference.Version); 477var moduleName = reader.GetString(moduleRef.Name);
VerifyTypes.cs (4)
159var name = contractReader.GetString(assembly.Name); 197? reader.GetString(definition.Name) 198: reader.GetString(definition.Namespace) + "." + reader.GetString(definition.Name);
Microsoft.DotNet.SharedFramework.Sdk (7)
src\Microsoft.DotNet.PackageTesting\VerifyClosure.cs (3)
438var name = contractReader.GetString(assembly.Name); 463references[i] = new AssemblyReference(reader.GetString(reference.Name), reference.Version); 477var moduleName = reader.GetString(moduleRef.Name);
src\Microsoft.DotNet.PackageTesting\VerifyTypes.cs (4)
159var name = contractReader.GetString(assembly.Name); 197? reader.GetString(definition.Name) 198: reader.GetString(definition.Namespace) + "." + reader.GetString(definition.Name);
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (2)
ProjectSystemShim\VisualStudioCompilationOutputFilesTests.cs (2)
63Assert.Equal("lib", mdReader.GetString(mdReader.GetAssemblyDefinition().Name)); 102Assert.Equal("lib", mdReader.GetString(mdReader.GetAssemblyDefinition().Name));
Roslyn.Test.PdbUtilities (9)
EditAndContinue\EditAndContinueTestUtilities.cs (1)
116return readers[nameGeneration].GetString(genNameHandle);
Shared\DummyMetadataImport.cs (8)
98qualifiedName.Append(_metadataReaderOpt.GetString(typeDef.Namespace)); 102qualifiedName.Append(_metadataReaderOpt.GetString(typeDef.Name)); 108(typeDef.Namespace.IsNil ? 0 : _metadataReaderOpt.GetString(typeDef.Namespace).Length + 1) + 109_metadataReaderOpt.GetString(typeDef.Name).Length; 137qualifiedName.Append(_metadataReaderOpt.GetString(typeRef.Namespace)); 141qualifiedName.Append(_metadataReaderOpt.GetString(typeRef.Name)); 147(typeRef.Namespace.IsNil ? 0 : _metadataReaderOpt.GetString(typeRef.Namespace).Length + 1) + 148_metadataReaderOpt.GetString(typeRef.Name).Length;
RunTests (1)
AssemblyScheduler.cs (1)
360var typeName = metadataReader.GetString(typeNameHandle);
System.Diagnostics.FileVersionInfo (1)
System\Diagnostics\FileVersionInfo.Unix.cs (1)
83string assemblyName = metadataReader.GetString(assemblyDefinition.Name);
System.Reflection.Metadata (2)
System\Reflection\Metadata\MetadataReader.netstandard.cs (2)
16string name = GetString(nameHandle); 18string cultureName = (!cultureHandle.IsNil) ? GetString(cultureHandle) : "";
System.Reflection.MetadataLoadContext (2)
System\Reflection\TypeLoading\General\Ecma\MetadataExtensions.cs (2)
51public static string GetString(this StringHandle handle, MetadataReader reader) => reader.GetString(handle); 74public static string? GetStringOrNull(this StringHandle handle, MetadataReader reader) => handle.IsNil ? null : reader.GetString(handle);
System.Windows.Forms.Design.Tests (2)
SystemDesignMetadataReader.cs (2)
32string ns = metadataReader.GetString(type.Namespace); 33string name = metadataReader.GetString(type.Name);