Esempio n. 1
0
        /// <summary>
        /// Tracks a pending update to the given descriptor based on values read from response headers
        /// </summary>
        /// <param name="data">The descriptor data to update</param>
        /// <param name="headers">The headers that were read</param>
        public void TrackUpdateFromHeaders(EntityDescriptorData data, IDictionary <string, string> headers)
        {
            ExceptionUtilities.CheckArgumentNotNull(data, "data");
            var update = new HeaderUpdate()
            {
                Descriptor = data, Headers = headers
            };

            if (!this.IgnoreAllUpdates)
            {
                if (this.ApplyUpdatesImmediately)
                {
                    Apply(update);
                }
                else
                {
                    this.headerUpdates.Add(update);
                }
            }
        }
 /// <summary>
 /// Tracks a pending update to the given descriptor based on values read from response headers
 /// </summary>
 /// <param name="data">The descriptor data to update</param>
 /// <param name="headers">The headers that were read</param>
 public void TrackUpdateFromHeaders(EntityDescriptorData data, IDictionary<string, string> headers)
 {
     ExceptionUtilities.CheckArgumentNotNull(data, "data");
     var update = new HeaderUpdate() { Descriptor = data, Headers = headers };
    
     if (!this.IgnoreAllUpdates)
     {
         if (this.ApplyUpdatesImmediately)
         {
             Apply(update);
         }
         else
         {
             this.headerUpdates.Add(update);
         }
     }
 }
 private static void Apply(HeaderUpdate update)
 {
     update.Descriptor.UpdateFromHeaders(update.Headers);
 }
Esempio n. 4
0
 private static void Apply(HeaderUpdate update)
 {
     update.Descriptor.UpdateFromHeaders(update.Headers);
 }
Esempio n. 5
0
 public void Update()
 {
     HeaderUpdate?.Invoke(this, null);
     _update = true;
 }