// Token: 0x060075B3 RID: 30131 RVA: 0x00219A70 File Offset: 0x00217C70
        internal int CompareLiveShapingItems(LiveShapingItem x, LiveShapingItem y)
        {
            if (x == y || ItemsControl.EqualsEx(x.Item, y.Item))
            {
                return(0);
            }
            int num = 0;

            if (!this._isCustomSorting)
            {
                SortFieldComparer         sortFieldComparer = this._comparer as SortFieldComparer;
                SortDescriptionCollection sortDescriptions  = ((ICollectionView)this.View).SortDescriptions;
                int num2 = this._compInfos.Length;
                for (int i = 0; i < num2; i++)
                {
                    object value  = x.GetValue(this._compInfos[i].Path, this._compInfos[i].Property);
                    object value2 = y.GetValue(this._compInfos[i].Path, this._compInfos[i].Property);
                    num = sortFieldComparer.BaseComparer.Compare(value, value2);
                    if (sortDescriptions[i].Direction == ListSortDirection.Descending)
                    {
                        num = -num;
                    }
                    if (num != 0)
                    {
                        break;
                    }
                }
            }
            else
            {
                num = this._comparer.Compare(x.Item, y.Item);
            }
            return(num);
        }
        internal int CompareLiveShapingItems(LiveShapingItem x, LiveShapingItem y)
        {
            #if LiveShapingInstrumentation
            ++_comparisons;
            #endif

            if (x == y || Object.Equals(x.Item, y.Item))
            {
                return(0);
            }

            int result = 0;

            if (!_isCustomSorting)
            {
                // intercept SortFieldComparer, and do the comparisons here.
                // The LiveShapingItems will cache the field values.
                SortFieldComparer         sfc = _comparer as SortFieldComparer;
                SortDescriptionCollection sdc = ((ICollectionView)View).SortDescriptions;
                Debug.Assert(sdc.Count >= _compInfos.Length, "SortDescriptions don't match LivePropertyInfos");
                int n = _compInfos.Length;

                for (int k = 0; k < n; ++k)
                {
                    object v1 = x.GetValue(_compInfos[k].Path, _compInfos[k].Property);
                    object v2 = y.GetValue(_compInfos[k].Path, _compInfos[k].Property);

                    result = sfc.BaseComparer.Compare(v1, v2);
                    if (sdc[k].Direction == ListSortDirection.Descending)
                    {
                        result = -result;
                    }

                    if (result != 0)
                    {
                        break;
                    }
                }
            }
            else
            {
                // for custom comparers, just compare items the normal way
                result = _comparer.Compare(x.Item, y.Item);
            }

            return(result);
        }