Inheritance: ICSharpCode.NRefactory.CSharp.TypeSystem.TypeOrNamespaceReference, ISupportsInterning
Beispiel #1
0
        bool ISupportsInterning.EqualsForInterning(ISupportsInterning other)
        {
            MemberTypeOrNamespaceReference o = other as MemberTypeOrNamespaceReference;

            return(o != null && this.target == o.target &&
                   this.identifier == o.identifier && this.typeArguments == o.typeArguments);
        }
Beispiel #2
0
		internal static ITypeReference ConvertAttributeType(AstType type)
		{
			ITypeReference tr = type.ToTypeReference();
			if (!type.GetChildByRole(AstNode.Roles.Identifier).IsVerbatim) {
				// Try to add "Attribute" suffix, but only if the identifier
				// (=last identifier in fully qualified name) isn't a verbatim identifier.
				SimpleTypeOrNamespaceReference st = tr as SimpleTypeOrNamespaceReference;
				MemberTypeOrNamespaceReference mt = tr as MemberTypeOrNamespaceReference;
				if (st != null)
					return new AttributeTypeReference(st, st.AddSuffix("Attribute"));
				else if (mt != null)
					return new AttributeTypeReference(mt, mt.AddSuffix("Attribute"));
			}
			return tr;
		}