Esempio n. 1
0
 /// <summary>
 /// Validates an identifier
 /// </summary>
 /// <param name="proposedIdentifier">The identifier to validate</param>
 /// <param name="forType">Indicates whether this is a type name. Periods
 /// are allowed in type names because of namespaces but not anywhere else.</param>
 internal void ValidateIdentifier(string proposedIdentifier, bool forType)
 {
     if (!IdentifierValidator.IsValidIdentifier(proposedIdentifier, forType))
     {
         _errors.Add($"Identifier {proposedIdentifier} is not valid.");
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="tb">TypeBuilder</param>
 internal TypeSpecifier(TypeBuilder tb)
 {
     _identifiers = new IdentifierValidator(tb.FullName);
     TypeBuilder  = tb;
 }