/// <summary> /// Forces content to update from the server. If variables have changed, the /// appropriate callbacks will fire. Use sparingly as if the app is updated, /// you'll have to deal with potentially inconsistent state or user experience. /// The provided handler will always fire regardless /// of whether the variables have changed. /// It provides a boolean value whether the update to the server was successful. /// </summary> /// <param name="handler"> /// The handler to execute once the update completed /// with the corresponding success result. /// </param> public override void ForceContentUpdate(Leanplum.ForceContentUpdateHandler handler) { int key = DictionaryKey++; ForceContentUpdateHandlersDictionary.Add(key, handler); lp_forceContentUpdateWithHandler(key); }
/// <summary> /// Forces content to update from the server. If variables have changed, the /// appropriate callbacks will fire. Use sparingly as if the app is updated, /// you'll have to deal with potentially inconsistent state or user experience. /// The provided handler will always fire regardless /// of whether the variables have changed. /// It provides a boolean value whether the update to the server was successful. /// </summary> /// <param name="handler"> /// The handler to execute once the update completed /// with the corresponding success result. /// </param> public override void ForceContentUpdate(Leanplum.ForceContentUpdateHandler handler) { int key = DictionaryKey++; ForceContentUpdateCallbacksDictionary.Add(key, handler); NativeSDK.CallStatic("forceContentUpdateWithCallback", key); }
/// <summary> /// Forces content to update from the server. If variables have changed, the /// appropriate callbacks will fire. Use sparingly as if the app is updated, /// you'll have to deal with potentially inconsistent state or user experience. /// The provided callback will always fire regardless /// of whether the variables have changed. /// </summary> /// <param name="callback">The action to execute once the update completed.</param> public override void ForceContentUpdate(Action callback) { Leanplum.ForceContentUpdateHandler handler = (success) => { callback(); }; ForceContentUpdate(handler); }
/// <summary> /// Forces content to update from the server. If variables have changed, the /// appropriate callbacks will fire. Use sparingly as if the app is updated, /// you'll have to deal with potentially inconsistent state or user experience. /// The provided handler will always fire regardless /// of whether the variables have changed. /// It provides a boolean value whether the update to the server was successful. /// </summary> /// <param name="handler"> /// The handler to execute once the update completed /// with the corresponding success result. /// </param> public abstract void ForceContentUpdate(Leanplum.ForceContentUpdateHandler handler);