/// <summary> /// Reflection from function Xamarin.Forms.Forms::Apply(this NotifyCollectionChangedEventArgs self, Action( object, int, bool ) insert, Action( object, int ) removeAt, Action reset) /// </summary> /// <param name="self">The <see cref="NotifyCollectionChangedEventArgs"/> instance containing the event data.</param> /// <param name="insert">The insert.</param> /// <param name="removeAt">The remove at.</param> /// <param name="reset">The reset.</param> /// <returns></returns> private static NotifyCollectionChangedAction Apply(NotifyCollectionChangedEventArgs self, Action <object, int, bool> insert, Action <object, int> removeAt, Action reset) { if (applyNotifyCollectionChangedActionDelegate == null) { var assembly = typeof(Xamarin.Forms.Application).Assembly; var platformType = assembly.GetType("Xamarin.Forms.NotifyCollectionChangedEventArgsExtensions"); var method = platformType.GetMethod("Apply", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); applyNotifyCollectionChangedActionDelegate = ( ApplyNotifyCollectionChangedActionDelegate )method.CreateDelegate(typeof(ApplyNotifyCollectionChangedActionDelegate)); } return(applyNotifyCollectionChangedActionDelegate(self, insert, removeAt, reset)); }
/// <summary> /// Reflection from function Xamarin.Forms.Forms::Apply(this NotifyCollectionChangedEventArgs self, Action( object, int, bool ) insert, Action( object, int ) removeAt, Action reset) /// </summary> /// <param name="self">The <see cref="NotifyCollectionChangedEventArgs"/> instance containing the event data.</param> /// <param name="insert">The insert.</param> /// <param name="removeAt">The remove at.</param> /// <param name="reset">The reset.</param> /// <returns></returns> private static NotifyCollectionChangedAction Apply ( NotifyCollectionChangedEventArgs self , Action <object , int , bool> insert , Action <object , int> removeAt , Action reset ) { if ( applyNotifyCollectionChangedActionDelegate == null ) { var assembly = typeof ( Xamarin.Forms.Application ).Assembly; var platformType = assembly.GetType ( "Xamarin.Forms.NotifyCollectionChangedEventArgsExtensions" ); var method = platformType.GetMethod ( "Apply" , BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic ); applyNotifyCollectionChangedActionDelegate = ( ApplyNotifyCollectionChangedActionDelegate ) method.CreateDelegate ( typeof ( ApplyNotifyCollectionChangedActionDelegate ) ); } return applyNotifyCollectionChangedActionDelegate ( self , insert , removeAt , reset ); }