Exemplo n.º 1
0
 public override void WriteId(TextWriter trapFile)
 {
     if (ParentNamespace != null && !ParentNamespace.IsGlobalNamespace)
     {
         ParentNamespace.WriteId(trapFile);
         trapFile.Write('.');
     }
     trapFile.Write(Name);
 }
Exemplo n.º 2
0
 public override void WriteId(EscapingTextWriter trapFile)
 {
     if (ParentNamespace is not null && !ParentNamespace.IsGlobalNamespace)
     {
         ParentNamespace.WriteId(trapFile);
         trapFile.Write('.');
     }
     trapFile.Write(Name);
     trapFile.Write(";namespace");
 }
Exemplo n.º 3
0
 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;
 }
Exemplo n.º 4
0
 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);
 }
Exemplo n.º 5
0
        public override int GetHashCode()
        {
            var h = ParentNamespace is null ? 19 : ParentNamespace.GetHashCode();

            return(13 * h + Name.GetHashCode());
        }