示例#1
0
 //-------------------------------------------------------------------------
 /// <summary>
 /// Compares this name to another.
 /// <para>
 /// Instances are compared in alphabetical order based on the name, taking into account the implementation type.
 ///
 /// </para>
 /// </summary>
 /// <param name="other">  the object to compare to </param>
 /// <returns> the comparison </returns>
 public virtual int compareTo <T1>(MarketDataName <T1> other)
 {
     if (this.GetType() == other.GetType())
     {
         return(Name.CompareTo(other.Name));
     }
     return(compareSlow(other));
 }
示例#2
0
        // compare when classes differ, broken out for inlining
        private int compareSlow <T1>(MarketDataName <T1> other)
        {
//JAVA TO C# CONVERTER WARNING: The .NET Type.FullName property will not always yield results identical to the Java Class.getName method:
            return(ComparisonChain.start().compare(this.GetType().FullName, other.GetType().FullName).compare(Name, other.Name).result());
        }