public ITypeReference ToTypeReference() { ITypeDefinition declTypeDef = this.DeclaringTypeDefinition; if (declTypeDef != null) { return(new NestedTypeReference(declTypeDef.ToTypeReference(), this.Name, this.TypeParameterCount - declTypeDef.TypeParameterCount, this.IsReferenceType)); } else { IAssembly asm = this.ParentAssembly; IAssemblyReference asmRef; if (asm != null) { asmRef = new DefaultAssemblyReference(asm.AssemblyName); } else { asmRef = null; } return(new GetClassTypeReference(asmRef, this.Namespace, this.Name, this.TypeParameterCount, this.IsReferenceType)); } }
bool ISupportsInterning.EqualsForInterning(ISupportsInterning other) { DefaultAssemblyReference o = other as DefaultAssemblyReference; return(o != null && shortName == o.shortName); }