Beispiel #1
0
    /// <summary>
    /// 复制(潜拷贝)
    /// </summary>
    protected override void toShadowCopy(BaseData data)
    {
        if (!(data is WorkReceiverData))
        {
            return;
        }

        WorkReceiverData mData = (WorkReceiverData)data;

        this.workExecuteRecordDic = mData.workExecuteRecordDic;
    }
Beispiel #2
0
    /// <summary>
    /// 是否数据一致
    /// </summary>
    protected override bool toDataEquals(BaseData data)
    {
        WorkReceiverData mData = (WorkReceiverData)data;

        if (mData.workExecuteRecordDic != null)
        {
            if (this.workExecuteRecordDic == null)
            {
                return(false);
            }
            if (this.workExecuteRecordDic.size() != mData.workExecuteRecordDic.size())
            {
                return(false);
            }
            IntObjectMap <LongLongMap> workExecuteRecordDicR = mData.workExecuteRecordDic;
            if (!this.workExecuteRecordDic.isEmpty())
            {
                int           workExecuteRecordDicKFreeValue = this.workExecuteRecordDic.getFreeValue();
                int[]         workExecuteRecordDicKKeys      = this.workExecuteRecordDic.getKeys();
                LongLongMap[] workExecuteRecordDicVValues    = this.workExecuteRecordDic.getValues();
                for (int workExecuteRecordDicKI = workExecuteRecordDicKKeys.Length - 1; workExecuteRecordDicKI >= 0; --workExecuteRecordDicKI)
                {
                    int workExecuteRecordDicK = workExecuteRecordDicKKeys[workExecuteRecordDicKI];
                    if (workExecuteRecordDicK != workExecuteRecordDicKFreeValue)
                    {
                        LongLongMap workExecuteRecordDicV = workExecuteRecordDicVValues[workExecuteRecordDicKI];
                        LongLongMap workExecuteRecordDicU = workExecuteRecordDicR.get(workExecuteRecordDicK);
                        if (workExecuteRecordDicU != null)
                        {
                            if (workExecuteRecordDicV == null)
                            {
                                return(false);
                            }
                            if (workExecuteRecordDicV.size() != workExecuteRecordDicU.size())
                            {
                                return(false);
                            }
                            LongLongMap workExecuteRecordDicVR = workExecuteRecordDicU;
                            if (!workExecuteRecordDicV.isEmpty())
                            {
                                long   workExecuteRecordDicVKFreeValue = workExecuteRecordDicV.getFreeValue();
                                long[] workExecuteRecordDicVKKeys      = workExecuteRecordDicV.getKeys();
                                long[] workExecuteRecordDicVVValues    = workExecuteRecordDicV.getValues();
                                for (int workExecuteRecordDicVKI = workExecuteRecordDicVKKeys.Length - 1; workExecuteRecordDicVKI >= 0; --workExecuteRecordDicVKI)
                                {
                                    long workExecuteRecordDicVK = workExecuteRecordDicVKKeys[workExecuteRecordDicVKI];
                                    if (workExecuteRecordDicVK != workExecuteRecordDicVKFreeValue)
                                    {
                                        long workExecuteRecordDicVV = workExecuteRecordDicVVValues[workExecuteRecordDicVKI];
                                        long workExecuteRecordDicVU = workExecuteRecordDicVR.get(workExecuteRecordDicVK);
                                        if (workExecuteRecordDicVV != workExecuteRecordDicVU)
                                        {
                                            return(false);
                                        }
                                    }
                                }
                            }
                        }
                        else
                        {
                            if (workExecuteRecordDicV != null)
                            {
                                return(false);
                            }
                        }
                    }
                }
            }
        }
        else
        {
            if (this.workExecuteRecordDic != null)
            {
                return(false);
            }
        }

        return(true);
    }
Beispiel #3
0
    /// <summary>
    /// 复制(深拷贝)
    /// </summary>
    protected override void toCopy(BaseData data)
    {
        if (!(data is WorkReceiverData))
        {
            return;
        }

        WorkReceiverData mData = (WorkReceiverData)data;

        if (mData.workExecuteRecordDic != null)
        {
            if (this.workExecuteRecordDic != null)
            {
                this.workExecuteRecordDic.clear();
                this.workExecuteRecordDic.ensureCapacity(mData.workExecuteRecordDic.size());
            }
            else
            {
                this.workExecuteRecordDic = new IntObjectMap <LongLongMap>(mData.workExecuteRecordDic.size());
            }

            IntObjectMap <LongLongMap> workExecuteRecordDicT = this.workExecuteRecordDic;
            if (!mData.workExecuteRecordDic.isEmpty())
            {
                int           workExecuteRecordDicKFreeValue = mData.workExecuteRecordDic.getFreeValue();
                int[]         workExecuteRecordDicKKeys      = mData.workExecuteRecordDic.getKeys();
                LongLongMap[] workExecuteRecordDicVValues    = mData.workExecuteRecordDic.getValues();
                for (int workExecuteRecordDicKI = workExecuteRecordDicKKeys.Length - 1; workExecuteRecordDicKI >= 0; --workExecuteRecordDicKI)
                {
                    int workExecuteRecordDicK = workExecuteRecordDicKKeys[workExecuteRecordDicKI];
                    if (workExecuteRecordDicK != workExecuteRecordDicKFreeValue)
                    {
                        LongLongMap workExecuteRecordDicV = workExecuteRecordDicVValues[workExecuteRecordDicKI];
                        int         workExecuteRecordDicW;
                        LongLongMap workExecuteRecordDicU;
                        workExecuteRecordDicW = workExecuteRecordDicK;

                        if (workExecuteRecordDicV != null)
                        {
                            workExecuteRecordDicU = new LongLongMap(workExecuteRecordDicV.size());
                            LongLongMap workExecuteRecordDicUT = workExecuteRecordDicU;
                            if (!workExecuteRecordDicV.isEmpty())
                            {
                                long   workExecuteRecordDicUKFreeValue = workExecuteRecordDicV.getFreeValue();
                                long[] workExecuteRecordDicUKKeys      = workExecuteRecordDicV.getKeys();
                                long[] workExecuteRecordDicUVValues    = workExecuteRecordDicV.getValues();
                                for (int workExecuteRecordDicUKI = workExecuteRecordDicUKKeys.Length - 1; workExecuteRecordDicUKI >= 0; --workExecuteRecordDicUKI)
                                {
                                    long workExecuteRecordDicUK = workExecuteRecordDicUKKeys[workExecuteRecordDicUKI];
                                    if (workExecuteRecordDicUK != workExecuteRecordDicUKFreeValue)
                                    {
                                        long workExecuteRecordDicUV = workExecuteRecordDicUVValues[workExecuteRecordDicUKI];
                                        long workExecuteRecordDicUW;
                                        long workExecuteRecordDicUU;
                                        workExecuteRecordDicUW = workExecuteRecordDicUK;

                                        workExecuteRecordDicUU = workExecuteRecordDicUV;

                                        workExecuteRecordDicUT.put(workExecuteRecordDicUW, workExecuteRecordDicUU);
                                    }
                                }
                            }
                        }
                        else
                        {
                            workExecuteRecordDicU = null;
                            nullObjError("workExecuteRecordDicU");
                        }

                        workExecuteRecordDicT.put(workExecuteRecordDicW, workExecuteRecordDicU);
                    }
                }
            }
        }
        else
        {
            this.workExecuteRecordDic = null;
            nullObjError("workExecuteRecordDic");
        }
    }