Example #1
0
 /// <summary>
 /// Deletes raw personalization data from the underlying data store.
 /// </summary>
 /// <param name="webPartManager">The WebPartManager managing the personalization data.</param>
 /// <param name="path">The path for personalization information to be used as the data store key.</param>
 /// <param name="userName">The user name for personalization information to be used as the data store key.</param>
 protected override void ResetPersonalizationBlob(System.Web.UI.WebControls.WebParts.WebPartManager webPartManager, string path, string userName)
 {
     if (string.IsNullOrEmpty(userName))
     {
         SharedPersonalization sharedPersonalization = SharedPersonalizationDataSource.LoadForPath(path, false);
         if (sharedPersonalization != null)
         {
             sharedPersonalization.Delete();
         }
     }
     else
     {
         UserPersonalization userPersonalization = UserPersonalizationDataSource.LoadForPath(path, userName, false);
         if (userPersonalization != null)
         {
             userPersonalization.Delete();
         }
     }
 }