Exemple #1
0
        public R <ServerGroupId[], LocalStr> GetClientServerGroups(ClientDbId dbId)
        {
            var result = ts3FullClient.ServerGroupsByClientDbId(dbId);

            if (!result.Ok)
            {
                return(new LocalStr(strings.error_ts_no_client_found));
            }
            return(result.Value.Select(csg => csg.ServerGroupId).ToArray());
        }
Exemple #2
0
        public R <ClientDbInfo, LocalStr> GetDbClientByDbId(ClientDbId clientDbId)
        {
            if (clientDbNames.TryGetValue(clientDbId, out var clientData))
            {
                return(clientData);
            }

            var result = ts3FullClient.ClientDbInfo(clientDbId);

            if (!result.Ok)
            {
                return(new LocalStr(strings.error_ts_no_client_found));
            }
            clientData = result.Value;
            clientDbNames.Set(clientDbId, clientData);
            return(clientData);
        }
Exemple #3
0
 [DebuggerStepThrough] public CommandParameter(string key, ClientDbId value)
 {
     Key = key; Value = Serialize(value.Value);
 }
Exemple #4
0
 [DebuggerStepThrough] public TsCommand Add(string key, ClientDbId value) => Add(new CommandParameter(key, value));