示例#1
0
文件: PxEntry.cs 项目: passxyz/KPCLib
        /// <summary>
        /// Clone the current entry. The returned entry is an exact value copy
        /// of the current entry (including UUID and parent group reference).
        /// All mutable members are cloned.
        /// </summary>
        /// <returns>Exact value clone. All references to mutable values changed.</returns>
        public new PxEntry CloneDeep()
        {
            PxEntry peNew = new PxEntry(false, false);

            peNew.Uuid            = Uuid; // PwUuid is immutable
            peNew.ParentGroup     = ParentGroup;
            peNew.LocationChanged = LocationChanged;

            peNew.Strings  = Strings.CloneDeep();
            peNew.Binaries = Binaries.CloneDeep();
            peNew.AutoType = AutoType.CloneDeep();
            peNew.History  = History.CloneDeep();

            peNew.IconId         = IconId;
            peNew.CustomIconUuid = CustomIconUuid;

            peNew.ForegroundColor = ForegroundColor;
            peNew.BackgroundColor = BackgroundColor;

            peNew.CreationTime         = CreationTime;
            peNew.LastModificationTime = LastModificationTime;
            peNew.LastAccessTime       = LastAccessTime;
            peNew.ExpiryTime           = ExpiryTime;
            peNew.Expires    = Expires;
            peNew.UsageCount = UsageCount;

            peNew.OverrideUrl = OverrideUrl;

            peNew.Tags = new List <string>(Tags);

            peNew.CustomData = CustomData.CloneDeep();

            return(peNew);
        }