示例#1
0
 public override int CompareTo(ImportReference that)
 {
     if (this.GetType() != that.GetType())
     {
         return(this.GetType().FullName.CompareTo(this.GetType().FullName));
     }
     if (this.ModuleName == null)
     {
         if (that.ModuleName != null)
         {
             return(-1);
         }
     }
     else if (this.ModuleName != null)
     {
         if (that.ModuleName == null)
         {
             return(1);
         }
     }
     else
     {
         int cmp = this.ModuleName.CompareTo(that.ModuleName);
         if (cmp != 0)
         {
             return(cmp);
         }
     }
     return(string.Compare(
                this.ImportName,
                ((NamedImportReference)that).ImportName,
                StringComparison.InvariantCulture));
 }
示例#2
0
        public override int CompareTo(ImportReference that)
        {
            if (this.GetType() != that.GetType())
            {
                return(this.GetType().FullName.CompareTo(this.GetType().FullName));
            }
            int cmp = this.ModuleName.CompareTo(that.ModuleName);

            if (cmp != 0)
            {
                return(cmp);
            }
            cmp = this.Ordinal.CompareTo(((OrdinalImportReference)that).Ordinal);
            return(cmp);
        }
示例#3
0
        public override int CompareTo(ImportReference that)
        {
            if (this.GetType() != that.GetType())
            {
                return(this.GetType().FullName.CompareTo(this.GetType().FullName));
            }
            System.Diagnostics.Debugger.Break();
            int cmp = CompareModuleNames(that);

            if (cmp != 0)
            {
                return(cmp);
            }
            return(string.Compare(
                       this.ImportName,
                       ((NamedImportReference)that).ImportName,
                       StringComparison.InvariantCulture));
        }