private void RaiseItemChanged(JsonValue child, JsonValueChange change, int index) { if (this.ChangedListenersCount > 0) { this.RaiseChangedEvent(this, new JsonValueChangeEventArgs(child, change, index)); } }
private void RaiseItemChanging(JsonValue child, JsonValueChange change, int index) { if (ChangingListenersCount > 0) { RaiseChangingEvent(this, new JsonValueChangeEventArgs(child, change, index)); } }
private void RaiseItemChanged(JsonValue child, JsonValueChange change, string key) { if (ChangedListenersCount > 0) { RaiseChangedEvent(this, new JsonValueChangeEventArgs(child, change, key)); } }
private void RaiseItemChanging(JsonValue child, JsonValueChange change, string key) { if (this.ChangingListenersCount > 0) { this.RaiseChangingEvent(this, new JsonValueChangeEventArgs(child, change, key)); } }
/// <summary> /// Initializes a new instance of the <see cref="System.Json.JsonValueChangeEventArgs"/> class for /// changes in a <see cref="System.Json.JsonArray"/>. /// </summary> /// <param name="child">The <see cref="System.Json.JsonValue"/> instance which will be or has been modified.</param> /// <param name="change">The type of change of the <see cref="System.Json.JsonValue"/> event.</param> /// <param name="index">The index of the element being changed in a <see cref="System.Json.JsonArray"/>.</param> public JsonValueChangeEventArgs(JsonValue child, JsonValueChange change, int index) { if (index < 0) { throw new ArgumentOutOfRangeException("index", RS.Format(Properties.Resources.ArgumentMustBeGreaterThanOrEqualTo, index, 0)); } this.child = child; this.change = change; this.index = index; }
/// <summary> /// Initializes a new instance of the <see cref="System.Json.JsonValueChangeEventArgs"/> class for /// changes in a <see cref="System.Json.JsonArray"/>. /// </summary> /// <param name="child">The <see cref="System.Json.JsonValue"/> instance which will be or has been modified.</param> /// <param name="change">The type of change of the <see cref="System.Json.JsonValue"/> event.</param> /// <param name="index">The index of the element being changed in a <see cref="System.Json.JsonArray"/>.</param> public JsonValueChangeEventArgs(JsonValue child, JsonValueChange change, int index) { if (index < 0) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("index")); } this.child = child; this.change = change; this.index = index; this.key = null; }
/// <summary> /// Initializes a new instance of the <see cref="System.Json.JsonValueChangeEventArgs"/> class for /// changes in a <see cref="System.Json.JsonObject"/>. /// </summary> /// <param name="child">The <see cref="System.Json.JsonValue"/> instance which will be or has been modified.</param> /// <param name="change">The type of change of the <see cref="System.Json.JsonValue"/> event.</param> /// <param name="key">The key of the element being changed in a <see cref="System.Json.JsonObject"/>.</param> public JsonValueChangeEventArgs(JsonValue child, JsonValueChange change, string key) { if (change != JsonValueChange.Clear) { if (key == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("key"); } } this.child = child; this.change = change; this.index = -1; this.key = key; }
/// <summary> /// Initializes a new instance of the <see cref="System.Json.JsonValueChangeEventArgs"/> class for /// changes in a <see cref="System.Json.JsonObject"/>. /// </summary> /// <param name="child">The <see cref="System.Json.JsonValue"/> instance which will be or has been modified.</param> /// <param name="change">The type of change of the <see cref="System.Json.JsonValue"/> event.</param> /// <param name="key">The key of the element being changed in a <see cref="System.Json.JsonObject"/>.</param> public JsonValueChangeEventArgs(JsonValue child, JsonValueChange change, string key) { if (change != JsonValueChange.Clear) { if (key == null) { throw new ArgumentNullException("key"); } } this.child = child; this.change = change; index = -1; this.key = key; }