internal static async Task <string> AddOrReplaceGroupAsync(this ConnectionUser connectionUser, IGroupManager grops, int groupId, HubGroupTypes groupType, string nativeName, HubGroupPrefix prefix) { var name = CreateGroupName(groupId, groupType, prefix); return(await connectionUser._addOrReplaceGroupAsync(grops, groupId, name, groupType, nativeName)); }
internal static bool HasGroup(this ConnectionUser connectionUser, int groupId, HubGroupTypes type, HubGroupPrefix prefix) { return(connectionUser.HasGroup(CreateGroupName(groupId, type, prefix))); }
internal static string CreateGroupName(int groupId, HubGroupTypes type, HubGroupPrefix prefix) { var name = prefix + "_" + (byte)type + "_" + groupId; return(name.ToLower()); }