/// <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); }
private static void Apply(HeaderUpdate update) { update.Descriptor.UpdateFromHeaders(update.Headers); }
public void Update() { HeaderUpdate?.Invoke(this, null); _update = true; }