Beispiel #1
0
 public UserDeleteReply IdentityDelete(UserDeleteRequest request)
 {
     try
     {
         UserDeleteReply response = new UserDeleteReply();
         response.ResultStatus = _membership.DeleteUser(request.UserName, request.DeletedRelatedData);
         response.Status       = ActionStatus.OK;
         return(response);
     }
     catch (Exception ex)
     {
         throw ex.NewFault();
     }
 }
Beispiel #2
0
 public override bool DeleteUser(string username, bool deleteAllRelatedData)
 {
     using (_log.NewTrace())
     {
         WcfClientUtils.VerifyParameter("username", username);
         try
         {
             UserDeleteRequest request = new UserDeleteRequest();
             request.DeletedRelatedData  = deleteAllRelatedData;
             request.UserName            = username;
             request.ServiceSessionToken = WcfClientUtils.SessionToken;
             UserDeleteReply response = _membershipService.IdentityDelete(request);
             return(response.ResultStatus == true && response.Status == ActionStatus.OK);
         }
         catch (Exception ex)
         {
             throw WcfUtils.Extract(ex);
         }
     }
 }