/// <summary>
 /// Tracks a pending update to the given descriptor based on values read from a response payload
 /// </summary>
 /// <param name="data">The descriptor data to update</param>
 /// <param name="payload">The payload that was read</param>
 /// <param name="baseUri">The base uri of the context</param>
 public void TrackUpdateFromPayload(EntityDescriptorData data, EntityInstance payload, Uri baseUri)
 {
     ExceptionUtilities.CheckArgumentNotNull(data, "data");
     var update = new PayloadUpdate() { Descriptor = data, Payload = payload, BaseUri = baseUri };
     if (!this.IgnoreAllUpdates)
     {
         if (this.ApplyUpdatesImmediately)
         {
             Apply(update);
         }
         else
         {
             this.payloadUpdates.Add(update);
         }
     }
 }
Exemple #2
0
        /// <summary>
        /// Tracks a pending update to the given descriptor based on values read from a response payload
        /// </summary>
        /// <param name="data">The descriptor data to update</param>
        /// <param name="payload">The payload that was read</param>
        /// <param name="baseUri">The base uri of the context</param>
        public void TrackUpdateFromPayload(EntityDescriptorData data, EntityInstance payload, Uri baseUri)
        {
            ExceptionUtilities.CheckArgumentNotNull(data, "data");
            var update = new PayloadUpdate()
            {
                Descriptor = data, Payload = payload, BaseUri = baseUri
            };

            if (!this.IgnoreAllUpdates)
            {
                if (this.ApplyUpdatesImmediately)
                {
                    Apply(update);
                }
                else
                {
                    this.payloadUpdates.Add(update);
                }
            }
        }
 private static void Apply(PayloadUpdate update)
 {
     update.Descriptor.UpdateFromPayload(update.Payload, update.BaseUri);
 }
Exemple #4
0
 private static void Apply(PayloadUpdate update)
 {
     update.Descriptor.UpdateFromPayload(update.Payload, update.BaseUri);
 }