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

feature: Added Uno support #2067

Merged
merged 35 commits into from
Jun 26, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
0c38232
Added wasm files.
weitzhandler Jun 12, 2019
bee2b58
Fixed ReactivePage.OnViewModelChanging implementation
weitzhandler Jun 12, 2019
08a8c04
Merge branch 'master' into master
glennawatson Jun 12, 2019
7bbab71
Merge branch 'master' into master
glennawatson Jun 15, 2019
ea5fd6c
Merge branch 'master' into master
glennawatson Jun 16, 2019
009d692
Added Uno platform initial support
weitzhandler Jun 17, 2019
21ae794
Fixed linked files references
weitzhandler Jun 17, 2019
5f788b6
Merge branch 'master' into master
weitzhandler Jun 17, 2019
99e1f39
Fix wrong preprocessor directive
weitzhandler Jun 17, 2019
10ee94a
Merge branch 'master' of https://github.com/weitzhandler/ReactiveUI
weitzhandler Jun 17, 2019
c284a5e
Fixes
glennawatson Jun 17, 2019
fc9e3bc
Updated message suppression
weitzhandler Jun 17, 2019
3472b76
Expanded suppression messages
weitzhandler Jun 17, 2019
780abf2
Deleting g.cs file manually
weitzhandler Jun 17, 2019
684c979
extensions for reactiveui
ghuntley Jun 18, 2019
ba00181
Remove HAS_UNO directive from production
weitzhandler Jun 18, 2019
7497685
Updated Uno Platform brand name
weitzhandler Jun 18, 2019
36bdda5
Updated Reactive.Wasm to the new NuGet package
weitzhandler Jun 18, 2019
bf55094
further work
glennawatson Jun 18, 2019
d20cb8e
merge
glennawatson Jun 18, 2019
0e3932c
Add back in the ReactivePage.cs
glennawatson Jun 18, 2019
14ea219
remove the reactive page since that will be added to the windows-comm…
glennawatson Jun 18, 2019
1bcfb19
Merge branch 'master' into master
glennawatson Jun 18, 2019
335034d
Add Uno to RxUI initialization
weitzhandler Jun 19, 2019
9f064fb
Added some README stuff about Uno
weitzhandler Jun 19, 2019
a1db0c2
Update README.md
weitzhandler Jun 19, 2019
0973481
Merge branch 'master' into master
glennawatson Jun 19, 2019
fe9c1c7
Reverted README changes
weitzhandler Jun 19, 2019
d774634
Merge branch 'master' into master
glennawatson Jun 23, 2019
8b637b0
Merge branch 'master' into master
glennawatson Jun 25, 2019
aaf53e7
adding results to parent directories
glennawatson Jun 25, 2019
f6148b7
Further work on getting uno in
glennawatson Jun 26, 2019
214b5a8
Remove the events project, will be back in another iteration
glennawatson Jun 26, 2019
a25e37f
turn off exception when in WASM mode
glennawatson Jun 26, 2019
0df2271
grouped registrations
RLittlesII Jun 26, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/ReactiveUI.Fody.Tests/FodyWeavers.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ReactiveUI.Fody.deps" minOccurs="0" maxOccurs="1" type="xs:anyType" />
<xs:element name="ReactiveUI" minOccurs="0" maxOccurs="1" type="xs:anyType" />
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
Expand Down
10 changes: 10 additions & 0 deletions src/ReactiveUI.Uno/GlobalSuppressions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.

