示例#1
0
 public abstract int Update(TrackedObject item);
示例#2
0
        private static int Compare(TrackedObject x, int xOrdinal, TrackedObject y, int yOrdinal)
        {
            if (x == y)
            {
                return(0);
            }
            if (x == null)
            {
                return(-1);
            }
            if (y == null)
            {
                return(1);
            }
            int num  = x.IsNew ? 0 : (x.IsDeleted ? 2 : 1);
            int num2 = y.IsNew ? 0 : (y.IsDeleted ? 2 : 1);

            if (num < num2)
            {
                return(-1);
            }
            if (num > num2)
            {
                return(1);
            }
            if (!x.IsNew)
            {
                if (x.Type != y.Type)
                {
                    //------------------------------ SOURCE CODE ---------------------------------
                    //return string.CompareOrdinal(x.Type.Type.FullName, y.Type.Type.FullName);
                    //------------------------------  MY CODE ------------------------------------
                    return(xOrdinal > yOrdinal ? 1 : -1);
                    //----------------------------------------------------------------------------
                }
                foreach (MetaDataMember member in x.Type.IdentityMembers)
                {
                    object boxedValue = member.StorageAccessor.GetBoxedValue(x.Current);
                    object obj3       = member.StorageAccessor.GetBoxedValue(y.Current);
                    if (boxedValue == null)
                    {
                        if (obj3 != null)
                        {
                            return(-1);
                        }
                    }
                    else
                    {
                        IComparable comparable = boxedValue as IComparable;
                        if (comparable != null)
                        {
                            int num3 = comparable.CompareTo(obj3);
                            if (num3 != 0)
                            {
                                return(num3);
                            }
                        }
                    }
                }
            }
            return(xOrdinal.CompareTo(yOrdinal));
        }
示例#3
0
 public abstract int Insert(TrackedObject item);
示例#4
0
 public abstract int DynamicUpdate(TrackedObject item);
示例#5
0
 public abstract int DynamicInsert(TrackedObject item);
示例#6
0
 public abstract int DynamicDelete(TrackedObject item);
示例#7
0
 internal abstract void AppendUpdateText(TrackedObject item, StringBuilder appendTo);