public bool GetProfileByName(string profileName, out UserProfile userProfile)
 {
   CpAction action = GetAction("GetProfileByName");
   IList<object> inParameters = new List<object> {profileName};
   IList<object> outParameters = action.InvokeAction(inParameters);
   userProfile = (UserProfile) outParameters[0];
   return userProfile != null;
 }
 public bool GetProfile(Guid profileId, out UserProfile userProfile)
 {
   CpAction action = GetAction("GetProfile");
   IList<object> inParameters = new List<object> {MarshallingHelper.SerializeGuid(profileId)};
   IList<object> outParameters = action.InvokeAction(inParameters);
   userProfile = (UserProfile) outParameters[0];
   return userProfile != null;
 }
 public bool GetProfileByName(string profileName, out UserProfile userProfile)
 {
   ICollection<UserProfile> profiles = GetProfiles(null, profileName);
   userProfile = profiles.FirstOrDefault();
   return userProfile != null;
 }
 public bool GetProfile(Guid profileId, out UserProfile userProfile)
 {
   ICollection<UserProfile> profiles = GetProfiles(profileId, null);
   userProfile = profiles.FirstOrDefault();
   return userProfile != null;
 }