public int Compare(object x, object y) { ObjectListSourceItem objectListSourceItem = x as ObjectListSourceItem; ObjectListSourceItem objectListSourceItem2 = y as ObjectListSourceItem; if (objectListSourceItem != null) { int num = objectListSourceItem.CompareTo(objectListSourceItem2); if (num != 0) { if (CeipCommon.IndustryTypeEnumListSource.CompareIndustryType(objectListSourceItem.Value, IndustryType.NotSpecified) || CeipCommon.IndustryTypeEnumListSource.CompareIndustryType(objectListSourceItem2.Value, IndustryType.Other)) { num = -1; } else if (CeipCommon.IndustryTypeEnumListSource.CompareIndustryType(objectListSourceItem.Value, IndustryType.Other) || CeipCommon.IndustryTypeEnumListSource.CompareIndustryType(objectListSourceItem2.Value, IndustryType.NotSpecified)) { num = 1; } } return(num); } if (objectListSourceItem2 != null) { return(-1); } return(0); }
public int CompareTo(object obj) { if (obj == null) { return(1); } ObjectListSourceItem objectListSourceItem = obj as ObjectListSourceItem; if (objectListSourceItem == null) { throw new ArgumentException(); } return(this.Text.CompareTo(objectListSourceItem.Text)); }
public override bool Equals(object obj) { ObjectListSourceItem objectListSourceItem = obj as ObjectListSourceItem; return(objectListSourceItem != null && this.Value.Equals(objectListSourceItem.Value)); }