public R <ClientData> GetClientById(ushort id) { var result = ClientBufferRequest(client => client.ClientId == id); if (result.Ok) { return(result); } Log.Write(Log.Level.Debug, "Slow double request, due to missing or wrong permission confinguration!"); var cd = tsBaseClient.Send <ClientData>("clientinfo", new CommandParameter("clid", id)).FirstOrDefault(); if (cd != null) { cd.ClientId = id; clientbuffer.Add(cd); return(R <ClientData> .OkR(cd)); } return("No client found"); }
public R <ClientData> GetClientById(ushort id) { var result = ClientBufferRequest(client => client.ClientId == id); if (result.Ok) { return(result); } Log.Debug("Slow double request due to missing or wrong permission configuration!"); var result2 = tsBaseClient.Send <ClientData>("clientinfo", new CommandParameter("clid", id)).WrapSingle(); if (!result2.Ok) { return("No client found"); } ClientData cd = result2.Value; cd.ClientId = id; clientbuffer.Add(cd); return(cd); }