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)
406MetadataHelpers.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)
354MetadataHelpers.CheckAssemblyOrModuleName(OutputNameOverride, messageProvider, messageProvider.ERR_InvalidOutputName, diagnostics);
Emit\NoPia\EmbeddedTypesManager.cs (1)
141if (namesOfTopLevelTypes.Contains(MetadataHelpers.BuildQualifiedName(def.NamespaceName, def.Name)))
MetadataReader\MetadataDecoder.cs (2)
514Debug.Assert(MetadataHelpers.IsValidMetadataIdentifier(name)); 637Debug.Assert(MetadataHelpers.IsValidMetadataIdentifier(name));
MetadataReader\MetadataHelpers.cs (1)
1045fullyQualified[namespaceName.Length] == MetadataHelpers.DotDelimiter &&
MetadataReader\MetadataReaderExtensions.cs (4)
104if (!MetadataHelpers.IsValidMetadataIdentifier(nameStr)) 110if (cultureName != null && !MetadataHelpers.IsValidMetadataIdentifier(cultureName)) 123if (!MetadataHelpers.IsValidPublicKey(publicKeyOrToken)) 144if (hasPublicKey && !MetadataHelpers.IsValidPublicKey(publicKeyOrToken))
MetadataReader\MetadataTypeName.cs (12)
98forcedArity == MetadataHelpers.InferTypeArityFromMetadataName(fullName), 127Debug.Assert(!typeName.Contains(MetadataHelpers.DotDelimiterString)); 130forcedArity == MetadataHelpers.InferTypeArityFromMetadataName(typeName), 154Debug.Assert(!typeName.Contains(MetadataHelpers.DotDelimiterString) || typeName.IndexOf(MetadataHelpers.MangledNameRegionStartChar) >= 0); 158forcedArity == 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)
81return MetadataHelpers.SplitNameEqualsFullyQualifiedName(other._namespaceOrFullyQualifiedName, other._typeName, _namespaceOrFullyQualifiedName); 86return MetadataHelpers.SplitNameEqualsFullyQualifiedName(_namespaceOrFullyQualifiedName, _typeName, other._namespaceOrFullyQualifiedName); 110hashCode = Hash.CombineFNVHash(hashCode, MetadataHelpers.DotDelimiter);
MetadataReader\PEModule.cs (4)
393if (!MetadataHelpers.IsValidMetadataFileName(moduleName)) 502return MetadataHelpers.BuildQualifiedName(attributeTypeNamespaceName, attributeTypeName); 530Debug.Assert(name.Length == 0 || MetadataHelpers.IsValidMetadataIdentifier(name)); // Obfuscated assemblies can have types with empty names. 2864Debug.Assert(MetadataHelpers.IsValidMetadataIdentifier(name));
MetadataReader\TypeNameDecoder.cs (6)
55MetadataHelpers.AssemblyQualifiedTypeName fullName = MetadataHelpers.DecodeTypeName(s); 115internal TypeSymbol GetTypeSymbol(MetadataHelpers.AssemblyQualifiedTypeName fullName, out bool refersToNoPiaLocalType) 157Debug.Assert(MetadataHelpers.IsValidMetadataIdentifier(fullName.TopLevelType)); 173Debug.Assert(MetadataHelpers.IsValidMetadataIdentifier(fullName.NestedTypes[i])); 221private ImmutableArray<KeyValuePair<TypeSymbol, ImmutableArray<ModifierInfo<TypeSymbol>>>> ResolveTypeArguments(MetadataHelpers.AssemblyQualifiedTypeName[] arguments, out ImmutableArray<bool> refersToNoPiaLocalType)
MetadataReference\AssemblyIdentity.cs (3)
129if (!MetadataHelpers.IsValidPublicKey(publicKeyOrToken)) 167Debug.Assert((hasPublicKey && MetadataHelpers.IsValidPublicKey(publicKeyOrToken)) || (!hasPublicKey && (publicKeyOrToken.IsDefaultOrEmpty || publicKeyOrToken.Length == PublicKeyTokenSize))); 189Debug.Assert((hasPublicKey && MetadataHelpers.IsValidPublicKey(publicKeyOrToken)) || (!hasPublicKey && (publicKeyOrToken.IsDefaultOrEmpty || publicKeyOrToken.Length == PublicKeyTokenSize)));
MetadataReference\AssemblyIdentity.DisplayName.cs (1)
668!MetadataHelpers.IsValidPublicKey(key))
PEWriter\MetadataWriter.cs (2)
885result |= MetadataHelpers.GenericParameterAttributesAllowByRefLike; 916? MetadataHelpers.ComposeAritySuffixedMetadataName(nameWithGeneration, namedType.GenericParameterCount, fileIdentifier)
PEWriter\TypeNameSerializer.cs (1)
231mangledName.Append(MetadataHelpers.GetAritySuffix(namedType.GenericParameterCount));
ResourceDescription.cs (2)
74if (!MetadataHelpers.IsValidMetadataIdentifier(resourceName)) 86if (!MetadataHelpers.IsValidMetadataFileName(fileName))
StrongName\StrongNameKeys.cs (2)
92if (MetadataHelpers.IsValidPublicKey(publicKey)) 144if (MetadataHelpers.IsValidPublicKey(keyFileContent))
Symbols\Attributes\MarshalAsAttributeDecoder.cs (2)
132if (!MetadataHelpers.IsValidUnicodeString(typeName)) 148if (!MetadataHelpers.IsValidUnicodeString(cookie))