public override void WriteId(TextWriter trapFile) { if (ParentNamespace != null && !ParentNamespace.IsGlobalNamespace) { ParentNamespace.WriteId(trapFile); trapFile.Write('.'); } trapFile.Write(Name); }
public override void WriteId(EscapingTextWriter trapFile) { if (ParentNamespace is not null && !ParentNamespace.IsGlobalNamespace) { ParentNamespace.WriteId(trapFile); trapFile.Write('.'); } trapFile.Write(Name); trapFile.Write(";namespace"); }
public override bool Equals(object? obj) { if (obj is Namespace ns && Name == ns.Name) { if (ParentNamespace is null) return ns.ParentNamespace is null; if (!(ns.ParentNamespace is null)) return ParentNamespace.Equals(ns.ParentNamespace); } return false; }
public override bool Equals(object?obj) { if (obj is Namespace ns && Name == ns.Name) { if (ParentNamespace is null) { return(ns.ParentNamespace is null); } if (!(ns.ParentNamespace is null)) { return(ParentNamespace.Equals(ns.ParentNamespace)); } } return(false); }
public override int GetHashCode() { var h = ParentNamespace is null ? 19 : ParentNamespace.GetHashCode(); return(13 * h + Name.GetHashCode()); }