Ejemplo n.º 1
0
        public static IGeneralTypeUniqueIdentifier GetTypeIdentifier(IGeneralDeclarationUniqueIdentifier @namespace, string name, string languageSpecificQualifier)
        {
            var result = GetTypeIdentifier(@namespace, name);

            ((DefaultTypeUniqueIdentifier)(result)).LanguageSpecificQualifier = languageSpecificQualifier;
            return(result);
        }
        protected virtual void OnIdentifierChanged(IGeneralDeclarationUniqueIdentifier oldIdentifier, DeclarationChangeCause cause)
        {
            this.uniqueIdentifier = null;
            var newIdentifier     = this.UniqueIdentifier;
            var identifierChanged = this.IdentifierChanged;

            if (identifierChanged != null)
            {
                identifierChanged(this, new DeclarationIdentifierChangeEventArgs <IGeneralDeclarationUniqueIdentifier>(oldIdentifier, newIdentifier, cause));
            }
        }
Ejemplo n.º 3
0
 public static IGeneralTypeUniqueIdentifier GetTypeIdentifier(IGeneralDeclarationUniqueIdentifier @namespace, string name)
 {
     if (name.Contains('`'))
     {
         var lastGrave  = name.LastIndexOf('`');
         var typeParams = name.Substring(lastGrave + 1);
         int typeParamCount;
         if (int.TryParse(typeParams, out typeParamCount))
         {
             return(GetTypeIdentifier(@namespace, name, typeParamCount));
         }
     }
     return(new DefaultTypeUniqueIdentifier(name, assembly: null, @namespace: @namespace));
 }
Ejemplo n.º 4
0
 public static IGeneralGenericTypeUniqueIdentifier GetTypeIdentifier(IGeneralDeclarationUniqueIdentifier @namespace, string name, int typeParameters)
 {
     return(new DefaultGenericTypeUniqueIdentifier(name, typeParameters, assembly: null, @namespace: @namespace));
 }