コード例 #1
0
ファイル: ImportReference.cs プロジェクト: erenes/reko
 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
ファイル: ImportReference.cs プロジェクト: erenes/reko
        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
ファイル: ImportReference.cs プロジェクト: fengjixuchui/reko
        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));
        }