예제 #1
0
        public static bool Delete(Int32 personalizationPathId)
        {
            SharedPersonalization sharedPersonalization = new SharedPersonalization();

            if (sharedPersonalization.Load(personalizationPathId))
            {
                return(sharedPersonalization.Delete());
            }
            return(false);
        }
예제 #2
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();
         }
     }
 }
예제 #3
0
 public static bool Delete(SharedPersonalization sharedPersonalization)
 {
     return(sharedPersonalization.Delete());
 }