/// <summary> /// Get roles /// </summary> /// <returns>return roles</returns> public static string[] GetRoles() { UserRoleManager roleManager = new UserRoleManager(); try { roleManager.CreateConnection(); roleManager.Connection.Open(GetServerConnectionSetup()); string[] roleNameList = roleManager.GetRoleNameList(); return(roleNameList); } catch { throw; } finally { if (roleManager != null) { roleManager.Connection.Close(); roleManager.Connection.Dispose(); roleManager.DeleteConnection(); roleManager.Connection = null; roleManager = null; } } }