Exemplo n.º 1
0
 public void InsertClient(RemoteClient client)
 {
     using (var db = new LiteDatabase(_storageLocationProvider.CacheDatabase))
     {
         var collection   = db.GetCollection <RemoteClient>("clients");
         var storedClient = collection.FindById(client.ClientId);
         if (storedClient == null)
         {
             collection.Insert(client);
         }
         else
         {
             storedClient.IpAddress = client.IpAddress;
             storedClient.AddConnection();
             collection.Update(storedClient);
         }
     }
 }
Exemplo n.º 2
0
 public ClientDataUpdateEvent(RemoteClient client)
 {
     Client = client;
 }