public virtual int CompareTo(MemberRef other) { var i = Flavor.CompareTo(other.Flavor); if (i != 0) { return(i); } i = DefiningType.CompareTo(other.DefiningType); if (i != 0) { return(i); } i = StringComparer.Ordinal.Compare(Name, other.Name); if (i != 0) { return(i); } return(Signature.CompareTo(other.Signature)); }
public override int CompareToSameBody(Signature other) { var otherProp = (PropertySignature)other; var i = IsStatic.CompareTo(otherProp.IsStatic); if (i != 0) { return(i); } i = Parameters.Count.CompareTo(otherProp.Parameters.Count); if (i != 0) { return(i); } for (var j = 0; j < Parameters.Count; j++) { i = Parameters[j].CompareTo(otherProp.Parameters[j]); if (i != 0) { return(i); } } return(Result.CompareTo(otherProp.Result)); }
public override int CompareToSameBody(Signature other) { var otherMeth = (MethodSignature)other; var i = IsStatic.CompareTo(otherMeth.IsStatic); if (i != 0) { return(i); } i = TypeArity.CompareTo(otherMeth.TypeArity); if (i != 0) { return(i); } i = Parameters.Count.CompareTo(otherMeth.Parameters.Count); if (i != 0) { return(i); } for (var j = 0; j < Parameters.Count; j++) { i = Parameters[j].CompareTo(otherMeth.Parameters[j]); if (i != 0) { return(i); } } if (Result == null) { return(otherMeth.Result == null ? 0 : -1); } else { return(otherMeth.Result == null ? 1 : Result.CompareTo(otherMeth.Result)); } }
public override int CompareToSameBody(Signature other) { var otherField = (FieldSignature)other; return(FieldType.CompareTo(otherField.FieldType)); }