weitzhandler marked this conversation as resolved.
Show resolved Hide resolved
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1010:Collections should implement generic interface", Justification = "<Pending>", Scope = "type", Target = "~T:ReactiveUI.Uno.ReactivePage`1")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1710:Identifiers should have correct suffix", Justification = "<Pending>", Scope = "type", Target = "~T:ReactiveUI.Uno.ReactivePage`1")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "RCS1158:Static member in generic type should use a type parameter.", Justification = "<Pending>", Scope = "member", Target = "~F:ReactiveUI.Uno.ReactivePage`1.ViewModelProperty")]

52 changes: 52 additions & 0 deletions src/ReactiveUI.Uno/ReactivePage.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// Copyright (c) 2019 .NET Foundation and Contributors. All rights reserved.
// Licensed to the .NET Foundation under one or more agreements.
// 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 Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;

namespace ReactiveUI.Uno
{
/// <summary>
/// This is a <see cref="Page"/> that is also an <see cref="IViewFor{T}"/>.
/// </summary>
/// <typeparam name="TViewModel">The type of the view model.</typeparam>
public class ReactivePage<TViewModel> : Page, IViewFor<TViewModel>
where TViewModel : class
{
/// <summary>
/// The view model bindable property.
/// </summary>
public static readonly DependencyProperty ViewModelProperty = DependencyProperty.Register(
nameof(ViewModel),
typeof(TViewModel),
typeof(ReactivePage<TViewModel>),
new PropertyMetadata(default, OnViewModelChanged));

/// <inheritdoc/>
public TViewModel ViewModel
{
get => (TViewModel)GetValue(ViewModelProperty);
set => SetValue(ViewModelProperty, value);
}

/// <inheritdoc/>
object IViewFor.ViewModel
{
get => ViewModel;
set => ViewModel = (TViewModel)value;
}

/// <inheritdoc/>
protected override void OnDataContextChanged()
{
base.OnDataContextChanged();
ViewModel = DataContext as TViewModel;
}

private static void OnViewModelChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs args)
{
}
}
}
23 changes: 23 additions & 0 deletions src/ReactiveUI.Uno/ReactiveUI.Uno.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<Project Sdk="MSBuild.Sdk.Extras">
<PropertyGroup>
<TargetFrameworks>xamarinmac20;MonoAndroid90;xamarinios10;netstandard2.0</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TargetFrameworks);uap10.0.17763</TargetFrameworks>
<PackageId>ReactiveUI.Uno</PackageId>
<Title></Title>
<Description>Uno-Platform specific extensions to ReactiveUI</Description>
weitzhandler marked this conversation as resolved.
Show resolved Hide resolved
<TargetFrameworks>netstandard2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Uno.UI" Version="1.44.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\ReactiveUI\ReactiveUI.csproj" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework.StartsWith('netstandard'))">
<PackageReference Include="Rx.Uno.Wasm" Version="0.1.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
//------------------------------------------------------------------------------
weitzhandler marked this conversation as resolved.
Show resolved Hide resolved
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace XamlGeneratedNamespace {


/// <summary>
/// GeneratedInternalTypeHelper
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public sealed class GeneratedInternalTypeHelper : System.Windows.Markup.InternalTypeHelper {

/// <summary>
/// CreateInstance
/// </summary>
protected override object CreateInstance(System.Type type, System.Globalization.CultureInfo culture) {
return System.Activator.CreateInstance(type, ((System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic)
| (System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.CreateInstance)), null, null, culture);
}

/// <summary>
/// GetPropertyValue
/// </summary>
protected override object GetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, System.Globalization.CultureInfo culture) {
return propertyInfo.GetValue(target, System.Reflection.BindingFlags.Default, null, null, culture);
}

/// <summary>
/// SetPropertyValue
/// </summary>
protected override void SetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, object value, System.Globalization.CultureInfo culture) {
propertyInfo.SetValue(target, value, System.Reflection.BindingFlags.Default, null, null, culture);
}

/// <summary>
/// CreateDelegate
/// </summary>
protected override System.Delegate CreateDelegate(System.Type delegateType, object target, string handler) {
return ((System.Delegate)(target.GetType().InvokeMember("_CreateDelegate", (System.Reflection.BindingFlags.InvokeMethod
| (System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)), null, target, new object[] {
delegateType,
handler}, null)));
}

/// <summary>
/// AddEventHandler
/// </summary>
protected override void AddEventHandler(System.Reflection.EventInfo eventInfo, object target, System.Delegate handler) {
eventInfo.AddEventHandler(target, handler);
}
}
}

67 changes: 63 additions & 4 deletions src/ReactiveUI.sln
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26730.15

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
RLittlesII marked this conversation as resolved.
Show resolved Hide resolved
VisualStudioVersion = 16.0.29001.49
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{BD9762CF-E104-481C-96A6-26E624B86283}"
ProjectSection(SolutionItems) = preProject
Expand Down Expand Up @@ -38,7 +39,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ReactiveUI.Fody.Tests", "Re
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ReactiveUI.Splat.Tests", "ReactiveUI.Splat.Tests\ReactiveUI.Splat.Tests.csproj", "{7ED6D69F-138F-40BD-9F37-3E4050E4D19B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReactiveUI.Testing.Tests", "ReactiveUI.Testing.Tests\ReactiveUI.Testing.Tests.csproj", "{CD8B19A9-316E-4FBC-8F0C-87ADC6AAD684}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ReactiveUI.Testing.Tests", "ReactiveUI.Testing.Tests\ReactiveUI.Testing.Tests.csproj", "{CD8B19A9-316E-4FBC-8F0C-87ADC6AAD684}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReactiveUI.Uno", "ReactiveUI.Uno\ReactiveUI.Uno.csproj", "{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -816,6 +819,62 @@ Global
{CD8B19A9-316E-4FBC-8F0C-87ADC6AAD684}.Release|x64.Build.0 = Release|Any CPU
{CD8B19A9-316E-4FBC-8F0C-87ADC6AAD684}.Release|x86.ActiveCfg = Release|Any CPU
{CD8B19A9-316E-4FBC-8F0C-87ADC6AAD684}.Release|x86.Build.0 = Release|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.Ad-Hoc|Mixed Platforms.ActiveCfg = Debug|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.Ad-Hoc|Mixed Platforms.Build.0 = Debug|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.Ad-Hoc|x64.Build.0 = Debug|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.Ad-Hoc|x86.Build.0 = Debug|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.AppStore|Any CPU.Build.0 = Debug|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.AppStore|ARM.ActiveCfg = Debug|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.AppStore|ARM.Build.0 = Debug|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.AppStore|iPhone.Build.0 = Debug|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.AppStore|Mixed Platforms.ActiveCfg = Debug|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.AppStore|Mixed Platforms.Build.0 = Debug|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.AppStore|x64.ActiveCfg = Debug|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.AppStore|x64.Build.0 = Debug|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.AppStore|x86.ActiveCfg = Debug|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.AppStore|x86.Build.0 = Debug|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.Debug|ARM.ActiveCfg = Debug|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.Debug|ARM.Build.0 = Debug|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.Debug|iPhone.Build.0 = Debug|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.Debug|x64.ActiveCfg = Debug|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.Debug|x64.Build.0 = Debug|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.Debug|x86.ActiveCfg = Debug|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.Debug|x86.Build.0 = Debug|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.Release|Any CPU.Build.0 = Release|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.Release|ARM.ActiveCfg = Release|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.Release|ARM.Build.0 = Release|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.Release|iPhone.ActiveCfg = Release|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.Release|iPhone.Build.0 = Release|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.Release|x64.ActiveCfg = Release|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.Release|x64.Build.0 = Release|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.Release|x86.ActiveCfg = Release|Any CPU
{36FC3269-B7D0-4D79-A54A-B26B6190E8A2}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down