53 references to MetadataHelpers
Microsoft.CodeAnalysis (53)
CodeGen\PrivateImplementationDetails.cs (1)
130
$"{TypeNamePrefix}<{
MetadataHelpers
.MangleForTypeNameIfNeeded(moduleName)}>" : TypeNamePrefix;
CommandLine\CommandLineParser.cs (3)
307
!
MetadataHelpers
.IsValidMetadataIdentifier(outputDirectory) ||
308
!
MetadataHelpers
.IsValidMetadataIdentifier(outputFileName))
432
!
MetadataHelpers
.IsValidAssemblyOrModuleName(outputFileName))
Compilation\Compilation.cs (1)
414
MetadataHelpers
.CheckAssemblyOrModuleName(this.AssemblyName, MessageProvider, MessageProvider.ERR_BadAssemblyName, diagnostics);
Emit\CommonPEModuleBuilder.cs (1)
712
=> names?.Add(
MetadataHelpers
.BuildQualifiedName(type.NamespaceName, Cci.MetadataWriter.GetMetadataName(type, generation: 0)));
Emit\EmitOptions.cs (1)
354
MetadataHelpers
.CheckAssemblyOrModuleName(OutputNameOverride, messageProvider, messageProvider.ERR_InvalidOutputName, diagnostics);
Emit\NoPia\EmbeddedTypesManager.cs (1)
141
if (namesOfTopLevelTypes.Contains(
MetadataHelpers
.BuildQualifiedName(def.NamespaceName, def.Name)))
MetadataReader\MetadataDecoder.cs (2)
514
Debug.Assert(
MetadataHelpers
.IsValidMetadataIdentifier(name));
637
Debug.Assert(
MetadataHelpers
.IsValidMetadataIdentifier(name));
MetadataReader\MetadataHelpers.cs (1)
1045
fullyQualified[namespaceName.Length] ==
MetadataHelpers
.DotDelimiter &&
MetadataReader\MetadataReaderExtensions.cs (4)
104
if (!
MetadataHelpers
.IsValidMetadataIdentifier(nameStr))
110
if (cultureName != null && !
MetadataHelpers
.IsValidMetadataIdentifier(cultureName))
123
if (!
MetadataHelpers
.IsValidPublicKey(publicKeyOrToken))
144
if (hasPublicKey && !
MetadataHelpers
.IsValidPublicKey(publicKeyOrToken))
MetadataReader\MetadataTypeName.cs (12)
98
forcedArity ==
MetadataHelpers
.InferTypeArityFromMetadataName(fullName),
127
Debug.Assert(!typeName.Contains(
MetadataHelpers
.DotDelimiterString));
130
forcedArity ==
MetadataHelpers
.InferTypeArityFromMetadataName(typeName),
154
Debug.Assert(!typeName.Contains(
MetadataHelpers
.DotDelimiterString) || typeName.IndexOf(
MetadataHelpers
.MangledNameRegionStartChar) >= 0);
158
forcedArity ==
MetadataHelpers
.InferTypeArityFromMetadataName(typeName),
190
_fullName =
MetadataHelpers
.BuildQualifiedName(_namespaceName, _typeName);
205
_typeNameMemory =
MetadataHelpers
.SplitQualifiedName(_fullName, out _namespaceNameMemory);
225
_typeNameMemory =
MetadataHelpers
.SplitQualifiedName(_fullName, out _namespaceNameMemory);
245
_unmangledTypeNameMemory =
MetadataHelpers
.InferTypeArityAndUnmangleMetadataName(TypeNameMemory, out _inferredArity);
281
_unmangledTypeNameMemory =
MetadataHelpers
.InferTypeArityAndUnmangleMetadataName(TypeNameMemory, out _inferredArity);
334
_namespaceSegmentsMemory =
MetadataHelpers
.SplitQualifiedName(NamespaceNameMemory);
MetadataReader\MetadataTypeName.Key.cs (3)
81
return
MetadataHelpers
.SplitNameEqualsFullyQualifiedName(other._namespaceOrFullyQualifiedName, other._typeName, _namespaceOrFullyQualifiedName);
86
return
MetadataHelpers
.SplitNameEqualsFullyQualifiedName(_namespaceOrFullyQualifiedName, _typeName, other._namespaceOrFullyQualifiedName);
110
hashCode = Hash.CombineFNVHash(hashCode,
MetadataHelpers
.DotDelimiter);
MetadataReader\PEModule.cs (4)
393
if (!
MetadataHelpers
.IsValidMetadataFileName(moduleName))
502
return
MetadataHelpers
.BuildQualifiedName(attributeTypeNamespaceName, attributeTypeName);
530
Debug.Assert(name.Length == 0 ||
MetadataHelpers
.IsValidMetadataIdentifier(name)); // Obfuscated assemblies can have types with empty names.
2864
Debug.Assert(
MetadataHelpers
.IsValidMetadataIdentifier(name));
MetadataReader\TypeNameDecoder.cs (6)
55
MetadataHelpers
.AssemblyQualifiedTypeName fullName =
MetadataHelpers
.DecodeTypeName(s);
115
internal TypeSymbol GetTypeSymbol(
MetadataHelpers
.AssemblyQualifiedTypeName fullName, out bool refersToNoPiaLocalType)
157
Debug.Assert(
MetadataHelpers
.IsValidMetadataIdentifier(fullName.TopLevelType));
173
Debug.Assert(
MetadataHelpers
.IsValidMetadataIdentifier(fullName.NestedTypes[i]));
221
private ImmutableArray<KeyValuePair<TypeSymbol, ImmutableArray<ModifierInfo<TypeSymbol>>>> ResolveTypeArguments(
MetadataHelpers
.AssemblyQualifiedTypeName[] arguments, out ImmutableArray<bool> refersToNoPiaLocalType)
MetadataReference\AssemblyIdentity.cs (3)
129
if (!
MetadataHelpers
.IsValidPublicKey(publicKeyOrToken))
167
Debug.Assert((hasPublicKey &&
MetadataHelpers
.IsValidPublicKey(publicKeyOrToken)) || (!hasPublicKey && (publicKeyOrToken.IsDefaultOrEmpty || publicKeyOrToken.Length == PublicKeyTokenSize)));
189
Debug.Assert((hasPublicKey &&
MetadataHelpers
.IsValidPublicKey(publicKeyOrToken)) || (!hasPublicKey && (publicKeyOrToken.IsDefaultOrEmpty || publicKeyOrToken.Length == PublicKeyTokenSize)));
MetadataReference\AssemblyIdentity.DisplayName.cs (1)
668
!
MetadataHelpers
.IsValidPublicKey(key))
PEWriter\MetadataWriter.cs (2)
885
result |=
MetadataHelpers
.GenericParameterAttributesAllowByRefLike;
916
?
MetadataHelpers
.ComposeAritySuffixedMetadataName(nameWithGeneration, namedType.GenericParameterCount, fileIdentifier)
PEWriter\TypeNameSerializer.cs (1)
231
mangledName.Append(
MetadataHelpers
.GetAritySuffix(namedType.GenericParameterCount));
ResourceDescription.cs (2)
74
if (!
MetadataHelpers
.IsValidMetadataIdentifier(resourceName))
86
if (!
MetadataHelpers
.IsValidMetadataFileName(fileName))
StrongName\StrongNameKeys.cs (2)
92
if (
MetadataHelpers
.IsValidPublicKey(publicKey))
144
if (
MetadataHelpers
.IsValidPublicKey(keyFileContent))
Symbols\Attributes\MarshalAsAttributeDecoder.cs (2)
132
if (!
MetadataHelpers
.IsValidUnicodeString(typeName))
148
if (!
MetadataHelpers
.IsValidUnicodeString(cookie))