예제 #1
0
        /// <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 PwEntry CloneDeep()
        {
            PwEntry peNew = new PwEntry(false, false);

            peNew.m_uuid                = m_uuid; // PwUuid is immutable
            peNew.m_pParentGroup        = m_pParentGroup;
            peNew.m_tParentGroupLastMod = m_tParentGroupLastMod;

            peNew.m_listStrings  = m_listStrings.CloneDeep();
            peNew.m_listBinaries = m_listBinaries.CloneDeep();
            peNew.m_listAutoType = m_listAutoType.CloneDeep();
            peNew.m_listHistory  = m_listHistory.CloneDeep();

            peNew.m_pwIcon         = m_pwIcon;
            peNew.m_pwCustomIconID = m_pwCustomIconID;

            peNew.m_clrForeground = m_clrForeground;
            peNew.m_clrBackground = m_clrBackground;

            peNew.m_tCreation   = m_tCreation;
            peNew.m_tLastMod    = m_tLastMod;
            peNew.m_tLastAccess = m_tLastAccess;
            peNew.m_tExpire     = m_tExpire;
            peNew.m_bExpires    = m_bExpires;
            peNew.m_uUsageCount = m_uUsageCount;

            peNew.m_strOverrideUrl = m_strOverrideUrl;

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

            return(peNew);
        }
예제 #2
0
        /// <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 PwEntry CloneDeep()
        {
            PwEntry peNew = new PwEntry(false, false);

            peNew.m_uuid                = m_uuid; // PwUuid is immutable
            peNew.m_pParentGroup        = m_pParentGroup;
            peNew.m_tParentGroupLastMod = m_tParentGroupLastMod;
            peNew.m_puPrevParentGroup   = m_puPrevParentGroup;

            peNew.m_dStrings    = m_dStrings.CloneDeep();
            peNew.m_dBinaries   = m_dBinaries.CloneDeep();
            peNew.m_cfgAutoType = m_cfgAutoType.CloneDeep();
            peNew.m_lHistory    = m_lHistory.CloneDeep();

            peNew.m_pwIcon       = m_pwIcon;
            peNew.m_puCustomIcon = m_puCustomIcon;

            peNew.m_clrForeground = m_clrForeground;
            peNew.m_clrBackground = m_clrBackground;

            peNew.m_tCreation   = m_tCreation;
            peNew.m_tLastMod    = m_tLastMod;
            peNew.m_tLastAccess = m_tLastAccess;
            peNew.m_tExpire     = m_tExpire;
            peNew.m_bExpires    = m_bExpires;
            peNew.m_uUsageCount = m_uUsageCount;

            peNew.m_strOverrideUrl = m_strOverrideUrl;
            peNew.m_bQualityCheck  = m_bQualityCheck;

            peNew.m_lTags.AddRange(m_lTags);

            peNew.m_dCustomData = m_dCustomData.CloneDeep();

            return(peNew);
        }