Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 6 commits into from Jul 9, 2019
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
38 changes: 38 additions & 0 deletions src/ReactiveUI/Platforms/windows-common/ReactivePage.cs
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand All @@ -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">javaReference.</param>
weitzhandler marked this conversation as resolved.
Show resolved Hide resolved
/// <param name="transfer">transfer.</param>
weitzhandler marked this conversation as resolved.
Show resolved Hide resolved
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.</param>
weitzhandler marked this conversation as resolved.
Show resolved Hide resolved
/// <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>
Expand Down
Expand Up @@ -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;
Expand Down