Esempio n. 1
0
 public virtual void UpdateClient(string objectId, string propertyName, object value)
 {
     if (!IsReadied)
     {
         return;
     }
     if (objectId == null)
     {
         return;
     }
     if (_dicByObjectId.TryGetValue(objectId, out ClientData clientData))
     {
         PropertyInfo propertyInfo = typeof(ClientData).GetProperty(propertyName);
         if (propertyInfo != null)
         {
             value = VirtualRoot.ConvertValue(propertyInfo.PropertyType, value);
             var oldValue = propertyInfo.GetValue(clientData, null);
             if (oldValue != value)
             {
                 propertyInfo.SetValue(clientData, value, null);
                 DoUpdateSave(MinerData.Create(clientData));
             }
         }
     }
 }