public void Call(object param0, Newtonsoft.Json.ObservableSupport.AddingNewEventArgs param1) { func.BeginPCall(); func.Push(param0); func.PushObject(param1); func.PCall(); func.EndPCall(); }
/// <summary> /// Raises the <see cref="AddingNew"/> event. /// </summary> /// <param name="e">The <see cref="System.ComponentModel.AddingNewEventArgs"/> instance containing the event data.</param> protected virtual void OnAddingNew(AddingNewEventArgs e) { AddingNewEventHandler handler = AddingNew; if (handler != null) { handler(this, e); } }
object IBindingList.AddNew() { Newtonsoft.Json.ObservableSupport.AddingNewEventArgs addingNewEventArgs = new Newtonsoft.Json.ObservableSupport.AddingNewEventArgs(); OnAddingNew(addingNewEventArgs); if (addingNewEventArgs.NewObject == null) { throw new Exception("Could not determine new value to add to '{0}'.".FormatWith(CultureInfo.InvariantCulture, GetType())); } if (!(addingNewEventArgs.NewObject is JToken)) { throw new Exception("New item to be added to collection must be compatible with {0}.".FormatWith(CultureInfo.InvariantCulture, typeof(JToken))); } JToken jToken = (JToken)addingNewEventArgs.NewObject; Add(jToken); return(jToken); }
object IBindingList.AddNew() { AddingNewEventArgs args = new AddingNewEventArgs(); OnAddingNew(args); if (args.NewObject == null) { throw new Exception("Could not determine new value to add to '{0}'.".FormatWith(CultureInfo.InvariantCulture, GetType())); } if (!(args.NewObject is JToken)) { throw new Exception("New item to be added to collection must be compatible with {0}.".FormatWith(CultureInfo.InvariantCulture, typeof(JToken))); } JToken newItem = (JToken)args.NewObject; Add(newItem); return(newItem); }
protected virtual void OnAddingNew(Newtonsoft.Json.ObservableSupport.AddingNewEventArgs e) { this.AddingNew?.Invoke(this, e); }