/// <summary> /// Deeply clone the current group. The returned group will be an exact /// value copy of the current object (including UUID, etc.). /// </summary> /// <returns>Exact value copy of the current <c>PwGroup</c> object.</returns> public PwGroup CloneDeep() { PwGroup pg = new PwGroup(false, false); pg.m_uuid = m_uuid; // PwUuid is immutable pg.m_listGroups = m_listGroups.CloneDeep(); pg.m_listEntries = m_listEntries.CloneDeep(); pg.m_pParentGroup = m_pParentGroup; pg.m_tParentGroupLastMod = m_tParentGroupLastMod; pg.m_strName = m_strName; pg.m_strNotes = m_strNotes; pg.m_pwIcon = m_pwIcon; pg.m_pwCustomIconID = m_pwCustomIconID; pg.m_tCreation = m_tCreation; pg.m_tExpire = m_tExpire; pg.m_tLastAccess = m_tLastAccess; pg.m_tLastMod = m_tLastMod; pg.m_bExpires = m_bExpires; pg.m_uUsageCount = m_uUsageCount; pg.m_bIsExpanded = m_bIsExpanded; pg.m_bVirtual = m_bVirtual; pg.m_strDefaultAutoTypeSequence = m_strDefaultAutoTypeSequence; pg.m_pwLastTopVisibleEntry = m_pwLastTopVisibleEntry; return(pg); }
/// <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); }
/// <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); }