/// <summary> /// Initializes a new instance of the <see cref="PersonalLinksData" /> class. /// </summary> /// <param name="personLinksSectionList">The person links section list.</param> /// <param name="currentPerson">The current person.</param> public PersonalLinksData(List <PersonLinksSectionData> personLinksSectionList, Person currentPerson) : this() { PersonLinksSectionList = personLinksSectionList.ToArray(); ModificationHash = PersonalLinkService.GetPersonalLinksModificationHash(currentPerson); LastNonSharedLinksModifiedDateTime = PersonalLinksHelper.GetPersonalLinksLastModifiedDateTime(currentPerson) ?? RockDateTime.Now; }
/// <summary> /// Gets the personal links modification hash. /// </summary> /// <param name="currentPerson">The current person.</param> /// <returns>System.String.</returns> public static string GetPersonalLinksModificationHash(Person currentPerson) { var modificationData = new { LastSharedLinksUpdateRockDateTime = SharedPersonalLinkSectionCache.LastModifiedDateTime, LastNonSharedLinksUpdateDateTime = PersonalLinksHelper.GetPersonalLinksLastModifiedDateTime(currentPerson), PersonGuid = currentPerson?.Guid, }; var modificationJson = modificationData.ToJson(); return(modificationJson.XxHash()); }