Skip to content
Permalink
Browse files

fix: added constructors required by Uno.UI for Android and iOS. (#2116)

  • Loading branch information...
weitzhandler authored and glennawatson committed Jul 9, 2019
1 parent b043d99 commit 780e4463fd352675965518afdfd46b27e8bafc57
Showing with 38 additions and 0 deletions.
  1. +38 −0 src/ReactiveUI/Platforms/windows-common/ReactivePage.cs
@@ -3,6 +3,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using System;
using System.Diagnostics.CodeAnalysis;
#if NETFX_CORE || HAS_UNO
using Windows.UI.Xaml;
@@ -81,6 +82,9 @@ namespace ReactiveUI
/// <typeparam name="TViewModel">
/// The type of the view model backing the view.
/// </typeparam>
#if HAS_UNO && IOS
[global::Foundation.Register]
#endif
[SuppressMessage("Design", "CA1010:Collections should implement generic interface", Justification = "Deliberate usage")]
public abstract
#if HAS_UNO
@@ -100,6 +104,40 @@ class ReactivePage<TViewModel> :
typeof(ReactivePage<TViewModel>),
new PropertyMetadata(null));

#if HAS_UNO
#if ANDROID
/// <summary>
/// Initializes a new instance of the <see cref="ReactivePage{TViewModel}"/> class.
/// Native constructor, do not use explicitly.
/// </summary>
/// <remarks>
/// Used by the Xamarin Runtime to materialize native
/// objects that may have been collected in the managed world.
/// </remarks>
/// <param name="javaReference">A <see cref="IntPtr"/> containing a Java Native Interface (JNI) object reference.</param>
/// <param name="transfer">A <see cref="JniHandleOwnership"/> indicating how to handle handle.</param>
protected ReactivePage(IntPtr javaReference, global::Android.Runtime.JniHandleOwnership transfer)
: base(javaReference, transfer)
{
}
#endif
#if IOS
/// <summary>
/// Initializes a new instance of the <see cref="ReactivePage{TViewModel}"/> class.
/// Native constructor, do not use explicitly.
/// </summary>
/// <param name="handle">Handle to the native control.</param>
/// <remarks>
/// Used by the Xamarin Runtime to materialize native.
/// objects that may have been collected in the managed world.
/// </remarks>
protected ReactivePage(IntPtr handle)
: base(handle)
{
}
#endif
#endif

/// <summary>
/// Gets the binding root view model.
/// </summary>

0 comments on commit 780e446

Please sign in to comment.
You can’t perform that action at this time.