public static UserRightsHelper ConvertStringtoRights(string rights) { UserRightsHelper userRights = new UserRightsHelper(); string[] rightsArray = rights.Split(':'); userRights.AddRights(rightsArray[0], rightsArray[1]); return(userRights); }
public static string ConvertRightsToString(UserRightsHelper rights) { StringBuilder sb = new StringBuilder(); sb.Append(rights.EmailAddress); sb.Append(":"); sb.Append(rights.RightsList); return(sb.ToString()); }