Example #1
0
        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));
        }
Example #2
0
 internal static bool HasGroup(this ConnectionUser connectionUser, int groupId, HubGroupTypes type,
                               HubGroupPrefix prefix)
 {
     return(connectionUser.HasGroup(CreateGroupName(groupId, type, prefix)));
 }
Example #3
0
        internal static string CreateGroupName(int groupId, HubGroupTypes type, HubGroupPrefix prefix)
        {
            var name = prefix + "_" + (byte)type + "_" + groupId;

            return(name.ToLower());
        }