/// <summary> /// Instantiates the <see cref="LauncherModule"/>. /// </summary> /// <param name="reactContext">The React context.</param> public LauncherModule(ReactContext reactContext) : base(reactContext) { lock (s_lock) { _activatedUrl = s_pendingActivatedUrl; s_pendingActivatedUrl = null; s_currentInstance = this; } }
/// <summary> /// Called before a <see cref="IReactInstance"/> is disposed. /// </summary> /// <returns> /// A task to await the dispose operation. /// </returns> public override Task OnReactInstanceDisposeAsync() { lock (s_lock) { if (this == s_currentInstance) { s_currentInstance = null; } } return(Task.CompletedTask); }