From 93703bf0f6f79cffbf10310ac4d37d8fbacb0fc0 Mon Sep 17 00:00:00 2001 From: Michael Stonis Date: Thu, 5 Jul 2018 17:08:00 -0500 Subject: [PATCH 1/7] Provides functionality to generate event mapping for Xamarin.Essentials --- .../Cecil/StaticEventTemplateInformation.cs | 158 ++++++++++++++++++ src/EventBuilder/CommandLineOptions.cs | 3 +- src/EventBuilder/EventBuilder.csproj | 7 +- src/EventBuilder/Platforms/Android.cs | 2 + src/EventBuilder/Platforms/BasePlatform.cs | 4 +- src/EventBuilder/Platforms/Bespoke.cs | 1 + src/EventBuilder/Platforms/Essentials.cs | 63 +++++++ src/EventBuilder/Platforms/IPlatform.cs | 2 + src/EventBuilder/Platforms/Mac.cs | 2 + src/EventBuilder/Platforms/UWP.cs | 2 + src/EventBuilder/Platforms/WPF.cs | 2 + src/EventBuilder/Platforms/Winforms.cs | 2 + src/EventBuilder/Platforms/XamForms.cs | 2 + src/EventBuilder/Platforms/iOS.cs | 2 + src/EventBuilder/Program.cs | 19 ++- .../XamarinEssentialsTemplate.mustache | 35 ++++ 16 files changed, 301 insertions(+), 5 deletions(-) create mode 100644 src/EventBuilder/Cecil/StaticEventTemplateInformation.cs create mode 100644 src/EventBuilder/Platforms/Essentials.cs create mode 100644 src/EventBuilder/XamarinEssentialsTemplate.mustache diff --git a/src/EventBuilder/Cecil/StaticEventTemplateInformation.cs b/src/EventBuilder/Cecil/StaticEventTemplateInformation.cs new file mode 100644 index 0000000000..5a811c6f32 --- /dev/null +++ b/src/EventBuilder/Cecil/StaticEventTemplateInformation.cs @@ -0,0 +1,158 @@ +using EventBuilder.Entities; +using Mono.Cecil; +using System.Collections.Generic; +using System.Linq; + +namespace EventBuilder.Cecil +{ + public static class StaticEventTemplateInformation + { + private static readonly Dictionary SubstitutionList = new Dictionary + { + {"Windows.UI.Xaml.Data.PropertyChangedEventArgs", "global::System.ComponentModel.PropertyChangedEventArgs"}, + { + "Windows.UI.Xaml.Data.PropertyChangedEventHandler", + "global::System.ComponentModel.PropertyChangedEventHandler" + }, + {"Windows.Foundation.EventHandler", "EventHandler"}, + {"Windows.Foundation.EventHandler`1", "EventHandler"}, + {"Windows.Foundation.EventHandler`2", "EventHandler"} + }; + + private static string RenameBogusWinRTTypes(string typeName) + { + if (SubstitutionList.ContainsKey(typeName)) return SubstitutionList[typeName]; + return typeName; + } + + private static string GetEventArgsTypeForEvent(EventDefinition ei) + { + // Find the EventArgs type parameter of the event via digging around via reflection + var type = ei.EventType.Resolve(); + var invoke = type.Methods.First(x => x.Name == "Invoke"); + if (invoke.Parameters.Count < 1) return null; + + var param = invoke.Parameters.Count == 1 ? invoke.Parameters[0] : invoke.Parameters[1]; + var ret = RenameBogusWinRTTypes(param.ParameterType.FullName); + + var generic = ei.EventType as GenericInstanceType; + if (generic != null) + { + foreach ( + var kvp in + type.GenericParameters.Zip(generic.GenericArguments, (name, actual) => new {name, actual})) + { + var realType = GetRealTypeName(kvp.actual); + + ret = ret.Replace(kvp.name.FullName, realType); + } + } + + // NB: Inner types in Mono.Cecil get reported as 'Foo/Bar' + return ret.Replace('/', '.'); + } + + private static string GetRealTypeName(TypeDefinition t) + { + if (t.GenericParameters.Count == 0) return RenameBogusWinRTTypes(t.FullName); + + var ret = string.Format("{0}<{1}>", + RenameBogusWinRTTypes(t.Namespace + "." + t.Name), + string.Join(",", t.GenericParameters.Select(x => GetRealTypeName(x.Resolve())))); + + // NB: Inner types in Mono.Cecil get reported as 'Foo/Bar' + return ret.Replace('/', '.'); + } + + private static string GetRealTypeName(TypeReference t) + { + var generic = t as GenericInstanceType; + if (generic == null) return RenameBogusWinRTTypes(t.FullName); + + var ret = string.Format("{0}<{1}>", + RenameBogusWinRTTypes(generic.Namespace + "." + generic.Name), + string.Join(",", generic.GenericArguments.Select(x => GetRealTypeName(x)))); + + // NB: Inner types in Mono.Cecil get reported as 'Foo/Bar' + return ret.Replace('/', '.'); + } + + private static EventDefinition[] GetPublicEvents(TypeDefinition t) + { + return + t.Events + + .Where(x => + { + return x.AddMethod.IsPublic && GetEventArgsTypeForEvent(x) != null; + }) + .ToArray(); + } + + public static NamespaceInfo[] Create(AssemblyDefinition[] targetAssemblies) + { + var publicTypesWithEvents = targetAssemblies + .SelectMany(x => SafeTypes.GetSafeTypes(x)) + .Where(x => x.IsPublic && !x.HasGenericParameters) + .Select(x => new {Type = x, Events = GetPublicEvents(x)}) + .Where(x => x.Events.Length > 0) + .ToArray(); + + var garbageNamespaceList = new[] + { + "Windows.UI.Xaml.Data", + "Windows.UI.Xaml.Interop", + "Windows.UI.Xaml.Input", + "MonoTouch.AudioToolbox", + "MonoMac.AudioToolbox", + "ReactiveUI.Events" + }; + + var namespaceData = publicTypesWithEvents + .GroupBy(x => x.Type.Namespace) + .Where(x => !garbageNamespaceList.Contains(x.Key)) + .Select(x => new NamespaceInfo + { + Name = x.Key, + Types = x.Select(y => new PublicTypeInfo + { + Name = y.Type.Name, + Type = y.Type, + Events = y.Events.Select(z => new PublicEventInfo + { + Name = z.Name, + EventHandlerType = GetRealTypeName(z.EventType), + EventArgsType = GetEventArgsTypeForEvent(z) + }).ToArray() + }).ToArray() + }).ToArray(); + + foreach (var type in namespaceData.SelectMany(x => x.Types)) + { + var parentWithEvents = GetParents(type.Type).FirstOrDefault(x => GetPublicEvents(x).Any()); + if (parentWithEvents == null) + continue; + + type.Parent = new ParentInfo {Name = parentWithEvents.FullName}; + } + + return namespaceData; + } + + private static IEnumerable GetParents(TypeDefinition type) + { + var current = type.BaseType != null && type.BaseType.ToString() != "System.Object" + ? type.BaseType.Resolve() + : null; + + while (current != null) + { + yield return current.Resolve(); + + current = current.BaseType != null + ? current.BaseType.Resolve() + : null; + } + } + } +} \ No newline at end of file diff --git a/src/EventBuilder/CommandLineOptions.cs b/src/EventBuilder/CommandLineOptions.cs index a35346ef3c..289331ee93 100644 --- a/src/EventBuilder/CommandLineOptions.cs +++ b/src/EventBuilder/CommandLineOptions.cs @@ -17,7 +17,8 @@ public enum AutoPlatform WPF, XamForms, UWP, - Winforms + Winforms, + Essentials } public class CommandLineOptions diff --git a/src/EventBuilder/EventBuilder.csproj b/src/EventBuilder/EventBuilder.csproj index 63370e29dc..ee2f4cbdf2 100644 --- a/src/EventBuilder/EventBuilder.csproj +++ b/src/EventBuilder/EventBuilder.csproj @@ -18,9 +18,14 @@ - + + + + PreserveNewest + + \ No newline at end of file diff --git a/src/EventBuilder/Platforms/Android.cs b/src/EventBuilder/Platforms/Android.cs index bf6b0ae026..2e89ac3e81 100644 --- a/src/EventBuilder/Platforms/Android.cs +++ b/src/EventBuilder/Platforms/Android.cs @@ -9,6 +9,8 @@ namespace EventBuilder.Platforms { public class Android : BasePlatform { + public override AutoPlatform Platform => AutoPlatform.Android; + public Android(string referenceAssembliesLocation) { if (PlatformHelper.IsRunningOnMono()) { diff --git a/src/EventBuilder/Platforms/BasePlatform.cs b/src/EventBuilder/Platforms/BasePlatform.cs index 36fde1b35d..50d45db575 100644 --- a/src/EventBuilder/Platforms/BasePlatform.cs +++ b/src/EventBuilder/Platforms/BasePlatform.cs @@ -6,7 +6,7 @@ namespace EventBuilder.Platforms { - public class BasePlatform : IPlatform + public abstract class BasePlatform : IPlatform { public BasePlatform() { @@ -14,6 +14,8 @@ public BasePlatform() CecilSearchDirectories = new List(); } + public abstract AutoPlatform Platform { get; } + public List Assemblies { get; set; } public List CecilSearchDirectories { get; set; } } diff --git a/src/EventBuilder/Platforms/Bespoke.cs b/src/EventBuilder/Platforms/Bespoke.cs index da3110d635..520f3c71f5 100644 --- a/src/EventBuilder/Platforms/Bespoke.cs +++ b/src/EventBuilder/Platforms/Bespoke.cs @@ -6,5 +6,6 @@ namespace EventBuilder.Platforms { public class Bespoke : BasePlatform { + public override AutoPlatform Platform => AutoPlatform.None; } } \ No newline at end of file diff --git a/src/EventBuilder/Platforms/Essentials.cs b/src/EventBuilder/Platforms/Essentials.cs new file mode 100644 index 0000000000..ed6dfc42f9 --- /dev/null +++ b/src/EventBuilder/Platforms/Essentials.cs @@ -0,0 +1,63 @@ +using NuGet; +using Polly; +using Serilog; +using System; +using System.IO; +using System.Linq; + +namespace EventBuilder.Platforms +{ + public class Essentials : BasePlatform + { + private const string _packageName = "Xamarin.Essentials"; + + public override AutoPlatform Platform => AutoPlatform.Essentials; + + public Essentials() + { + var packageUnzipPath = Environment.CurrentDirectory; + + var retryPolicy = Policy + .Handle() + .WaitAndRetry( + 5, + retryAttempt => TimeSpan.FromSeconds(Math.Pow(2, retryAttempt)), + (exception, timeSpan, context) => + { + Log.Warning( + "An exception was thrown whilst retrieving or installing {packageName}: {exception}", + _packageName, exception); + }); + + retryPolicy.Execute(() => + { + var repo = PackageRepositoryFactory.Default.CreateRepository("https://packages.nuget.org/api/v2"); + var packageManager = new PackageManager(repo, packageUnzipPath); + var fpid = packageManager.SourceRepository.FindPackagesById(_packageName); + var package = fpid.Single(x => x.Version.ToString() == "0.8.0-preview"); + + packageManager.InstallPackage(package, true, true); + + Log.Debug("Using Xamarin Essentials {Version} released on {Published}", package.Version, package.Published); + Log.Debug("{ReleaseNotes}", package.ReleaseNotes); + }); + + var xamarinForms = + Directory.GetFiles(packageUnzipPath, + "Xamarin.Essentials.dll", SearchOption.AllDirectories); + + var latestVersion = xamarinForms.Last();//x => x.Contains("netstandard2.0")); + Assemblies.Add(latestVersion); + + if (PlatformHelper.IsRunningOnMono()) + { + CecilSearchDirectories.Add( + @"/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/xbuild-frameworks/.NETPortable/v4.5/Profile/Profile111"); + } + else + { + CecilSearchDirectories.Add(@"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile111"); + } + } + } +} \ No newline at end of file diff --git a/src/EventBuilder/Platforms/IPlatform.cs b/src/EventBuilder/Platforms/IPlatform.cs index d1d7b31a6a..4dab49ec9b 100644 --- a/src/EventBuilder/Platforms/IPlatform.cs +++ b/src/EventBuilder/Platforms/IPlatform.cs @@ -8,6 +8,8 @@ namespace EventBuilder.Platforms { public interface IPlatform { + AutoPlatform Platform { get; } + List Assemblies { get; set; } // Cecil when run on Mono needs some direction as to the location of the platform specific MSCORLIB. diff --git a/src/EventBuilder/Platforms/Mac.cs b/src/EventBuilder/Platforms/Mac.cs index 4490e3f1d4..50236315d9 100644 --- a/src/EventBuilder/Platforms/Mac.cs +++ b/src/EventBuilder/Platforms/Mac.cs @@ -10,6 +10,8 @@ namespace EventBuilder.Platforms // ReSharper disable once InconsistentNaming public class Mac : BasePlatform { + public override AutoPlatform Platform => AutoPlatform.Mac; + public Mac(string referenceAssembliesLocation) { if (PlatformHelper.IsRunningOnMono()) { diff --git a/src/EventBuilder/Platforms/UWP.cs b/src/EventBuilder/Platforms/UWP.cs index 1fb9070b3d..9709634597 100644 --- a/src/EventBuilder/Platforms/UWP.cs +++ b/src/EventBuilder/Platforms/UWP.cs @@ -8,6 +8,8 @@ namespace EventBuilder.Platforms { public class UWP : BasePlatform { + public override AutoPlatform Platform => AutoPlatform.UWP; + public UWP() { if (PlatformHelper.IsRunningOnMono()) diff --git a/src/EventBuilder/Platforms/WPF.cs b/src/EventBuilder/Platforms/WPF.cs index fafd025d85..f3077c517f 100644 --- a/src/EventBuilder/Platforms/WPF.cs +++ b/src/EventBuilder/Platforms/WPF.cs @@ -8,6 +8,8 @@ namespace EventBuilder.Platforms { public class WPF : BasePlatform { + public override AutoPlatform Platform => AutoPlatform.WPF; + public WPF() { if (PlatformHelper.IsRunningOnMono()) { diff --git a/src/EventBuilder/Platforms/Winforms.cs b/src/EventBuilder/Platforms/Winforms.cs index 451426d11d..aef81801b0 100644 --- a/src/EventBuilder/Platforms/Winforms.cs +++ b/src/EventBuilder/Platforms/Winforms.cs @@ -8,6 +8,8 @@ namespace EventBuilder.Platforms { public class Winforms : BasePlatform { + public override AutoPlatform Platform => AutoPlatform.Winforms; + public Winforms() { if (PlatformHelper.IsRunningOnMono()) { diff --git a/src/EventBuilder/Platforms/XamForms.cs b/src/EventBuilder/Platforms/XamForms.cs index e18f6488c2..fd08530c01 100644 --- a/src/EventBuilder/Platforms/XamForms.cs +++ b/src/EventBuilder/Platforms/XamForms.cs @@ -15,6 +15,8 @@ public class XamForms : BasePlatform { private const string _packageName = "Xamarin.Forms"; + public override AutoPlatform Platform => AutoPlatform.XamForms; + public XamForms() { var packageUnzipPath = Environment.CurrentDirectory; diff --git a/src/EventBuilder/Platforms/iOS.cs b/src/EventBuilder/Platforms/iOS.cs index 2dc6092a77..54b44569d0 100644 --- a/src/EventBuilder/Platforms/iOS.cs +++ b/src/EventBuilder/Platforms/iOS.cs @@ -10,6 +10,8 @@ namespace EventBuilder.Platforms // ReSharper disable once InconsistentNaming public class iOS : BasePlatform { + public override AutoPlatform Platform => AutoPlatform.iOS; + public iOS(string referenceAssembliesLocation) { if (PlatformHelper.IsRunningOnMono()) { diff --git a/src/EventBuilder/Program.cs b/src/EventBuilder/Program.cs index cd0ec6e572..7ada274386 100644 --- a/src/EventBuilder/Program.cs +++ b/src/EventBuilder/Program.cs @@ -41,7 +41,7 @@ private static void Main(string[] args) // allow app to be debugged in visual studio. if (Debugger.IsAttached) { //args = "--help ".Split(' '); - args = "--platform=ios".Split(' '); + args = "--platform=essentials".Split(' '); //args = new[] //{ // "--platform=none", @@ -109,6 +109,11 @@ private static void Main(string[] args) platform = new Winforms(); break; + case AutoPlatform.Essentials: + platform = new Essentials(); + _mustacheTemplate = "XamarinEssentialsTemplate.mustache"; + break; + default: throw new ArgumentOutOfRangeException(); } @@ -141,8 +146,18 @@ public static void ExtractEventsFromAssemblies(IPlatform platform) Log.Debug("Using {template} as the mustache template", _mustacheTemplate); var template = File.ReadAllText(_mustacheTemplate, Encoding.UTF8); - var namespaceData = EventTemplateInformation.Create(targetAssemblies); + var namespaceData = new Entities.NamespaceInfo[]{}; + switch (platform.Platform) + { + case AutoPlatform.Essentials: + namespaceData = StaticEventTemplateInformation.Create(targetAssemblies); + break; + default: + namespaceData = EventTemplateInformation.Create(targetAssemblies); + break; + } + var delegateData = DelegateTemplateInformation.Create(targetAssemblies); var result = Render.StringToString(template, diff --git a/src/EventBuilder/XamarinEssentialsTemplate.mustache b/src/EventBuilder/XamarinEssentialsTemplate.mustache new file mode 100644 index 0000000000..44d2cdc341 --- /dev/null +++ b/src/EventBuilder/XamarinEssentialsTemplate.mustache @@ -0,0 +1,35 @@ +#pragma warning disable 1591,0618,0105,0672 + +using System; +using System.Reactive; +using System.Reactive.Linq; +using System.Reactive.Subjects; + +{{#Namespaces}} +using {{Name}}; +{{/Namespaces}} +{{#DelegateNamespaces}} +using {{Name}}; +{{/DelegateNamespaces}} + +{{#Namespaces}} +namespace {{Name}} +{ + public static class EventsMixin + { + +{{#Types}} +{{#Events}} + public static IObservable<{{EventArgsType}}> {{#Type}}{{Name}}{{/Type}}{{Name}}(this object obj) + => Observable + .FromEvent<{{EventHandlerType}}, {{EventArgsType}}>( + x => {{#Type}}{{Name}}{{/Type}}.{{Name}} += x, + x => {{#Type}}{{Name}}{{/Type}}.{{Name}} -= x); + +{{/Events}} +{{/Types}} + } +} +{{/Namespaces}} + +#pragma warning restore 1591,0618,0105,0672 \ No newline at end of file From 57d9305050ae0ef47cdc2d5a92725b36c32db729 Mon Sep 17 00:00:00 2001 From: Michael Stonis Date: Fri, 6 Jul 2018 11:02:12 -0500 Subject: [PATCH 2/7] removed WinRT reference filtering from StaticEventTemplateInformation Since this is designed for Xamarin.Essentials, these are not necessary --- .../Cecil/StaticEventTemplateInformation.cs | 33 +++---------------- 1 file changed, 5 insertions(+), 28 deletions(-) diff --git a/src/EventBuilder/Cecil/StaticEventTemplateInformation.cs b/src/EventBuilder/Cecil/StaticEventTemplateInformation.cs index 5a811c6f32..b59d53d7e7 100644 --- a/src/EventBuilder/Cecil/StaticEventTemplateInformation.cs +++ b/src/EventBuilder/Cecil/StaticEventTemplateInformation.cs @@ -7,24 +7,6 @@ namespace EventBuilder.Cecil { public static class StaticEventTemplateInformation { - private static readonly Dictionary SubstitutionList = new Dictionary - { - {"Windows.UI.Xaml.Data.PropertyChangedEventArgs", "global::System.ComponentModel.PropertyChangedEventArgs"}, - { - "Windows.UI.Xaml.Data.PropertyChangedEventHandler", - "global::System.ComponentModel.PropertyChangedEventHandler" - }, - {"Windows.Foundation.EventHandler", "EventHandler"}, - {"Windows.Foundation.EventHandler`1", "EventHandler"}, - {"Windows.Foundation.EventHandler`2", "EventHandler"} - }; - - private static string RenameBogusWinRTTypes(string typeName) - { - if (SubstitutionList.ContainsKey(typeName)) return SubstitutionList[typeName]; - return typeName; - } - private static string GetEventArgsTypeForEvent(EventDefinition ei) { // Find the EventArgs type parameter of the event via digging around via reflection @@ -33,7 +15,7 @@ private static string GetEventArgsTypeForEvent(EventDefinition ei) if (invoke.Parameters.Count < 1) return null; var param = invoke.Parameters.Count == 1 ? invoke.Parameters[0] : invoke.Parameters[1]; - var ret = RenameBogusWinRTTypes(param.ParameterType.FullName); + var ret = param.ParameterType.FullName; var generic = ei.EventType as GenericInstanceType; if (generic != null) @@ -54,10 +36,10 @@ var kvp in private static string GetRealTypeName(TypeDefinition t) { - if (t.GenericParameters.Count == 0) return RenameBogusWinRTTypes(t.FullName); + if (t.GenericParameters.Count == 0) return t.FullName; var ret = string.Format("{0}<{1}>", - RenameBogusWinRTTypes(t.Namespace + "." + t.Name), + t.Namespace + "." + t.Name, string.Join(",", t.GenericParameters.Select(x => GetRealTypeName(x.Resolve())))); // NB: Inner types in Mono.Cecil get reported as 'Foo/Bar' @@ -67,10 +49,10 @@ private static string GetRealTypeName(TypeDefinition t) private static string GetRealTypeName(TypeReference t) { var generic = t as GenericInstanceType; - if (generic == null) return RenameBogusWinRTTypes(t.FullName); + if (generic == null) return t.FullName; var ret = string.Format("{0}<{1}>", - RenameBogusWinRTTypes(generic.Namespace + "." + generic.Name), + generic.Namespace + "." + generic.Name, string.Join(",", generic.GenericArguments.Select(x => GetRealTypeName(x)))); // NB: Inner types in Mono.Cecil get reported as 'Foo/Bar' @@ -100,11 +82,6 @@ public static NamespaceInfo[] Create(AssemblyDefinition[] targetAssemblies) var garbageNamespaceList = new[] { - "Windows.UI.Xaml.Data", - "Windows.UI.Xaml.Interop", - "Windows.UI.Xaml.Input", - "MonoTouch.AudioToolbox", - "MonoMac.AudioToolbox", "ReactiveUI.Events" }; From 92198c02da605f866d0e9a6c240d65e6494e8e4b Mon Sep 17 00:00:00 2001 From: Michael Stonis Date: Fri, 6 Jul 2018 11:03:24 -0500 Subject: [PATCH 3/7] Pinning assembly to the `netstandard2.0` version --- src/EventBuilder/Platforms/Essentials.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EventBuilder/Platforms/Essentials.cs b/src/EventBuilder/Platforms/Essentials.cs index ed6dfc42f9..cbb4394276 100644 --- a/src/EventBuilder/Platforms/Essentials.cs +++ b/src/EventBuilder/Platforms/Essentials.cs @@ -46,7 +46,7 @@ public Essentials() Directory.GetFiles(packageUnzipPath, "Xamarin.Essentials.dll", SearchOption.AllDirectories); - var latestVersion = xamarinForms.Last();//x => x.Contains("netstandard2.0")); + var latestVersion = xamarinForms.First(x => x.Contains("netstandard2.0")); Assemblies.Add(latestVersion); if (PlatformHelper.IsRunningOnMono()) From 59c50b193994668519e3e18be834339047cdb391 Mon Sep 17 00:00:00 2001 From: Michael Stonis Date: Fri, 6 Jul 2018 11:05:12 -0500 Subject: [PATCH 4/7] updating csproj formatting to be consistent with other projects --- src/EventBuilder/EventBuilder.csproj | 41 ++++++++++++++-------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/src/EventBuilder/EventBuilder.csproj b/src/EventBuilder/EventBuilder.csproj index ee2f4cbdf2..7e76136446 100644 --- a/src/EventBuilder/EventBuilder.csproj +++ b/src/EventBuilder/EventBuilder.csproj @@ -1,20 +1,19 @@  - - - Exe - net461 - EventBuilder - EventBuilder - - - - - - PreserveNewest - - - - + + Exe + net461 + EventBuilder + EventBuilder + + + + + + PreserveNewest + + + + @@ -23,9 +22,9 @@ - - - PreserveNewest - - + + + PreserveNewest + + \ No newline at end of file From 8f3b10dafb177ed872ebc41a98ca45efd45c6f27 Mon Sep 17 00:00:00 2001 From: Michael Stonis Date: Mon, 6 Aug 2018 19:50:13 -0400 Subject: [PATCH 5/7] update to latest packages This also required changing the framework to netstandard 1.0, but I have no idea why --- src/EventBuilder/Platforms/Essentials.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/EventBuilder/Platforms/Essentials.cs b/src/EventBuilder/Platforms/Essentials.cs index cbb4394276..d5af0807eb 100644 --- a/src/EventBuilder/Platforms/Essentials.cs +++ b/src/EventBuilder/Platforms/Essentials.cs @@ -34,7 +34,7 @@ public Essentials() var repo = PackageRepositoryFactory.Default.CreateRepository("https://packages.nuget.org/api/v2"); var packageManager = new PackageManager(repo, packageUnzipPath); var fpid = packageManager.SourceRepository.FindPackagesById(_packageName); - var package = fpid.Single(x => x.Version.ToString() == "0.8.0-preview"); + var package = fpid.Single(x => x.Version.ToString() == "0.9.1-preview"); packageManager.InstallPackage(package, true, true); @@ -46,7 +46,7 @@ public Essentials() Directory.GetFiles(packageUnzipPath, "Xamarin.Essentials.dll", SearchOption.AllDirectories); - var latestVersion = xamarinForms.First(x => x.Contains("netstandard2.0")); + var latestVersion = xamarinForms.First(x => x.Contains("netstandard1.0")); Assemblies.Add(latestVersion); if (PlatformHelper.IsRunningOnMono()) From 16481090de89bc02a074ef9f8bce940f31231799 Mon Sep 17 00:00:00 2001 From: Michael Stonis Date: Mon, 6 Aug 2018 19:51:45 -0400 Subject: [PATCH 6/7] Updated the Xamarin.Forms template This now matches the standard event format. One thing that was immediately bad about the last implementation is that it caused a lot of chaff in intellisense, since every object would have these extensions. I changed this to not be extension methods, but just static instances that can be called from wherever and the experience is far better this way. I am open to reverting it though. --- src/EventBuilder/XamarinEssentialsTemplate.mustache | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/EventBuilder/XamarinEssentialsTemplate.mustache b/src/EventBuilder/XamarinEssentialsTemplate.mustache index 44d2cdc341..577ffde5bf 100644 --- a/src/EventBuilder/XamarinEssentialsTemplate.mustache +++ b/src/EventBuilder/XamarinEssentialsTemplate.mustache @@ -15,16 +15,17 @@ using {{Name}}; {{#Namespaces}} namespace {{Name}} { - public static class EventsMixin + public static class Events { {{#Types}} {{#Events}} - public static IObservable<{{EventArgsType}}> {{#Type}}{{Name}}{{/Type}}{{Name}}(this object obj) + public static IObservable<{{EventArgsType}}> {{#Type}}{{Name}}{{/Type}}{{Name}}() => Observable - .FromEvent<{{EventHandlerType}}, {{EventArgsType}}>( + .FromEventPattern<{{EventArgsType}}>( x => {{#Type}}{{Name}}{{/Type}}.{{Name}} += x, - x => {{#Type}}{{Name}}{{/Type}}.{{Name}} -= x); + x => {{#Type}}{{Name}}{{/Type}}.{{Name}} -= x) + .Select(x => x.EventArgs); {{/Events}} {{/Types}} From 83d5925dbd6e23b4586de2d6d185f7a72e3b1fd5 Mon Sep 17 00:00:00 2001 From: Michael Stonis Date: Mon, 6 Aug 2018 20:36:33 -0400 Subject: [PATCH 7/7] move XamarinEssentialsTemplate to same ItemGroup Merge remote-tracking branch 'upstream/master' into feature/xamarin-essentials-events fix-up Tizen base platform implementation --- README.md | 145 ++++++------ build.cake | 15 +- samples/stylecop.json | 2 +- .../Cinephile.Core.licenseheader | 4 +- .../HttpTools/HttpLoggingHandler.cs | 2 +- .../Cinephile.Core/Models/IMovieService.cs | 2 +- .../Cinephile.Core/Models/Movie.cs | 2 +- .../Cinephile.Core/Models/MovieService.cs | 2 +- .../Cinephile.Core/Properties/AssemblyInfo.cs | 2 +- .../Cinephile.Core/Rest/ApiService.cs | 2 +- .../Cinephile.Core/Rest/Cache.cs | 2 +- .../ImageConfigurationDto.cs | 2 +- .../Dtos/ImageConfigurations/ImagesDto.cs | 2 +- .../Rest/Dtos/Movies/GenreDto.cs | 2 +- .../Rest/Dtos/Movies/GenresDto.cs | 2 +- .../Rest/Dtos/Movies/MovieDates.cs | 2 +- .../Rest/Dtos/Movies/MovieDto.cs | 2 +- .../Rest/Dtos/Movies/MovieResult.cs | 2 +- .../Cinephile.Core/Rest/IApiService.cs | 2 +- .../Cinephile.Core/Rest/ICache.cs | 2 +- .../Cinephile.Core/Rest/IRestApiClient.cs | 2 +- .../xamarin-forms/Cinephile.Core/app.config | 2 +- .../Cinephile.Core/packages.config | 2 +- .../Cinephile.UnitTests.licenseheader | 4 +- .../Model/MovieServiceTest.cs | 2 +- .../Cinephile.UnitTests/app.config | 2 +- .../Cinephile.UnitTests/packages.config | 2 +- samples/xamarin-forms/Cinephile/App.xaml.cs | 2 +- .../Cinephile/AppBootstrapper.cs | 2 +- .../Cinephile/Cinephile.licenseheader | 4 +- .../Cinephile/Properties/AssemblyInfo.cs | 2 +- .../ViewModels/MovieDetailViewModel.cs | 2 +- .../ViewModels/UpcomingMoviesCellViewModel.cs | 2 +- .../ViewModels/UpcomingMoviesListViewModel.cs | 2 +- .../Cinephile/ViewModels/ViewModelBase.cs | 2 +- .../Cinephile/Views/ContentPageBase.cs | 2 +- .../Cinephile/Views/MovieDetailView.xaml.cs | 2 +- .../Views/UpcomingMoviesCellView.xaml.cs | 2 +- .../Views/UpcomingMoviesListView.xaml.cs | 2 +- samples/xamarin-forms/Cinephile/app.config | 2 +- .../xamarin-forms/Cinephile/packages.config | 2 +- .../Droid/AkavacheSqliteLinkerOverride.cs | 2 +- .../xamarin-forms/Droid/Droid.licenseheader | 4 +- samples/xamarin-forms/Droid/MainActivity.cs | 2 +- .../Droid/Properties/AndroidManifest.xml | 2 +- .../Droid/Properties/AssemblyInfo.cs | 2 +- .../Droid/Resources/values/styles.xml | 2 +- samples/xamarin-forms/Droid/app.config | 2 +- samples/xamarin-forms/Droid/packages.config | 2 +- .../iOS/AkavacheSqliteLinkerOverride.cs | 2 +- samples/xamarin-forms/iOS/AppDelegate.cs | 2 +- samples/xamarin-forms/iOS/Main.cs | 2 +- samples/xamarin-forms/iOS/app.config | 2 +- samples/xamarin-forms/iOS/iOS.licenseheader | 4 +- samples/xamarin-forms/iOS/packages.config | 2 +- script/setversion.csproj | 2 +- src/Directory.build.props | 10 +- src/Directory.build.targets | 11 +- src/EventBuilder/App.config | 2 +- .../Cecil/DelegateTemplateInformation.cs | 2 +- .../Cecil/EventTemplateInformation.cs | 47 +++- .../Cecil/PathSearchAssemblyResolver.cs | 2 +- src/EventBuilder/Cecil/SafeTypes.cs | 2 +- src/EventBuilder/CommandLineOptions.cs | 5 +- src/EventBuilder/DefaultTemplate.mustache | 2 +- .../Entities/MultiParameterMethod.cs | 2 +- src/EventBuilder/Entities/NamespaceInfo.cs | 2 +- src/EventBuilder/Entities/ParentInfo.cs | 2 +- src/EventBuilder/Entities/PublicEventInfo.cs | 2 +- src/EventBuilder/Entities/PublicTypeInfo.cs | 2 +- .../Entities/SingleParameterMethod.cs | 2 +- src/EventBuilder/EventBuilder.csproj | 8 +- src/EventBuilder/EventBuilder.licenseheader | 4 +- src/EventBuilder/EventBuilder.sln | 13 +- src/EventBuilder/PlatformHelper.cs | 2 +- src/EventBuilder/Platforms/Android.cs | 2 +- src/EventBuilder/Platforms/BasePlatform.cs | 2 +- src/EventBuilder/Platforms/Bespoke.cs | 2 +- src/EventBuilder/Platforms/IPlatform.cs | 2 +- src/EventBuilder/Platforms/Mac.cs | 2 +- src/EventBuilder/Platforms/Tizen.cs | 58 +++++ src/EventBuilder/Platforms/UWP.cs | 2 +- src/EventBuilder/Platforms/WPF.cs | 2 +- src/EventBuilder/Platforms/Winforms.cs | 2 +- src/EventBuilder/Platforms/XamForms.cs | 7 +- src/EventBuilder/Platforms/iOS.cs | 2 +- src/EventBuilder/Program.cs | 10 +- .../ControlFetcherMixin.cs | 61 +++--- .../ReactiveAppCompatActivity.cs | 2 +- .../ReactiveDialogFragment.cs | 2 +- .../ReactiveFragment.cs | 2 +- .../ReactiveFragmentActivity.cs | 2 +- .../ReactivePagerAdapter.cs | 2 +- .../ReactiveRecyclerViewAdapter.cs | 2 +- .../ReactiveUI.AndroidSupport.csproj | 9 +- .../ReactiveUI.AndroidSupport.licenseheader | 4 +- .../FollowObservableStateBehavior.cs | 2 +- .../Platforms/net461/ObservableTrigger.cs | 2 +- .../Platforms/uap10.0.16299/Behavior.cs | 2 +- .../ObservableTriggerBehavior.cs | 2 +- .../Properties/ReactiveUI.Blend_UWP.rd.xml | 2 +- src/ReactiveUI.Blend/ReactiveUI.Blend.csproj | 12 +- .../ReactiveUI.Blend.licenseheader | 4 +- .../ReactiveUI.Events.WPF.csproj | 7 +- .../ReactiveUI.Events.WPF.licenseheader | 4 +- .../ReactiveUI.Events.Winforms.csproj | 7 +- .../ReactiveUI.Events.Winforms.licenseheader | 4 +- .../ReactiveUI.Events.XamForms.csproj | 8 +- .../ReactiveUI.Events.XamForms.licenseheader | 4 +- .../ReactiveUI.Events.csproj | 14 +- .../ReactiveUI.Events.licenseheader | 4 +- src/ReactiveUI.Events/SingleAwaitSubject.cs | 2 +- .../ObservableAsPropertyAttribute.cs | 2 +- .../ObservableAsPropertyExtensions.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../ReactiveAttribute.cs | 2 +- .../ReactiveDependencyAttribute.cs | 2 +- .../ReactiveUI.Fody.Helpers.csproj | 8 +- .../ReactiveUI.Fody.Helpers.licenseheader | 4 +- .../API/ApiApprovalTests.cs | 2 +- src/ReactiveUI.Fody.Tests/FodyWeavers.xml | 2 +- .../Issues/Issue10Tests.cs | 2 +- .../Issues/Issue11Tests.cs | 2 +- .../Issues/Issue13Tests.cs | 2 +- .../ObservableAsPropertyTests.cs | 2 +- .../ReactiveDependencyTests.cs | 2 +- .../ReactiveUI.Fody.Tests.csproj | 13 +- .../ReactiveUI.Fody.Tests.licenseheader | 4 +- src/ReactiveUI.Fody/CecilExtensions.cs | 2 +- src/ReactiveUI.Fody/ModuleWeaver.cs | 2 +- .../ObservableAsPropertyWeaver.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../ReactiveDependencyPropertyWeaver.cs | 2 +- .../ReactiveUI.Fody.licenseheader | 4 +- .../ReactiveUIPropertyWeaver.cs | 2 +- .../ReactiveUI.LeakTests.csproj | 10 +- .../Properties/ReactiveUI.Testing.rd.xml | 2 +- .../ReactiveUI.Testing.csproj | 9 +- .../ReactiveUI.Testing.licenseheader | 4 +- src/ReactiveUI.Testing/TestUtils.cs | 2 +- .../ApiApprovalTests.ReactiveUI.approved.txt | 1 - src/ReactiveUI.Tests/API/ApiApprovalTests.cs | 2 +- .../Activation/ActivatingView.cs | 2 +- .../Activation/ActivatingViewFetcher.cs | 2 +- .../Activation/ActivatingViewModel.cs | 2 +- .../Activation/ActivatingViewModelTests.cs | 2 +- .../Activation/ActivatingViewTests.cs | 2 +- .../Activation/CanActivateViewFetcherTests.cs | 2 +- .../Activation/DerivedActivatingViewModel.cs | 2 +- .../Activation/ViewModelActivatorTests.cs | 2 +- src/ReactiveUI.Tests/AutoPersistHelperTest.cs | 2 +- src/ReactiveUI.Tests/AwaiterTest.cs | 2 +- .../BindingTypeConvertersTest.cs | 2 +- src/ReactiveUI.Tests/CommandBindingTests.cs | 2 +- .../DependencyResolverTests.cs | 2 +- .../INPCObservableForPropertyTests.cs | 2 +- src/ReactiveUI.Tests/InteractionsTest.cs | 2 +- src/ReactiveUI.Tests/MessageBusTest.cs | 2 +- .../ObservableAsPropertyHelperTest.cs | 2 +- .../ObservedChangedMixinTest.cs | 2 +- src/ReactiveUI.Tests/OrderedComparerTests.cs | 2 +- .../Platforms/android/MainActivity.cs | 2 +- .../android/PropertyBindingTestViews.cs | 2 +- .../Platforms/cocoa/AppDelegate.cs | 2 +- .../Platforms/cocoa/IndexNormalizerTest.cs | 2 +- .../Platforms/cocoa/KVOBindingTests.cs | 2 +- src/ReactiveUI.Tests/Platforms/cocoa/Main.cs | 2 +- .../cocoa/PropertyBindingTestViews.cs | 2 +- .../Platforms/cocoa/UnitTestAppDelegate.cs | 2 +- .../Platforms/winforms/ActivationTests.cs | 2 +- .../Platforms/winforms/CommandBindingTests.cs | 2 +- .../winforms/DefaultPropertyBindingTests.cs | 2 +- .../winforms/ReactiveBindingListTests.cs | 2 +- .../Platforms/winforms/RoutedViewHostTests.cs | 2 +- .../winforms/ViewModelViewHostTests.cs | 2 +- .../xaml/ActivationForViewFetcherTest.cs | 2 +- ...pendencyObjectObservableForPropertyTest.cs | 2 +- .../xaml/PropertyBindingTestViews.cs | 2 +- src/ReactiveUI.Tests/PropertyBindingTest.cs | 2 +- .../ReactiveCollectionTest.cs | 206 +++++++++++++++++- src/ReactiveUI.Tests/ReactiveCommandTest.cs | 2 +- .../ReactiveNotifyPropertyChangedMixinTest.cs | 2 +- src/ReactiveUI.Tests/ReactiveObjectTest.cs | 2 +- src/ReactiveUI.Tests/ReactiveUI.Tests.csproj | 19 +- .../ReactiveUI.Tests.licenseheader | 4 +- .../RoutableViewModelMixinTests.cs | 2 +- src/ReactiveUI.Tests/RoutingState.cs | 2 +- src/ReactiveUI.Tests/RxAppTest.cs | 2 +- src/ReactiveUI.Tests/TestLogger.cs | 2 +- src/ReactiveUI.Tests/TestUtilsTest.cs | 2 +- src/ReactiveUI.Tests/Utility.cs | 2 +- src/ReactiveUI.Tests/ViewLocatorTests.cs | 2 +- .../WaitForDispatcherSchedulerTests.cs | 89 ++++++++ src/ReactiveUI.Tests/WeakEventManagerTest.cs | 2 +- .../ActivationForViewFetcher.cs | 2 +- .../CreatesCommandBinding.cs | 2 +- ...llectionChangedToListChangedTransformer.cs | 2 +- src/ReactiveUI.Winforms/PlatformOperations.cs | 2 +- .../ReactiveBindingList.cs | 2 +- .../ReactiveDerivedBindingListMixins.cs | 2 +- .../ReactiveUI.Winforms.csproj | 5 +- .../ReactiveUI.Winforms.licenseheader | 4 +- src/ReactiveUI.Winforms/Registrations.cs | 2 +- src/ReactiveUI.Winforms/RoutedViewHost.cs | 2 +- src/ReactiveUI.Winforms/ViewModelViewHost.cs | 2 +- .../WeakEventManagerShims.cs | 2 +- .../WinformsCreatesObservableForProperty.cs | 2 +- src/ReactiveUI.Wpf/Attributes.cs | 2 +- src/ReactiveUI.Wpf/ReactiveUI.Wpf.csproj | 13 +- .../ReactiveUI.Wpf.licenseheader | 4 +- src/ReactiveUI.Wpf/Registrations.cs | 2 +- .../TransitioningContentControl.cs | 2 +- src/ReactiveUI.Wpf/WpfAutoSuspendHelper.cs | 2 +- ...pfDependencyObjectObservableForProperty.cs | 2 +- .../ActivationForViewFetcher.cs | 2 +- .../ReactiveCarouselPage.cs | 2 +- .../ReactiveContentPage.cs | 2 +- .../ReactiveContentView.cs | 2 +- src/ReactiveUI.XamForms/ReactiveEntryCell.cs | 2 +- src/ReactiveUI.XamForms/ReactiveImageCell.cs | 2 +- .../ReactiveMasterDetailPage.cs | 2 +- src/ReactiveUI.XamForms/ReactiveMultiPage.cs | 2 +- .../ReactiveNavigationPage.cs | 2 +- src/ReactiveUI.XamForms/ReactiveSwitchCell.cs | 2 +- src/ReactiveUI.XamForms/ReactiveTabbedPage.cs | 2 +- src/ReactiveUI.XamForms/ReactiveTextCell.cs | 2 +- .../ReactiveUI.XamForms.csproj | 7 +- .../ReactiveUI.XamForms.licenseheader | 4 +- src/ReactiveUI.XamForms/ReactiveViewCell.cs | 2 +- src/ReactiveUI.XamForms/Registrations.cs | 2 +- src/ReactiveUI.XamForms/RoutedViewHost.cs | 2 +- src/ReactiveUI.XamForms/ViewModelViewHost.cs | 2 +- .../Activation/CanActivateViewFetcher.cs | 2 +- .../Activation/IActivationForViewFetcher.cs | 2 +- src/ReactiveUI/Activation/ViewForMixins.cs | 2 +- .../Activation/ViewModelActivator.cs | 2 +- src/ReactiveUI/AutoPersistHelper.cs | 2 +- src/ReactiveUI/BindingTypeConverters.cs | 2 +- src/ReactiveUI/CollectionDebugView.cs | 2 +- src/ReactiveUI/CommandBinding.cs | 2 +- src/ReactiveUI/CompatMixins.cs | 2 +- src/ReactiveUI/ContractStubs.cs | 2 +- src/ReactiveUI/CreatesCommandBinding.cs | 2 +- src/ReactiveUI/DisposableMixins.cs | 2 +- src/ReactiveUI/ExpressionMixins.cs | 2 +- src/ReactiveUI/ExpressionRewriter.cs | 2 +- src/ReactiveUI/IDependencyResolver.cs | 4 +- src/ReactiveUI/INPCObservableForProperty.cs | 2 +- src/ReactiveUI/IROObservableForProperty.cs | 2 +- src/ReactiveUI/IReactiveObject.cs | 2 +- src/ReactiveUI/Interactions.cs | 2 +- src/ReactiveUI/Interfaces.cs | 2 +- src/ReactiveUI/LoggingMixins.cs | 2 +- src/ReactiveUI/MessageBus.cs | 2 +- src/ReactiveUI/ObservableAsPropertyHelper.cs | 2 +- src/ReactiveUI/Observables.cs | 2 +- src/ReactiveUI/ObservedChangedMixin.cs | 2 +- src/ReactiveUI/OrderedComparer.cs | 2 +- src/ReactiveUI/POCOObservableForProperty.cs | 2 +- .../android/AndroidCommandBinders.cs | 2 +- .../android/AndroidObservableForWidgets.cs | 2 +- .../Platforms/android/AndroidUIScheduler.cs | 2 +- .../Platforms/android/AutoSuspendHelper.cs | 2 +- .../android/BundleSuspensionDriver.cs | 2 +- .../Platforms/android/ContextExtensions.cs | 2 +- .../Platforms/android/ControlFetcherMixin.cs | 2 +- .../android/FlexibleCommandBinder.cs | 2 +- .../Platforms/android/LayoutViewHost.cs | 2 +- .../Platforms/android/LinkerOverrides.cs | 2 +- .../Platforms/android/ObjectExtension.cs | 2 +- .../Platforms/android/PlatformOperations.cs | 2 +- .../android/PlatformRegistrations.cs | 2 +- .../Platforms/android/ReactiveActivity.cs | 2 +- .../Platforms/android/ReactiveFragment.cs | 2 +- .../Platforms/android/ReactiveListAdapter.cs | 2 +- .../android/ReactivePreferenceActivity.cs | 2 +- .../android/ReactivePreferenceFragment.cs | 2 +- .../android/SharedPreferencesExtensions.cs | 2 +- .../Platforms/android/UsbManagerExtensions.cs | 2 +- .../android/ViewCommandExtensions.cs | 2 +- .../AutoLayoutViewModelViewHost.cs | 2 +- .../apple-common/Buildsupport/Linker.xml | 2 +- .../Converters/DateTimeToNSDateConverter.cs | 2 +- .../Platforms/apple-common/IndexNormalizer.cs | 2 +- .../apple-common/JsonSuspensionDriver.cs | 2 +- .../apple-common/KVOObservableForProperty.cs | 2 +- .../apple-common/NSRunloopScheduler.cs | 2 +- .../apple-common/ObservableForPropertyBase.cs | 2 +- .../apple-common/PlatformOperations.cs | 2 +- .../Platforms/apple-common/ReactiveControl.cs | 2 +- .../apple-common/ReactiveImageView.cs | 2 +- .../Platforms/apple-common/ReactiveNSView.cs | 2 +- .../apple-common/ReactiveNSViewController.cs | 2 +- .../ReactiveSplitViewController.cs | 2 +- .../apple-common/TargetActionCommandBinder.cs | 2 +- .../apple-common/ViewModelViewHost.cs | 2 +- .../Platforms/ios/AutoSuspendHelper.cs | 2 +- .../Platforms/ios/CommonReactiveSource.cs | 2 +- .../Platforms/ios/FlexibleCommandBinder.cs | 2 +- .../Platforms/ios/LinkerOverrides.cs | 2 +- .../Platforms/ios/PlatformRegistrations.cs | 2 +- .../ios/ReactiveCollectionReusableView.cs | 2 +- .../Platforms/ios/ReactiveCollectionView.cs | 2 +- .../ios/ReactiveCollectionViewCell.cs | 2 +- .../ios/ReactiveCollectionViewController.cs | 2 +- .../ios/ReactiveCollectionViewSource.cs | 2 +- .../ios/ReactiveNavigationController.cs | 2 +- .../ios/ReactivePageViewController.cs | 2 +- .../Platforms/ios/ReactiveTabBarController.cs | 2 +- .../Platforms/ios/ReactiveTableView.cs | 2 +- .../Platforms/ios/ReactiveTableViewCell.cs | 2 +- .../ios/ReactiveTableViewController.cs | 2 +- .../Platforms/ios/ReactiveTableViewSource.cs | 2 +- .../Platforms/ios/RoutedViewHost.cs | 2 +- .../ios/UIControlCommandExtensions.cs | 2 +- .../Platforms/ios/UIKitCommandBinders.cs | 2 +- .../ios/UIKitObservableForProperty.cs | 2 +- .../Platforms/mac/AppKitAutoSuspendHelper.cs | 2 +- .../mac/AppKitObservableForProperty.cs | 2 +- .../Platforms/mac/PlatformRegistrations.cs | 2 +- .../mac/ReactiveNSWindowController.cs | 2 +- .../net461/ComponentModelTypeConverter.cs | 2 +- .../Platforms/net461/PlatformRegistrations.cs | 2 +- .../netcoreapp2.0/PlatformRegistrations.cs | 2 +- .../netstandard2.0/PlatformRegistrations.cs | 2 +- .../Platforms/tizen/EcoreMainloopScheduler.cs | 52 +++++ .../Platforms/tizen/PlatformOperations.cs | 17 ++ .../Platforms/tizen/PlatformRegistrations.cs | 20 ++ .../DependencyObjectObservableForProperty.cs | 2 +- .../uap10.0.16299/PlatformRegistrations.cs | 2 +- .../TransitioningContentControl.Empty.cs | 2 +- .../uap10.0.16299/WinRTAppDataDriver.cs | 2 +- .../WinRTAutoSuspendApplication.cs | 2 +- .../ActivationForViewFetcher.cs | 2 +- .../AutoDataTemplateBindingHook.cs | 2 +- .../windows-common/BindingTypeConverters.cs | 2 +- .../windows-common/PlatformOperations.cs | 2 +- .../windows-common/ReactiveUserControl.cs | 2 +- .../windows-common/RoutedViewHost.cs | 2 +- .../windows-common/ViewModelViewHost.cs | 2 +- .../ComponentModelTypeConverter.cs | 2 +- src/ReactiveUI/Properties/AssemblyInfo.cs | 2 +- src/ReactiveUI/PropertyBinding.cs | 2 +- src/ReactiveUI/ReactiveBinding.cs | 2 +- src/ReactiveUI/ReactiveCollectionMixins.cs | 2 +- src/ReactiveUI/ReactiveCommand.cs | 2 +- src/ReactiveUI/ReactiveList.cs | 46 ++-- .../ReactiveNotifyPropertyChangedMixin.cs | 2 +- src/ReactiveUI/ReactiveObject.cs | 2 +- src/ReactiveUI/ReactiveUI.csproj | 40 ++-- src/ReactiveUI/ReactiveUI.licenseheader | 4 +- src/ReactiveUI/RefcountDisposeWrapper.cs | 2 +- src/ReactiveUI/Reflection.cs | 2 +- src/ReactiveUI/RegisterableInterfaces.cs | 2 +- src/ReactiveUI/Registrations.cs | 2 +- src/ReactiveUI/RoutableViewModelMixin.cs | 2 +- src/ReactiveUI/RoutingState.cs | 2 +- src/ReactiveUI/RxApp.cs | 2 +- src/ReactiveUI/ScheduledSubject.cs | 2 +- src/ReactiveUI/SuspensionHost.cs | 2 +- src/ReactiveUI/UnhandledErrorException.cs | 2 +- src/ReactiveUI/VariadicTemplates.cs | 2 +- src/ReactiveUI/ViewAttributes.cs | 2 +- src/ReactiveUI/ViewLocator.cs | 2 +- src/ReactiveUI/WaitForDispatcherScheduler.cs | 35 +-- src/ReactiveUI/WeakEventManager.cs | 2 +- src/global.json | 5 + 367 files changed, 1114 insertions(+), 634 deletions(-) create mode 100644 src/EventBuilder/Platforms/Tizen.cs mode change 100644 => 100755 src/ReactiveUI.Tests/Platforms/winforms/CommandBindingTests.cs mode change 100644 => 100755 src/ReactiveUI.Tests/Platforms/winforms/RoutedViewHostTests.cs create mode 100644 src/ReactiveUI.Tests/WaitForDispatcherSchedulerTests.cs mode change 100644 => 100755 src/ReactiveUI.Winforms/CreatesCommandBinding.cs create mode 100644 src/ReactiveUI/Platforms/tizen/EcoreMainloopScheduler.cs create mode 100644 src/ReactiveUI/Platforms/tizen/PlatformOperations.cs create mode 100644 src/ReactiveUI/Platforms/tizen/PlatformRegistrations.cs mode change 100644 => 100755 src/ReactiveUI/Platforms/windows-common/ReactiveUserControl.cs create mode 100644 src/global.json diff --git a/README.md b/README.md index 16bae4afd6..e077bcfc53 100644 --- a/README.md +++ b/README.md @@ -1,48 +1,37 @@ [![NuGet Stats](https://img.shields.io/nuget/v/reactiveui.svg)](https://www.nuget.org/packages/reactiveui) [![Build status](https://dotnetfoundation.visualstudio.com/_apis/public/build/definitions/a5852744-a77d-4d76-a9d2-81ac1fdd5744/11/badge)](https://dotnetfoundation.visualstudio.com/ReactiveUI/ReactiveUI%20Team/_build/index?definitionId=11) - [![Coverage Status](https://coveralls.io/repos/github/reactiveui/ReactiveUI/badge.svg?branch=develop)](https://coveralls.io/github/reactiveui/ReactiveUI?branch=develop) [![#yourfirstpr](https://img.shields.io/badge/first--timers--only-friendly-blue.svg)](https://reactiveui.net/contribute) [![Pull Request Stats](http://www.issuestats.com/github/reactiveui/reactiveui/badge/pr?style=flat)](http://www.issuestats.com/github/reactiveui/reactiveui) [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Freactiveui%2FReactiveUI.svg?type=shield)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Freactiveui%2FReactiveUI?ref=badge_shield) - - -
- - - -
-
- - - - - - - - - - - - -

ReactiveUI

-

- ReactiveUI is a composable, cross-platform model-view-viewmodel framework for all .NET platforms that is inspired by functional reactive programming which is a paradigm that allows you to abstract mutable state away from your user interfaces and express the idea around a feature in one readable place and improve the testability of your application. -

-

- -

Table of Contents

- -* [Introduction](#introduction) -* [A Compelling Example](#a-compelling-example) -* [Support](#support) -* [Contribute](#contribute) -* [Showcase](#showcase) -* [Sponsorship](#sponsorship) - -

Introduction

+ [![Coverage Status](https://coveralls.io/repos/github/reactiveui/ReactiveUI/badge.svg?branch=develop)](https://coveralls.io/github/reactiveui/ReactiveUI?branch=develop) [![#yourfirstpr](https://img.shields.io/badge/first--timers--only-friendly-blue.svg)](https://reactiveui.net/contribute) [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Freactiveui%2FReactiveUI.svg?type=shield)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Freactiveui%2FReactiveUI?ref=badge_shield) +
+ + + + + + + + + + + + +
+
+ + + +
+

What is ReactiveUI?

+ +ReactiveUI is a composable, cross-platform model-view-viewmodel framework for all .NET platforms that is inspired by functional reactive programming which is a paradigm that allows you to abstract mutable state away from your user interfaces and express the idea around a feature in one readable place and improve the testability of your application. + +🔨 Get Started, 🛍 Install Packages, 🎞 Watch Videos, 🎓 View Samples, 🎤 Discuss ReactiveUI + +

Introduction to Reactive Programming

Long ago, when computer programming first came to be, machines had to be programmed quite manually. If the technician entered the correct sequence of machine codes in the correct order, then the resulting program behavior would satisfy the business requirements. Instead of telling a computer how to do its job, which error-prone and relies too heavily on the infallibility of the programmer, why don't we just tell it what it's job is and let it figure the rest out? ReactiveUI is inspired by the paradigm of Functional Reactive Programming, which allows you to model user input as a function that changes over time. This is super cool because it allows you to abstract mutable state away from your user interfaces and express the idea around a feature in one readable place whilst improving application testability. Reactive programming can look scary and complex at first glance, but the best way to describe reactive programming is to think of a spreadsheet: -![](https://reactiveui.net/images/frp-excel.gif) - +![](https://reactiveui.net/docs/frp-excel.gif) * Three cells, A, B, and C. * C is defined as the sum of A and B. @@ -50,71 +39,69 @@ ReactiveUI is inspired by the paradigm of Functional Reactive Programming, which That's reactive programming: changes propagate throughout a system automatically. Welcome to the peanut butter and jelly of programming paradigms. For further information please watch the this video from the Xamarin Evolve conference - [Why You Should Be Building Better Mobile Apps with Reactive Programming](http://www.youtube.com/watch?v=DYEbUF4xs1Q) by Michael Stonis. -

A Compelling Example

+

A Compelling Example

Let’s say you have a text field, and whenever the user types something into it, you want to make a network request which searches for that query. - ![](http://i.giphy.com/xTka02wR2HiFOFACoE.gif) ```csharp public interface ISearchViewModel { - ReactiveList SearchResults { get; } - string SearchQuery { get; } - ReactiveCommand> Search { get; } - ISearchService SearchService { get; } + string SearchQuery { get; set; } + ReactiveCommand> Search { get; } + ReactiveList SearchResults { get; } } ``` -

Define under what conditions a network request will be made

+

Define under what conditions a network request will be made

```csharp // Here we're describing here, in a *declarative way*, the conditions in // which the Search command is enabled. Now our Command IsEnabled is // perfectly efficient, because we're only updating the UI in the scenario // when it should change. -var canSearch = this.WhenAny(x => x.SearchQuery, x => !String.IsNullOrWhiteSpace(x.Value)); +var canSearch = this.WhenAnyValue(x => x.SearchQuery, query => !string.IsNullOrWhiteSpace(query)); ``` -

Make the network connection

+

Make the network connection

```csharp // ReactiveCommand has built-in support for background operations and // guarantees that this block will only run exactly once at a time, and // that the CanExecute will auto-disable and that property IsExecuting will // be set accordingly whilst it is running. -Search = ReactiveCommand.CreateFromTask>(_ => - searchService.Search(this.SearchQuery), canSearch); +Search = ReactiveCommand.CreateFromTask(_ => searchService.Search(this.SearchQuery), canSearch); ``` -

Update the user interface

+

Update the user interface

```csharp // ReactiveCommands are themselves IObservables, whose value are the results // from the async method, guaranteed to arrive on the UI thread. We're going // to take the list of search results that the background operation loaded, // and them into our SearchResults. -Search.Subscribe(results => { +Search.Subscribe(results => +{ SearchResults.Clear(); SearchResults.AddRange(results); }); ``` -

Handling failures

+

Handling failures

```csharp // ThrownExceptions is any exception thrown from the CreateAsyncTask piped // to this Observable. Subscribing to this allows you to handle errors on // the UI thread. -Search.ThrownExceptions - .Subscribe(ex => { - UserError.Throw("Potential Network Connectivity Error", ex); - }); +Search.ThrownExceptions.Subscribe(error => +{ + UserError.Throw("Potential Network Connectivity Error", error); +}); ``` -

Throttling network requests and automatic search execution behaviour

+

Throttling network requests and automatic search execution behaviour

```csharp // Whenever the Search query changes, we're going to wait for one second @@ -124,7 +111,7 @@ this.WhenAnyValue(x => x.SearchQuery) .InvokeCommand(Search); ``` -

Support

+

Support

If you have a question, please see if any discussions in our [GitHub issues](github.com/reactiveui/ReactiveUI/issues) or [Stack Overflow](https://stackoverflow.com/questions/tagged/reactiveui) have already answered it. @@ -134,9 +121,7 @@ If you are twitter savvy you can tweet #reactiveui with your question and someon If you have discovered a 🐜 or have a feature suggestion, feel free to create an issue on GitHub. - -

Contribute

- +

Contribute

ReactiveUI is developed under an OSI-approved open source license, making it freely usable and distributable, even for commercial use. Because of our Open Collective model for funding and transparency, we are able to funnel support and funds through to our contributors and community. We ❤ the people who are involved in this project, and we’d love to have you on board, especially if you are just getting started or have never contributed to open-source before. @@ -151,23 +136,25 @@ So here's to you, lovely person who wants to join us — this is how you can sup We're also looking for people to assist with code reviews of ReactiveUI contributions. If you're experienced with any of the below technologies, you can join the team and receive notifications: - - [Android reviewers](https://github.com/orgs/reactiveui/teams/reviewers-android) - - [Core reviewers](https://github.com/orgs/reactiveui/teams/reviewers-core) - - [iOS reviewers](https://github.com/orgs/reactiveui/teams/reviewers-ios) - - [Mac reviewers](https://github.com/orgs/reactiveui/teams/reviewers-mac) - - [UWP reviewers](https://github.com/orgs/reactiveui/teams/reviewers-uwp) - - [WinForms reviewers](https://github.com/orgs/reactiveui/teams/reviewers-winforms) - - [WPF reviewers](https://github.com/orgs/reactiveui/teams/reviewers-wpf) - - [Xamarin Forms reviewers](https://github.com/orgs/reactiveui/teams/reviewers-xamforms) - - - - -

.NET Foundation

+ - [Android reviewers](https://github.com/orgs/reactiveui/teams/android-team) + - [Core reviewers](https://github.com/orgs/reactiveui/teams/core-team) + - [iOS reviewers](https://github.com/orgs/reactiveui/teams/ios-team) + - [Mac reviewers](https://github.com/orgs/reactiveui/teams/mac-team) + - [UWP reviewers](https://github.com/orgs/reactiveui/teams/uwp-team) + - [WinForms reviewers](https://github.com/orgs/reactiveui/teams/winforms-team) + - [WPF reviewers](https://github.com/orgs/reactiveui/teams/wpf-team) + - [Xamarin Forms reviewers](https://github.com/orgs/reactiveui/teams/xamarin-forms-team) + - [Dot Net Core](https://github.com/orgs/reactiveui/teams/dotnetcore-team) + - [ReactiveUI Fody](https://github.com/orgs/reactiveui/teams/fody-team) + - [Learning](https://github.com/orgs/reactiveui/teams/learning-team) + - [Tizen](https://github.com/orgs/reactiveui/teams/tizen-team) + - [Web Assembly](https://github.com/orgs/reactiveui/teams/webassembly-team) + +

.NET Foundation

ReactiveUI is part of the [.NET Foundation](https://www.dotnetfoundation.org/). Other projects that are associated with the foundation include the Microsoft .NET Compiler Platform ("Roslyn") as well as the Microsoft ASP.NET family of projects, Microsoft .NET Core & Xamarin Forms. -

Core Team

+

Core Team

@@ -212,7 +199,7 @@ ReactiveUI is part of the [.NET Foundation](https://www.dotnetfoundation.org/).
-

Sponsorship

+

Sponsorship

The core team members, ReactiveUI contributors and contributors in the ecosystem do this open source work in their free time. If you use ReactiveUI a serious task, and you'd like us to invest more time on it, please donate. This project increases your income/productivity too. It makes development and applications faster and it reduces the required bandwidth. @@ -225,7 +212,7 @@ This is how we use the donations: * Infrastructure cost * Fees for money handling -

Backers

+

Backers

[Become a backer](https://opencollective.com/reactiveui#backer) and get your image on our README on Github with a link to your site. @@ -260,7 +247,7 @@ This is how we use the donations: -

Sponsors

+

Sponsors

[Become a sponsor](https://opencollective.com/reactiveui#sponsor) and get your logo on our README on Github with a link to your site. diff --git a/build.cake b/build.cake index 4b5130b139..0770f16b5d 100644 --- a/build.cake +++ b/build.cake @@ -1,26 +1,26 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. ////////////////////////////////////////////////////////////////////// // ADDINS ////////////////////////////////////////////////////////////////////// -#addin "nuget:?package=Cake.FileHelpers&version=2.0.0" -#addin "nuget:?package=Cake.Coveralls&version=0.8.0" +#addin "nuget:?package=Cake.FileHelpers&version=3.0.0" +#addin "nuget:?package=Cake.Coveralls&version=0.9.0" #addin "nuget:?package=Cake.PinNuGetDependency&version=3.0.1" -#addin "nuget:?package=Cake.Powershell&version=0.4.3" +#addin "nuget:?package=Cake.Powershell&version=0.4.5" ////////////////////////////////////////////////////////////////////// // TOOLS ////////////////////////////////////////////////////////////////////// -#tool "nuget:?package=GitReleaseManager&version=0.7.0" +#tool "nuget:?package=GitReleaseManager&version=0.7.1" #tool "nuget:?package=coveralls.io&version=1.4.2" #tool "nuget:?package=OpenCover&version=4.6.519" #tool "nuget:?package=ReportGenerator&version=3.1.2" -#tool "nuget:?package=vswhere&version=2.4.1" -#tool "nuget:?package=xunit.runner.console&version=2.4.0-beta.2.build3984" +#tool "nuget:?package=vswhere&version=2.5.2" +#tool "nuget:?package=xunit.runner.console&version=2.4.0" ////////////////////////////////////////////////////////////////////// // ARGUMENTS @@ -168,6 +168,7 @@ Task("GenerateEvents") generate("ios", "src/ReactiveUI.Events/"); generate("mac", "src/ReactiveUI.Events/"); generate("uwp", "src/ReactiveUI.Events/"); + generate("tizen", "src/ReactiveUI.Events/"); generate("wpf", "src/ReactiveUI.Events.WPF/"); generate("xamforms", "src/ReactiveUI.Events.XamForms/"); generate("winforms", "src/ReactiveUI.Events.Winforms/"); diff --git a/samples/stylecop.json b/samples/stylecop.json index aa17175909..354a60c6e4 100644 --- a/samples/stylecop.json +++ b/samples/stylecop.json @@ -6,7 +6,7 @@ "documentationCulture": "en-US", "documentInterfaces": true, "documentInternalElements": false, - "copyrightText": "Licensed to the .NET Foundation under one or more agreements.\nThe .NET Foundation licenses this file to you under the MS-PL license.\nSee the LICENSE file in the project root for more information.", + "copyrightText": "Licensed to the .NET Foundation under one or more agreements.\nThe .NET Foundation licenses this file to you under the MIT license.\nSee the LICENSE file in the project root for more information.", "xmlHeader": true }, "orderingRules": { diff --git a/samples/xamarin-forms/Cinephile.Core/Cinephile.Core.licenseheader b/samples/xamarin-forms/Cinephile.Core/Cinephile.Core.licenseheader index b951ef8147..4dc04bc065 100644 --- a/samples/xamarin-forms/Cinephile.Core/Cinephile.Core.licenseheader +++ b/samples/xamarin-forms/Cinephile.Core/Cinephile.Core.licenseheader @@ -1,12 +1,12 @@ extensions: designer.cs generated.cs extensions: .cs .cpp .h // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. extensions: .xml .config .xsd diff --git a/samples/xamarin-forms/Cinephile.Core/Infrastructure/HttpTools/HttpLoggingHandler.cs b/samples/xamarin-forms/Cinephile.Core/Infrastructure/HttpTools/HttpLoggingHandler.cs index 4db8218607..dd8d0ff33c 100644 --- a/samples/xamarin-forms/Cinephile.Core/Infrastructure/HttpTools/HttpLoggingHandler.cs +++ b/samples/xamarin-forms/Cinephile.Core/Infrastructure/HttpTools/HttpLoggingHandler.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/samples/xamarin-forms/Cinephile.Core/Models/IMovieService.cs b/samples/xamarin-forms/Cinephile.Core/Models/IMovieService.cs index 8bb4a6e7b0..7c3b372b99 100644 --- a/samples/xamarin-forms/Cinephile.Core/Models/IMovieService.cs +++ b/samples/xamarin-forms/Cinephile.Core/Models/IMovieService.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/samples/xamarin-forms/Cinephile.Core/Models/Movie.cs b/samples/xamarin-forms/Cinephile.Core/Models/Movie.cs index d9f5911aa6..a6d53caa2b 100644 --- a/samples/xamarin-forms/Cinephile.Core/Models/Movie.cs +++ b/samples/xamarin-forms/Cinephile.Core/Models/Movie.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/samples/xamarin-forms/Cinephile.Core/Models/MovieService.cs b/samples/xamarin-forms/Cinephile.Core/Models/MovieService.cs index 6ed810d47d..20c2a65c32 100644 --- a/samples/xamarin-forms/Cinephile.Core/Models/MovieService.cs +++ b/samples/xamarin-forms/Cinephile.Core/Models/MovieService.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/samples/xamarin-forms/Cinephile.Core/Properties/AssemblyInfo.cs b/samples/xamarin-forms/Cinephile.Core/Properties/AssemblyInfo.cs index c9bfa0b556..8b04a64079 100644 --- a/samples/xamarin-forms/Cinephile.Core/Properties/AssemblyInfo.cs +++ b/samples/xamarin-forms/Cinephile.Core/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Reflection; diff --git a/samples/xamarin-forms/Cinephile.Core/Rest/ApiService.cs b/samples/xamarin-forms/Cinephile.Core/Rest/ApiService.cs index adad6bb5d1..3e5a827c56 100644 --- a/samples/xamarin-forms/Cinephile.Core/Rest/ApiService.cs +++ b/samples/xamarin-forms/Cinephile.Core/Rest/ApiService.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/samples/xamarin-forms/Cinephile.Core/Rest/Cache.cs b/samples/xamarin-forms/Cinephile.Core/Rest/Cache.cs index c1866cd062..c52d7217f7 100644 --- a/samples/xamarin-forms/Cinephile.Core/Rest/Cache.cs +++ b/samples/xamarin-forms/Cinephile.Core/Rest/Cache.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/samples/xamarin-forms/Cinephile.Core/Rest/Dtos/ImageConfigurations/ImageConfigurationDto.cs b/samples/xamarin-forms/Cinephile.Core/Rest/Dtos/ImageConfigurations/ImageConfigurationDto.cs index b87e5ae071..246e9a0989 100644 --- a/samples/xamarin-forms/Cinephile.Core/Rest/Dtos/ImageConfigurations/ImageConfigurationDto.cs +++ b/samples/xamarin-forms/Cinephile.Core/Rest/Dtos/ImageConfigurations/ImageConfigurationDto.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/samples/xamarin-forms/Cinephile.Core/Rest/Dtos/ImageConfigurations/ImagesDto.cs b/samples/xamarin-forms/Cinephile.Core/Rest/Dtos/ImageConfigurations/ImagesDto.cs index 1675accdc8..8102456c65 100644 --- a/samples/xamarin-forms/Cinephile.Core/Rest/Dtos/ImageConfigurations/ImagesDto.cs +++ b/samples/xamarin-forms/Cinephile.Core/Rest/Dtos/ImageConfigurations/ImagesDto.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/samples/xamarin-forms/Cinephile.Core/Rest/Dtos/Movies/GenreDto.cs b/samples/xamarin-forms/Cinephile.Core/Rest/Dtos/Movies/GenreDto.cs index 39581c36e5..12c039b0dd 100644 --- a/samples/xamarin-forms/Cinephile.Core/Rest/Dtos/Movies/GenreDto.cs +++ b/samples/xamarin-forms/Cinephile.Core/Rest/Dtos/Movies/GenreDto.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/samples/xamarin-forms/Cinephile.Core/Rest/Dtos/Movies/GenresDto.cs b/samples/xamarin-forms/Cinephile.Core/Rest/Dtos/Movies/GenresDto.cs index c0cc846dd7..701983cb3a 100644 --- a/samples/xamarin-forms/Cinephile.Core/Rest/Dtos/Movies/GenresDto.cs +++ b/samples/xamarin-forms/Cinephile.Core/Rest/Dtos/Movies/GenresDto.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/samples/xamarin-forms/Cinephile.Core/Rest/Dtos/Movies/MovieDates.cs b/samples/xamarin-forms/Cinephile.Core/Rest/Dtos/Movies/MovieDates.cs index 02e74f3122..d4a3bbd7ab 100644 --- a/samples/xamarin-forms/Cinephile.Core/Rest/Dtos/Movies/MovieDates.cs +++ b/samples/xamarin-forms/Cinephile.Core/Rest/Dtos/Movies/MovieDates.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/samples/xamarin-forms/Cinephile.Core/Rest/Dtos/Movies/MovieDto.cs b/samples/xamarin-forms/Cinephile.Core/Rest/Dtos/Movies/MovieDto.cs index 9eec3faeb9..da1be0d67d 100644 --- a/samples/xamarin-forms/Cinephile.Core/Rest/Dtos/Movies/MovieDto.cs +++ b/samples/xamarin-forms/Cinephile.Core/Rest/Dtos/Movies/MovieDto.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/samples/xamarin-forms/Cinephile.Core/Rest/Dtos/Movies/MovieResult.cs b/samples/xamarin-forms/Cinephile.Core/Rest/Dtos/Movies/MovieResult.cs index 98608f3417..932edd1a24 100644 --- a/samples/xamarin-forms/Cinephile.Core/Rest/Dtos/Movies/MovieResult.cs +++ b/samples/xamarin-forms/Cinephile.Core/Rest/Dtos/Movies/MovieResult.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/samples/xamarin-forms/Cinephile.Core/Rest/IApiService.cs b/samples/xamarin-forms/Cinephile.Core/Rest/IApiService.cs index 94aa9bec4a..21a31fc157 100644 --- a/samples/xamarin-forms/Cinephile.Core/Rest/IApiService.cs +++ b/samples/xamarin-forms/Cinephile.Core/Rest/IApiService.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/samples/xamarin-forms/Cinephile.Core/Rest/ICache.cs b/samples/xamarin-forms/Cinephile.Core/Rest/ICache.cs index 809882d76c..0a326a5d87 100644 --- a/samples/xamarin-forms/Cinephile.Core/Rest/ICache.cs +++ b/samples/xamarin-forms/Cinephile.Core/Rest/ICache.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/samples/xamarin-forms/Cinephile.Core/Rest/IRestApiClient.cs b/samples/xamarin-forms/Cinephile.Core/Rest/IRestApiClient.cs index 8fcb16f072..6d0dcba13e 100644 --- a/samples/xamarin-forms/Cinephile.Core/Rest/IRestApiClient.cs +++ b/samples/xamarin-forms/Cinephile.Core/Rest/IRestApiClient.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/samples/xamarin-forms/Cinephile.Core/app.config b/samples/xamarin-forms/Cinephile.Core/app.config index 4023f0cdee..499cc728f2 100644 --- a/samples/xamarin-forms/Cinephile.Core/app.config +++ b/samples/xamarin-forms/Cinephile.Core/app.config @@ -1,7 +1,7 @@  diff --git a/samples/xamarin-forms/Cinephile.Core/packages.config b/samples/xamarin-forms/Cinephile.Core/packages.config index 70fdaedd18..7204d0fab8 100644 --- a/samples/xamarin-forms/Cinephile.Core/packages.config +++ b/samples/xamarin-forms/Cinephile.Core/packages.config @@ -1,7 +1,7 @@  diff --git a/samples/xamarin-forms/Cinephile.UnitTests/Cinephile.UnitTests.licenseheader b/samples/xamarin-forms/Cinephile.UnitTests/Cinephile.UnitTests.licenseheader index b951ef8147..4dc04bc065 100644 --- a/samples/xamarin-forms/Cinephile.UnitTests/Cinephile.UnitTests.licenseheader +++ b/samples/xamarin-forms/Cinephile.UnitTests/Cinephile.UnitTests.licenseheader @@ -1,12 +1,12 @@ extensions: designer.cs generated.cs extensions: .cs .cpp .h // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. extensions: .xml .config .xsd diff --git a/samples/xamarin-forms/Cinephile.UnitTests/Model/MovieServiceTest.cs b/samples/xamarin-forms/Cinephile.UnitTests/Model/MovieServiceTest.cs index c03f8705c1..829ef08005 100644 --- a/samples/xamarin-forms/Cinephile.UnitTests/Model/MovieServiceTest.cs +++ b/samples/xamarin-forms/Cinephile.UnitTests/Model/MovieServiceTest.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/samples/xamarin-forms/Cinephile.UnitTests/app.config b/samples/xamarin-forms/Cinephile.UnitTests/app.config index 4023f0cdee..499cc728f2 100644 --- a/samples/xamarin-forms/Cinephile.UnitTests/app.config +++ b/samples/xamarin-forms/Cinephile.UnitTests/app.config @@ -1,7 +1,7 @@  diff --git a/samples/xamarin-forms/Cinephile.UnitTests/packages.config b/samples/xamarin-forms/Cinephile.UnitTests/packages.config index 0ecdc97575..a32ec2fe38 100644 --- a/samples/xamarin-forms/Cinephile.UnitTests/packages.config +++ b/samples/xamarin-forms/Cinephile.UnitTests/packages.config @@ -1,7 +1,7 @@  diff --git a/samples/xamarin-forms/Cinephile/App.xaml.cs b/samples/xamarin-forms/Cinephile/App.xaml.cs index 005b19d325..7b7392c357 100644 --- a/samples/xamarin-forms/Cinephile/App.xaml.cs +++ b/samples/xamarin-forms/Cinephile/App.xaml.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using Xamarin.Forms; diff --git a/samples/xamarin-forms/Cinephile/AppBootstrapper.cs b/samples/xamarin-forms/Cinephile/AppBootstrapper.cs index d8b34795f3..e8a912e12a 100644 --- a/samples/xamarin-forms/Cinephile/AppBootstrapper.cs +++ b/samples/xamarin-forms/Cinephile/AppBootstrapper.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/samples/xamarin-forms/Cinephile/Cinephile.licenseheader b/samples/xamarin-forms/Cinephile/Cinephile.licenseheader index b951ef8147..4dc04bc065 100644 --- a/samples/xamarin-forms/Cinephile/Cinephile.licenseheader +++ b/samples/xamarin-forms/Cinephile/Cinephile.licenseheader @@ -1,12 +1,12 @@ extensions: designer.cs generated.cs extensions: .cs .cpp .h // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. extensions: .xml .config .xsd diff --git a/samples/xamarin-forms/Cinephile/Properties/AssemblyInfo.cs b/samples/xamarin-forms/Cinephile/Properties/AssemblyInfo.cs index 4a3ca1fe8a..93968f2fc6 100644 --- a/samples/xamarin-forms/Cinephile/Properties/AssemblyInfo.cs +++ b/samples/xamarin-forms/Cinephile/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Reflection; diff --git a/samples/xamarin-forms/Cinephile/ViewModels/MovieDetailViewModel.cs b/samples/xamarin-forms/Cinephile/ViewModels/MovieDetailViewModel.cs index f8f49db4d2..745f012571 100644 --- a/samples/xamarin-forms/Cinephile/ViewModels/MovieDetailViewModel.cs +++ b/samples/xamarin-forms/Cinephile/ViewModels/MovieDetailViewModel.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/samples/xamarin-forms/Cinephile/ViewModels/UpcomingMoviesCellViewModel.cs b/samples/xamarin-forms/Cinephile/ViewModels/UpcomingMoviesCellViewModel.cs index bd59460760..f5fe70efdc 100644 --- a/samples/xamarin-forms/Cinephile/ViewModels/UpcomingMoviesCellViewModel.cs +++ b/samples/xamarin-forms/Cinephile/ViewModels/UpcomingMoviesCellViewModel.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/samples/xamarin-forms/Cinephile/ViewModels/UpcomingMoviesListViewModel.cs b/samples/xamarin-forms/Cinephile/ViewModels/UpcomingMoviesListViewModel.cs index fb3996360d..257208bfb2 100644 --- a/samples/xamarin-forms/Cinephile/ViewModels/UpcomingMoviesListViewModel.cs +++ b/samples/xamarin-forms/Cinephile/ViewModels/UpcomingMoviesListViewModel.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/samples/xamarin-forms/Cinephile/ViewModels/ViewModelBase.cs b/samples/xamarin-forms/Cinephile/ViewModels/ViewModelBase.cs index 253561c4b6..bf78232d9c 100644 --- a/samples/xamarin-forms/Cinephile/ViewModels/ViewModelBase.cs +++ b/samples/xamarin-forms/Cinephile/ViewModels/ViewModelBase.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/samples/xamarin-forms/Cinephile/Views/ContentPageBase.cs b/samples/xamarin-forms/Cinephile/Views/ContentPageBase.cs index d0d5848760..714bddae3b 100644 --- a/samples/xamarin-forms/Cinephile/Views/ContentPageBase.cs +++ b/samples/xamarin-forms/Cinephile/Views/ContentPageBase.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/samples/xamarin-forms/Cinephile/Views/MovieDetailView.xaml.cs b/samples/xamarin-forms/Cinephile/Views/MovieDetailView.xaml.cs index 25f578627f..5bc98db0dd 100644 --- a/samples/xamarin-forms/Cinephile/Views/MovieDetailView.xaml.cs +++ b/samples/xamarin-forms/Cinephile/Views/MovieDetailView.xaml.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Reactive.Disposables; diff --git a/samples/xamarin-forms/Cinephile/Views/UpcomingMoviesCellView.xaml.cs b/samples/xamarin-forms/Cinephile/Views/UpcomingMoviesCellView.xaml.cs index 9f5f06cc19..bb61dafdfe 100644 --- a/samples/xamarin-forms/Cinephile/Views/UpcomingMoviesCellView.xaml.cs +++ b/samples/xamarin-forms/Cinephile/Views/UpcomingMoviesCellView.xaml.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/samples/xamarin-forms/Cinephile/Views/UpcomingMoviesListView.xaml.cs b/samples/xamarin-forms/Cinephile/Views/UpcomingMoviesListView.xaml.cs index e492256704..798c7f322d 100644 --- a/samples/xamarin-forms/Cinephile/Views/UpcomingMoviesListView.xaml.cs +++ b/samples/xamarin-forms/Cinephile/Views/UpcomingMoviesListView.xaml.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Diagnostics; diff --git a/samples/xamarin-forms/Cinephile/app.config b/samples/xamarin-forms/Cinephile/app.config index 4023f0cdee..499cc728f2 100644 --- a/samples/xamarin-forms/Cinephile/app.config +++ b/samples/xamarin-forms/Cinephile/app.config @@ -1,7 +1,7 @@  diff --git a/samples/xamarin-forms/Cinephile/packages.config b/samples/xamarin-forms/Cinephile/packages.config index bdc1c4466a..70380738cc 100644 --- a/samples/xamarin-forms/Cinephile/packages.config +++ b/samples/xamarin-forms/Cinephile/packages.config @@ -1,7 +1,7 @@  diff --git a/samples/xamarin-forms/Droid/AkavacheSqliteLinkerOverride.cs b/samples/xamarin-forms/Droid/AkavacheSqliteLinkerOverride.cs index 39d2440106..e77e412da7 100644 --- a/samples/xamarin-forms/Droid/AkavacheSqliteLinkerOverride.cs +++ b/samples/xamarin-forms/Droid/AkavacheSqliteLinkerOverride.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/samples/xamarin-forms/Droid/Droid.licenseheader b/samples/xamarin-forms/Droid/Droid.licenseheader index b951ef8147..4dc04bc065 100644 --- a/samples/xamarin-forms/Droid/Droid.licenseheader +++ b/samples/xamarin-forms/Droid/Droid.licenseheader @@ -1,12 +1,12 @@ extensions: designer.cs generated.cs extensions: .cs .cpp .h // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. extensions: .xml .config .xsd diff --git a/samples/xamarin-forms/Droid/MainActivity.cs b/samples/xamarin-forms/Droid/MainActivity.cs index 1bb6a6ce09..691de397e5 100644 --- a/samples/xamarin-forms/Droid/MainActivity.cs +++ b/samples/xamarin-forms/Droid/MainActivity.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/samples/xamarin-forms/Droid/Properties/AndroidManifest.xml b/samples/xamarin-forms/Droid/Properties/AndroidManifest.xml index ee8c7fcf92..b3af426b90 100644 --- a/samples/xamarin-forms/Droid/Properties/AndroidManifest.xml +++ b/samples/xamarin-forms/Droid/Properties/AndroidManifest.xml @@ -1,7 +1,7 @@  diff --git a/samples/xamarin-forms/Droid/Properties/AssemblyInfo.cs b/samples/xamarin-forms/Droid/Properties/AssemblyInfo.cs index a371fdbb1f..e4027c230b 100644 --- a/samples/xamarin-forms/Droid/Properties/AssemblyInfo.cs +++ b/samples/xamarin-forms/Droid/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Reflection; diff --git a/samples/xamarin-forms/Droid/Resources/values/styles.xml b/samples/xamarin-forms/Droid/Resources/values/styles.xml index 9e341cac33..382b983970 100644 --- a/samples/xamarin-forms/Droid/Resources/values/styles.xml +++ b/samples/xamarin-forms/Droid/Resources/values/styles.xml @@ -1,7 +1,7 @@  diff --git a/samples/xamarin-forms/Droid/app.config b/samples/xamarin-forms/Droid/app.config index 70faee6e40..9c4fec6188 100644 --- a/samples/xamarin-forms/Droid/app.config +++ b/samples/xamarin-forms/Droid/app.config @@ -1,7 +1,7 @@  diff --git a/samples/xamarin-forms/Droid/packages.config b/samples/xamarin-forms/Droid/packages.config index f97ab568dd..82a8a0b3f5 100644 --- a/samples/xamarin-forms/Droid/packages.config +++ b/samples/xamarin-forms/Droid/packages.config @@ -1,7 +1,7 @@  diff --git a/samples/xamarin-forms/iOS/AkavacheSqliteLinkerOverride.cs b/samples/xamarin-forms/iOS/AkavacheSqliteLinkerOverride.cs index 8fd159d408..3c87230cbf 100644 --- a/samples/xamarin-forms/iOS/AkavacheSqliteLinkerOverride.cs +++ b/samples/xamarin-forms/iOS/AkavacheSqliteLinkerOverride.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/samples/xamarin-forms/iOS/AppDelegate.cs b/samples/xamarin-forms/iOS/AppDelegate.cs index 79d5bae9e9..75f746283c 100644 --- a/samples/xamarin-forms/iOS/AppDelegate.cs +++ b/samples/xamarin-forms/iOS/AppDelegate.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/samples/xamarin-forms/iOS/Main.cs b/samples/xamarin-forms/iOS/Main.cs index 30db453195..5e4c66bf06 100644 --- a/samples/xamarin-forms/iOS/Main.cs +++ b/samples/xamarin-forms/iOS/Main.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/samples/xamarin-forms/iOS/app.config b/samples/xamarin-forms/iOS/app.config index 70faee6e40..9c4fec6188 100644 --- a/samples/xamarin-forms/iOS/app.config +++ b/samples/xamarin-forms/iOS/app.config @@ -1,7 +1,7 @@  diff --git a/samples/xamarin-forms/iOS/iOS.licenseheader b/samples/xamarin-forms/iOS/iOS.licenseheader index b951ef8147..4dc04bc065 100644 --- a/samples/xamarin-forms/iOS/iOS.licenseheader +++ b/samples/xamarin-forms/iOS/iOS.licenseheader @@ -1,12 +1,12 @@ extensions: designer.cs generated.cs extensions: .cs .cpp .h // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. extensions: .xml .config .xsd diff --git a/samples/xamarin-forms/iOS/packages.config b/samples/xamarin-forms/iOS/packages.config index 4d97f443bf..63bec3c87b 100644 --- a/samples/xamarin-forms/iOS/packages.config +++ b/samples/xamarin-forms/iOS/packages.config @@ -1,7 +1,7 @@  diff --git a/script/setversion.csproj b/script/setversion.csproj index 1f2887636d..1a45c992fe 100644 --- a/script/setversion.csproj +++ b/script/setversion.csproj @@ -5,6 +5,6 @@ - + diff --git a/src/Directory.build.props b/src/Directory.build.props index d5afbd8b31..b22835514c 100644 --- a/src/Directory.build.props +++ b/src/Directory.build.props @@ -6,6 +6,7 @@ https://i.imgur.com/7WDbqSy.png .NET Foundation and Contributors xpaulbettsx;ghuntley + ReactiveUI ($(TargetFramework)) mvvm;reactiveui;rx;reactive extensions;observable;LINQ;events;frp;xamarin;android;ios;mac;forms;monodroid;monotouch;xamarin.android;xamarin.ios;xamarin.forms;xamarin.mac;wpf;net;netstandard;net461;uwp;tizen https://reactiveui.net/blog/ @@ -21,15 +22,6 @@ - - - - - - - - - diff --git a/src/Directory.build.targets b/src/Directory.build.targets index 459f4576c7..28fb44e7e4 100644 --- a/src/Directory.build.targets +++ b/src/Directory.build.targets @@ -17,10 +17,9 @@ $(DefineConstants);MONO;ANDROID - + - - - - - \ No newline at end of file + + $(DefineConstants);Tizen + + diff --git a/src/EventBuilder/App.config b/src/EventBuilder/App.config index 917c2e7654..e8b38733ad 100644 --- a/src/EventBuilder/App.config +++ b/src/EventBuilder/App.config @@ -1,7 +1,7 @@ diff --git a/src/EventBuilder/Cecil/DelegateTemplateInformation.cs b/src/EventBuilder/Cecil/DelegateTemplateInformation.cs index a44a36449b..724fe29a6d 100644 --- a/src/EventBuilder/Cecil/DelegateTemplateInformation.cs +++ b/src/EventBuilder/Cecil/DelegateTemplateInformation.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using EventBuilder.Entities; diff --git a/src/EventBuilder/Cecil/EventTemplateInformation.cs b/src/EventBuilder/Cecil/EventTemplateInformation.cs index d2226c8099..27cd88f677 100644 --- a/src/EventBuilder/Cecil/EventTemplateInformation.cs +++ b/src/EventBuilder/Cecil/EventTemplateInformation.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using EventBuilder.Entities; @@ -17,12 +17,26 @@ public static class EventTemplateInformation {"Windows.UI.Xaml.Data.PropertyChangedEventHandler", "global::System.ComponentModel.PropertyChangedEventHandler"}, {"Windows.Foundation.EventHandler", "EventHandler"}, {"Windows.Foundation.EventHandler`1", "EventHandler"}, - {"Windows.Foundation.EventHandler`2", "EventHandler"} + {"Windows.Foundation.EventHandler`2", "EventHandler"}, + {"System.Boolean", "Boolean"}, + {"System.Boolean`1", "Boolean"}, + {"System.EventHandler", "EventHandler"}, + {"System.EventHandler`1", "EventHandler"}, + {"System.EventHandler`2", "EventHandler"}, + {"System.EventArgs", "EventArgs"}, + {"System.EventArgs`1", "EventArgs"}, + {"System.EventArgs`2", "EventArgs"}, + {"Tizen.NUI.EventHandlerWithReturnType", "Tizen.NUI.EventHandlerWithReturnType"}, + {"Tizen.NUI.EventHandlerWithReturnType`1", "Tizen.NUI.EventHandlerWithReturnType"}, + {"Tizen.NUI.EventHandlerWithReturnType`2", "Tizen.NUI.EventHandlerWithReturnType"}, + {"Tizen.NUI.EventHandlerWithReturnType`3", "Tizen.NUI.EventHandlerWithReturnType"}, }; - private static string RenameBogusWinRTTypes(string typeName) + private static string RenameBogusTypes(string typeName) { - if (SubstitutionList.ContainsKey(typeName)) return SubstitutionList[typeName]; + if (SubstitutionList.ContainsKey(typeName)) { + return SubstitutionList[typeName]; + } return typeName; } @@ -34,7 +48,7 @@ private static string GetEventArgsTypeForEvent(EventDefinition ei) if (invoke.Parameters.Count < 2) return null; var param = invoke.Parameters[1]; - var ret = RenameBogusWinRTTypes(param.ParameterType.FullName); + var ret = RenameBogusTypes(param.ParameterType.FullName); var generic = ei.EventType as GenericInstanceType; if (generic != null) { @@ -43,7 +57,12 @@ var kvp in type.GenericParameters.Zip(generic.GenericArguments, (name, actual) => new { name, actual })) { var realType = GetRealTypeName(kvp.actual); - ret = ret.Replace(kvp.name.FullName, realType); + var temp = ret.Replace(kvp.name.FullName, realType); + if (temp != ret) + { + ret = temp; + break; + } } } @@ -53,10 +72,10 @@ var kvp in private static string GetRealTypeName(TypeDefinition t) { - if (t.GenericParameters.Count == 0) return RenameBogusWinRTTypes(t.FullName); + if (t.GenericParameters.Count == 0) return RenameBogusTypes(t.FullName); var ret = string.Format("{0}<{1}>", - RenameBogusWinRTTypes(t.Namespace + "." + t.Name), + RenameBogusTypes(t.Namespace + "." + t.Name), string.Join(",", t.GenericParameters.Select(x => GetRealTypeName(x.Resolve())))); // NB: Inner types in Mono.Cecil get reported as 'Foo/Bar' @@ -66,12 +85,20 @@ private static string GetRealTypeName(TypeDefinition t) private static string GetRealTypeName(TypeReference t) { var generic = t as GenericInstanceType; - if (generic == null) return RenameBogusWinRTTypes(t.FullName); + if (generic == null) return RenameBogusTypes(t.FullName); var ret = string.Format("{0}<{1}>", - RenameBogusWinRTTypes(generic.Namespace + "." + generic.Name), + RenameBogusTypes(generic.Namespace + "." + generic.Name), string.Join(",", generic.GenericArguments.Select(x => GetRealTypeName(x)))); + // NB: Handy place to hook to troubleshoot if something needs to be added to SubstitutionList + //if (generic.FullName.Contains("MarkReachedEventArgs")) { + // // Tizen.NUI.EventHandlerWithReturnType`3 + // // + //} + // NB: Inner types in Mono.Cecil get reported as 'Foo/Bar' return ret.Replace('/', '.'); } diff --git a/src/EventBuilder/Cecil/PathSearchAssemblyResolver.cs b/src/EventBuilder/Cecil/PathSearchAssemblyResolver.cs index 1dc6aee656..b28a9c0abb 100644 --- a/src/EventBuilder/Cecil/PathSearchAssemblyResolver.cs +++ b/src/EventBuilder/Cecil/PathSearchAssemblyResolver.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/EventBuilder/Cecil/SafeTypes.cs b/src/EventBuilder/Cecil/SafeTypes.cs index 71b17cf7ac..585ef6b0a1 100644 --- a/src/EventBuilder/Cecil/SafeTypes.cs +++ b/src/EventBuilder/Cecil/SafeTypes.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using Mono.Cecil; diff --git a/src/EventBuilder/CommandLineOptions.cs b/src/EventBuilder/CommandLineOptions.cs index 289331ee93..70a180eea3 100644 --- a/src/EventBuilder/CommandLineOptions.cs +++ b/src/EventBuilder/CommandLineOptions.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Collections.Generic; @@ -14,6 +14,7 @@ public enum AutoPlatform Android, iOS, Mac, + Tizen, WPF, XamForms, UWP, @@ -28,7 +29,7 @@ public class CommandLineOptions [Option('p', "platform", Required = true, HelpText = - "Platform to automatically generate. Possible options include: NONE, ANDROID, IOS, WPF, MAC, UWP, XAMFORMS, WINFORMS" + "Platform to automatically generate. Possible options include: NONE, ANDROID, IOS, WPF, MAC, TIZEN, UWP, XAMFORMS, WINFORMS" )] public AutoPlatform Platform { get; set; } diff --git a/src/EventBuilder/DefaultTemplate.mustache b/src/EventBuilder/DefaultTemplate.mustache index 1009cba1c6..bfc4361de1 100644 --- a/src/EventBuilder/DefaultTemplate.mustache +++ b/src/EventBuilder/DefaultTemplate.mustache @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. #pragma warning disable 1591,0618,0105,0672,0108 diff --git a/src/EventBuilder/Entities/MultiParameterMethod.cs b/src/EventBuilder/Entities/MultiParameterMethod.cs index c15059ad81..3ff4468e74 100644 --- a/src/EventBuilder/Entities/MultiParameterMethod.cs +++ b/src/EventBuilder/Entities/MultiParameterMethod.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. namespace EventBuilder.Entities diff --git a/src/EventBuilder/Entities/NamespaceInfo.cs b/src/EventBuilder/Entities/NamespaceInfo.cs index a7375c8c9f..8dc8fa9a4d 100644 --- a/src/EventBuilder/Entities/NamespaceInfo.cs +++ b/src/EventBuilder/Entities/NamespaceInfo.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Collections.Generic; diff --git a/src/EventBuilder/Entities/ParentInfo.cs b/src/EventBuilder/Entities/ParentInfo.cs index d47ed95fe4..d72ab459a3 100644 --- a/src/EventBuilder/Entities/ParentInfo.cs +++ b/src/EventBuilder/Entities/ParentInfo.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. namespace EventBuilder.Entities diff --git a/src/EventBuilder/Entities/PublicEventInfo.cs b/src/EventBuilder/Entities/PublicEventInfo.cs index 09c7ba232a..e71d1ad7c3 100644 --- a/src/EventBuilder/Entities/PublicEventInfo.cs +++ b/src/EventBuilder/Entities/PublicEventInfo.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. namespace EventBuilder.Entities diff --git a/src/EventBuilder/Entities/PublicTypeInfo.cs b/src/EventBuilder/Entities/PublicTypeInfo.cs index b0311978e6..c0c38ffdfd 100644 --- a/src/EventBuilder/Entities/PublicTypeInfo.cs +++ b/src/EventBuilder/Entities/PublicTypeInfo.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using Mono.Cecil; diff --git a/src/EventBuilder/Entities/SingleParameterMethod.cs b/src/EventBuilder/Entities/SingleParameterMethod.cs index 5e7b939806..734f3ed980 100644 --- a/src/EventBuilder/Entities/SingleParameterMethod.cs +++ b/src/EventBuilder/Entities/SingleParameterMethod.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. namespace EventBuilder.Entities diff --git a/src/EventBuilder/EventBuilder.csproj b/src/EventBuilder/EventBuilder.csproj index 7e76136446..7ec1ffa494 100644 --- a/src/EventBuilder/EventBuilder.csproj +++ b/src/EventBuilder/EventBuilder.csproj @@ -11,6 +11,9 @@ PreserveNewest + + PreserveNewest + @@ -22,9 +25,4 @@ - - - PreserveNewest - - \ No newline at end of file diff --git a/src/EventBuilder/EventBuilder.licenseheader b/src/EventBuilder/EventBuilder.licenseheader index b951ef8147..4dc04bc065 100644 --- a/src/EventBuilder/EventBuilder.licenseheader +++ b/src/EventBuilder/EventBuilder.licenseheader @@ -1,12 +1,12 @@ extensions: designer.cs generated.cs extensions: .cs .cpp .h // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. extensions: .xml .config .xsd diff --git a/src/EventBuilder/EventBuilder.sln b/src/EventBuilder/EventBuilder.sln index 153b5d6041..2438ddbb8f 100644 --- a/src/EventBuilder/EventBuilder.sln +++ b/src/EventBuilder/EventBuilder.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.26228.9 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EventBuilder", "EventBuilder.csproj", "{A6B86E12-057F-4591-98A3-FD50E9CEAE69}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventBuilder", "EventBuilder.csproj", "{A6B86E12-057F-4591-98A3-FD50E9CEAE69}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -15,14 +15,17 @@ Global GlobalSection(ProjectConfigurationPlatforms) = postSolution {A6B86E12-057F-4591-98A3-FD50E9CEAE69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A6B86E12-057F-4591-98A3-FD50E9CEAE69}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A6B86E12-057F-4591-98A3-FD50E9CEAE69}.Debug|x86.ActiveCfg = Debug|x86 - {A6B86E12-057F-4591-98A3-FD50E9CEAE69}.Debug|x86.Build.0 = Debug|x86 + {A6B86E12-057F-4591-98A3-FD50E9CEAE69}.Debug|x86.ActiveCfg = Debug|Any CPU + {A6B86E12-057F-4591-98A3-FD50E9CEAE69}.Debug|x86.Build.0 = Debug|Any CPU {A6B86E12-057F-4591-98A3-FD50E9CEAE69}.Release|Any CPU.ActiveCfg = Release|Any CPU {A6B86E12-057F-4591-98A3-FD50E9CEAE69}.Release|Any CPU.Build.0 = Release|Any CPU - {A6B86E12-057F-4591-98A3-FD50E9CEAE69}.Release|x86.ActiveCfg = Release|x86 - {A6B86E12-057F-4591-98A3-FD50E9CEAE69}.Release|x86.Build.0 = Release|x86 + {A6B86E12-057F-4591-98A3-FD50E9CEAE69}.Release|x86.ActiveCfg = Release|Any CPU + {A6B86E12-057F-4591-98A3-FD50E9CEAE69}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {8AD09057-1163-45D2-A260-CB034E6DFD07} + EndGlobalSection EndGlobal diff --git a/src/EventBuilder/PlatformHelper.cs b/src/EventBuilder/PlatformHelper.cs index 26de096a09..9a837a14f9 100644 --- a/src/EventBuilder/PlatformHelper.cs +++ b/src/EventBuilder/PlatformHelper.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/EventBuilder/Platforms/Android.cs b/src/EventBuilder/Platforms/Android.cs index 2e89ac3e81..a0075e8180 100644 --- a/src/EventBuilder/Platforms/Android.cs +++ b/src/EventBuilder/Platforms/Android.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.IO; diff --git a/src/EventBuilder/Platforms/BasePlatform.cs b/src/EventBuilder/Platforms/BasePlatform.cs index 50d45db575..5711b682a5 100644 --- a/src/EventBuilder/Platforms/BasePlatform.cs +++ b/src/EventBuilder/Platforms/BasePlatform.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Collections.Generic; diff --git a/src/EventBuilder/Platforms/Bespoke.cs b/src/EventBuilder/Platforms/Bespoke.cs index 520f3c71f5..ddc63bdb14 100644 --- a/src/EventBuilder/Platforms/Bespoke.cs +++ b/src/EventBuilder/Platforms/Bespoke.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. namespace EventBuilder.Platforms diff --git a/src/EventBuilder/Platforms/IPlatform.cs b/src/EventBuilder/Platforms/IPlatform.cs index 4dab49ec9b..ce5339b398 100644 --- a/src/EventBuilder/Platforms/IPlatform.cs +++ b/src/EventBuilder/Platforms/IPlatform.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Collections.Generic; diff --git a/src/EventBuilder/Platforms/Mac.cs b/src/EventBuilder/Platforms/Mac.cs index 50236315d9..7407ef6a0d 100644 --- a/src/EventBuilder/Platforms/Mac.cs +++ b/src/EventBuilder/Platforms/Mac.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.IO; diff --git a/src/EventBuilder/Platforms/Tizen.cs b/src/EventBuilder/Platforms/Tizen.cs new file mode 100644 index 0000000000..6f009e62c9 --- /dev/null +++ b/src/EventBuilder/Platforms/Tizen.cs @@ -0,0 +1,58 @@ +// 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 more information. + +using NuGet; +using Polly; +using Serilog; +using System; +using System.IO; +using System.Linq; + +namespace EventBuilder.Platforms +{ + public class Tizen : BasePlatform + { + private const string _packageName = "Tizen.NET"; + + public override AutoPlatform Platform => AutoPlatform.Tizen; + + public Tizen() + { + var packageUnzipPath = Environment.CurrentDirectory; + + Log.Debug($"Package unzip path is {packageUnzipPath}"); + + var retryPolicy = Policy + .Handle() + .WaitAndRetry( + 5, + retryAttempt => TimeSpan.FromSeconds(Math.Pow(2, retryAttempt)), + (exception, timeSpan, context) => { + Log.Warning( + "An exception was thrown whilst retrieving or installing {0}: {1}", + _packageName, exception); + }); + + retryPolicy.Execute(() => { + var repo = PackageRepositoryFactory.Default.CreateRepository("https://packages.nuget.org/api/v2"); + var packageManager = new PackageManager(repo, packageUnzipPath); + var package = repo.FindPackagesById(_packageName).Single(x => x.Version.ToString() == "4.0.0"); + + Log.Debug("Using Tizen.NET {0} released on {1}", package.Version, package.Published); + Log.Debug("{0}", package.ReleaseNotes); + + packageManager.InstallPackage(package, ignoreDependencies: true, allowPrereleaseVersions: false); + }); + + var elmSharp = Directory.GetFiles(packageUnzipPath, "ElmSharp*.dll", SearchOption.AllDirectories); + Assemblies.AddRange(elmSharp); + + var tizenNet = Directory.GetFiles(packageUnzipPath, "Tizen*.dll", SearchOption.AllDirectories); + Assemblies.AddRange(tizenNet); + + CecilSearchDirectories.Add($"{packageUnzipPath}\\Tizen.NET.4.0.0\\build\\tizen40\\ref"); + CecilSearchDirectories.Add($"{packageUnzipPath}\\Tizen.NET.4.0.0\\lib\\netstandard2.0"); + } + } +} diff --git a/src/EventBuilder/Platforms/UWP.cs b/src/EventBuilder/Platforms/UWP.cs index 9709634597..5f729dc128 100644 --- a/src/EventBuilder/Platforms/UWP.cs +++ b/src/EventBuilder/Platforms/UWP.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/EventBuilder/Platforms/WPF.cs b/src/EventBuilder/Platforms/WPF.cs index f3077c517f..ad3f894c99 100644 --- a/src/EventBuilder/Platforms/WPF.cs +++ b/src/EventBuilder/Platforms/WPF.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/EventBuilder/Platforms/Winforms.cs b/src/EventBuilder/Platforms/Winforms.cs index aef81801b0..d0d72e8a77 100644 --- a/src/EventBuilder/Platforms/Winforms.cs +++ b/src/EventBuilder/Platforms/Winforms.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/EventBuilder/Platforms/XamForms.cs b/src/EventBuilder/Platforms/XamForms.cs index fd08530c01..b9a47656cb 100644 --- a/src/EventBuilder/Platforms/XamForms.cs +++ b/src/EventBuilder/Platforms/XamForms.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using NuGet; @@ -41,7 +41,7 @@ public XamForms() var packageManager = new PackageManager(repo, packageUnzipPath); - var package = repo.FindPackagesById(_packageName).Single(x => x.Version.ToString() == "2.5.1.444934"); + var package = repo.FindPackagesById(_packageName).Single(x => x.Version.ToString() == "3.0.0.561731"); Log.Debug("Using Xamarin Forms {Version} released on {Published}", package.Version, package.Published); Log.Debug("{ReleaseNotes}", package.ReleaseNotes); @@ -60,10 +60,11 @@ public XamForms() { CecilSearchDirectories.Add( @"/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/xbuild-frameworks/.NETPortable/v4.5/Profile/Profile111"); + CecilSearchDirectories.Add(@"/Library/Frameworks/Mono.framework/External/xbuild-frameworks/MonoAndroid/v1.0/Facades"); } else { - CecilSearchDirectories.Add(@"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile111"); + CecilSearchDirectories.Add(@"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.1\Facades"); } } } diff --git a/src/EventBuilder/Platforms/iOS.cs b/src/EventBuilder/Platforms/iOS.cs index 54b44569d0..f344ed59b9 100644 --- a/src/EventBuilder/Platforms/iOS.cs +++ b/src/EventBuilder/Platforms/iOS.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.IO; diff --git a/src/EventBuilder/Program.cs b/src/EventBuilder/Program.cs index 7ada274386..6f99bc0f49 100644 --- a/src/EventBuilder/Program.cs +++ b/src/EventBuilder/Program.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; @@ -101,6 +101,10 @@ private static void Main(string[] args) platform = new XamForms(); break; + case AutoPlatform.Tizen: + platform = new Tizen(); + break; + case AutoPlatform.UWP: platform = new UWP(); break; @@ -123,6 +127,10 @@ private static void Main(string[] args) Environment.Exit((int)ExitCode.Success); } catch (Exception ex) { Log.Fatal(ex.ToString()); + + if (Debugger.IsAttached) { + Debugger.Break(); + } } } diff --git a/src/ReactiveUI.AndroidSupport/ControlFetcherMixin.cs b/src/ReactiveUI.AndroidSupport/ControlFetcherMixin.cs index 9d07b1d8ce..69b59ad9bb 100644 --- a/src/ReactiveUI.AndroidSupport/ControlFetcherMixin.cs +++ b/src/ReactiveUI.AndroidSupport/ControlFetcherMixin.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; @@ -12,6 +12,7 @@ using Android.Views; using Java.Interop; using Android.Support.V7.App; +using static ReactiveUI.ControlFetcherMixin; namespace ReactiveUI.AndroidSupport { @@ -67,20 +68,21 @@ public static T GetControl(this View This, [CallerMemberName]string propertyN () => This.FindViewById(controlIds[propertyName.ToLowerInvariant()]).JavaCast()); } - /// - /// This should be called in the Fragement's OnCreateView, with the newly inflated layout - /// - /// - /// - public static void WireUpControls(this global::Android.Support.V4.App.Fragment This, View inflatedView) + /// + /// A helper method to automatically resolve properties in an to their respective elements in the layout. + /// This should be called in the Fragement's OnCreateView, with the newly inflated layout + /// + /// + /// The newly inflated returned from . + /// The strategy used to resolve properties that either subclass , have a or have a + public static void WireUpControls(this global::Android.Support.V4.App.Fragment This, View inflatedView, ResolveStrategy resolveMembers = ResolveStrategy.Implicit) { - var members = This.GetType().GetRuntimeProperties() - .Where(m => m.PropertyType.IsSubclassOf(typeof(View))); + var members = This.getWireUpMembers(ResolveStrategy.Implicit); members.ToList().ForEach(m => { try { // Find the android control with the same name from the view - var view = inflatedView.getControlInternal(m.PropertyType, m.Name); + var view = inflatedView.getControlInternal(m.PropertyType, m.getResourceName()); // Set the activity field's value to the view with that identifier m.SetValue(This, view); @@ -91,26 +93,31 @@ public static void WireUpControls(this global::Android.Support.V4.App.Fragment T }); } - /// - /// - /// - public static void WireUpControls(this AppCompatActivity This) + // Copied from ReactiveUI/Platforms/android/ControlFetcherMixins.cs + static IEnumerable getWireUpMembers(this object This, ResolveStrategy resolveStrategy) { - var members = This.GetType().GetRuntimeProperties() - .Where(m => m.PropertyType.IsSubclassOf(typeof(View))); + var members = This.GetType().GetRuntimeProperties(); - members.ToList().ForEach(m => { - try { - // Find the android control with the same name - var view = This.getControlInternal(m.PropertyType, m.Name); + switch (resolveStrategy) { + default: + case ResolveStrategy.Implicit: + return members.Where(m => m.PropertyType.IsSubclassOf(typeof(View)) + || m.GetCustomAttribute(true) != null); - // Set the activity field's value to the view with that identifier - m.SetValue(This, view); - } catch (Exception ex) { - throw new MissingFieldException("Failed to wire up the Property " - + m.Name + " to a View in your layout with a corresponding identifier", ex); - } - }); + case ResolveStrategy.ExplicitOptIn: + return members.Where(m => m.GetCustomAttribute(true) != null); + + case ResolveStrategy.ExplicitOptOut: + return members.Where(m => typeof(View).IsAssignableFrom(m.PropertyType) + && m.GetCustomAttribute(true) == null); + } + } + + // Also copied from ReactiveUI/Platforms/android/ControlFetcherMixins.cs + static string getResourceName(this PropertyInfo member) + { + var resourceNameOverride = member.GetCustomAttribute()?.ResourceNameOverride; + return resourceNameOverride ?? member.Name; } static View getControlInternal(this View parent, Type viewType, string name) diff --git a/src/ReactiveUI.AndroidSupport/ReactiveAppCompatActivity.cs b/src/ReactiveUI.AndroidSupport/ReactiveAppCompatActivity.cs index 64665aed19..295c02a9cb 100644 --- a/src/ReactiveUI.AndroidSupport/ReactiveAppCompatActivity.cs +++ b/src/ReactiveUI.AndroidSupport/ReactiveAppCompatActivity.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.AndroidSupport/ReactiveDialogFragment.cs b/src/ReactiveUI.AndroidSupport/ReactiveDialogFragment.cs index 29012ffa39..f25ecfa54f 100644 --- a/src/ReactiveUI.AndroidSupport/ReactiveDialogFragment.cs +++ b/src/ReactiveUI.AndroidSupport/ReactiveDialogFragment.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.AndroidSupport/ReactiveFragment.cs b/src/ReactiveUI.AndroidSupport/ReactiveFragment.cs index 1db634e759..ae3e0bffb6 100644 --- a/src/ReactiveUI.AndroidSupport/ReactiveFragment.cs +++ b/src/ReactiveUI.AndroidSupport/ReactiveFragment.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.AndroidSupport/ReactiveFragmentActivity.cs b/src/ReactiveUI.AndroidSupport/ReactiveFragmentActivity.cs index 57c2e20065..05ad0ae7f4 100644 --- a/src/ReactiveUI.AndroidSupport/ReactiveFragmentActivity.cs +++ b/src/ReactiveUI.AndroidSupport/ReactiveFragmentActivity.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.AndroidSupport/ReactivePagerAdapter.cs b/src/ReactiveUI.AndroidSupport/ReactivePagerAdapter.cs index 299e36710c..81afad0f33 100644 --- a/src/ReactiveUI.AndroidSupport/ReactivePagerAdapter.cs +++ b/src/ReactiveUI.AndroidSupport/ReactivePagerAdapter.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.AndroidSupport/ReactiveRecyclerViewAdapter.cs b/src/ReactiveUI.AndroidSupport/ReactiveRecyclerViewAdapter.cs index b24d8158c8..69432bc433 100644 --- a/src/ReactiveUI.AndroidSupport/ReactiveRecyclerViewAdapter.cs +++ b/src/ReactiveUI.AndroidSupport/ReactiveRecyclerViewAdapter.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.AndroidSupport/ReactiveUI.AndroidSupport.csproj b/src/ReactiveUI.AndroidSupport/ReactiveUI.AndroidSupport.csproj index d4a55e8148..7bbf5c914e 100644 --- a/src/ReactiveUI.AndroidSupport/ReactiveUI.AndroidSupport.csproj +++ b/src/ReactiveUI.AndroidSupport/ReactiveUI.AndroidSupport.csproj @@ -1,4 +1,4 @@ - + MonoAndroid80 @@ -15,15 +15,12 @@ - - + + - - - diff --git a/src/ReactiveUI.AndroidSupport/ReactiveUI.AndroidSupport.licenseheader b/src/ReactiveUI.AndroidSupport/ReactiveUI.AndroidSupport.licenseheader index b951ef8147..4dc04bc065 100644 --- a/src/ReactiveUI.AndroidSupport/ReactiveUI.AndroidSupport.licenseheader +++ b/src/ReactiveUI.AndroidSupport/ReactiveUI.AndroidSupport.licenseheader @@ -1,12 +1,12 @@ extensions: designer.cs generated.cs extensions: .cs .cpp .h // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. extensions: .xml .config .xsd diff --git a/src/ReactiveUI.Blend/FollowObservableStateBehavior.cs b/src/ReactiveUI.Blend/FollowObservableStateBehavior.cs index dd8de96702..1b3590842e 100644 --- a/src/ReactiveUI.Blend/FollowObservableStateBehavior.cs +++ b/src/ReactiveUI.Blend/FollowObservableStateBehavior.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Blend/Platforms/net461/ObservableTrigger.cs b/src/ReactiveUI.Blend/Platforms/net461/ObservableTrigger.cs index 00e5c815d5..e63e309ac6 100644 --- a/src/ReactiveUI.Blend/Platforms/net461/ObservableTrigger.cs +++ b/src/ReactiveUI.Blend/Platforms/net461/ObservableTrigger.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Blend/Platforms/uap10.0.16299/Behavior.cs b/src/ReactiveUI.Blend/Platforms/uap10.0.16299/Behavior.cs index 190bb9df47..3dcb68df4f 100644 --- a/src/ReactiveUI.Blend/Platforms/uap10.0.16299/Behavior.cs +++ b/src/ReactiveUI.Blend/Platforms/uap10.0.16299/Behavior.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using Windows.UI.Xaml; diff --git a/src/ReactiveUI.Blend/Platforms/uap10.0.16299/ObservableTriggerBehavior.cs b/src/ReactiveUI.Blend/Platforms/uap10.0.16299/ObservableTriggerBehavior.cs index cb1aaa3ddf..9828654fde 100644 --- a/src/ReactiveUI.Blend/Platforms/uap10.0.16299/ObservableTriggerBehavior.cs +++ b/src/ReactiveUI.Blend/Platforms/uap10.0.16299/ObservableTriggerBehavior.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Blend/Properties/ReactiveUI.Blend_UWP.rd.xml b/src/ReactiveUI.Blend/Properties/ReactiveUI.Blend_UWP.rd.xml index 8c074036fe..774b2fd445 100644 --- a/src/ReactiveUI.Blend/Properties/ReactiveUI.Blend_UWP.rd.xml +++ b/src/ReactiveUI.Blend/Properties/ReactiveUI.Blend_UWP.rd.xml @@ -1,7 +1,7 @@ diff --git a/src/ReactiveUI.Blend/ReactiveUI.Blend.csproj b/src/ReactiveUI.Blend/ReactiveUI.Blend.csproj index 849cd740c8..b5d1a2f327 100644 --- a/src/ReactiveUI.Blend/ReactiveUI.Blend.csproj +++ b/src/ReactiveUI.Blend/ReactiveUI.Blend.csproj @@ -1,4 +1,4 @@ - + net461;uap10.0.16299 @@ -11,8 +11,8 @@ - - + + @@ -22,17 +22,15 @@ - + - + - - diff --git a/src/ReactiveUI.Blend/ReactiveUI.Blend.licenseheader b/src/ReactiveUI.Blend/ReactiveUI.Blend.licenseheader index b951ef8147..4dc04bc065 100644 --- a/src/ReactiveUI.Blend/ReactiveUI.Blend.licenseheader +++ b/src/ReactiveUI.Blend/ReactiveUI.Blend.licenseheader @@ -1,12 +1,12 @@ extensions: designer.cs generated.cs extensions: .cs .cpp .h // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. extensions: .xml .config .xsd diff --git a/src/ReactiveUI.Events.WPF/ReactiveUI.Events.WPF.csproj b/src/ReactiveUI.Events.WPF/ReactiveUI.Events.WPF.csproj index e28f5225e5..be556e811c 100644 --- a/src/ReactiveUI.Events.WPF/ReactiveUI.Events.WPF.csproj +++ b/src/ReactiveUI.Events.WPF/ReactiveUI.Events.WPF.csproj @@ -1,17 +1,18 @@ - + net461 ReactiveUI.Events.WPF ReactiveUI.Events Provides Observable-based events API for WPF UI controls/eventhandlers. The contents of this package is automatically generated, please target pull-requests to the code generator. ReactiveUI.Events.WPF + true - + @@ -22,6 +23,4 @@ - - \ No newline at end of file diff --git a/src/ReactiveUI.Events.WPF/ReactiveUI.Events.WPF.licenseheader b/src/ReactiveUI.Events.WPF/ReactiveUI.Events.WPF.licenseheader index b951ef8147..4dc04bc065 100644 --- a/src/ReactiveUI.Events.WPF/ReactiveUI.Events.WPF.licenseheader +++ b/src/ReactiveUI.Events.WPF/ReactiveUI.Events.WPF.licenseheader @@ -1,12 +1,12 @@ extensions: designer.cs generated.cs extensions: .cs .cpp .h // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. extensions: .xml .config .xsd diff --git a/src/ReactiveUI.Events.Winforms/ReactiveUI.Events.Winforms.csproj b/src/ReactiveUI.Events.Winforms/ReactiveUI.Events.Winforms.csproj index b232bb50cb..606750430e 100644 --- a/src/ReactiveUI.Events.Winforms/ReactiveUI.Events.Winforms.csproj +++ b/src/ReactiveUI.Events.Winforms/ReactiveUI.Events.Winforms.csproj @@ -1,17 +1,18 @@ - + net461 ReactiveUI.Events.Winforms ReactiveUI.Events Provides Observable-based events API for Winforms UI controls/eventhandlers. The contents of this package is automatically generated, please target pull-requests to the code generator. ReactiveUI.Events.Winforms + true - + @@ -25,6 +26,4 @@ - - \ No newline at end of file diff --git a/src/ReactiveUI.Events.Winforms/ReactiveUI.Events.Winforms.licenseheader b/src/ReactiveUI.Events.Winforms/ReactiveUI.Events.Winforms.licenseheader index b951ef8147..4dc04bc065 100644 --- a/src/ReactiveUI.Events.Winforms/ReactiveUI.Events.Winforms.licenseheader +++ b/src/ReactiveUI.Events.Winforms/ReactiveUI.Events.Winforms.licenseheader @@ -1,12 +1,12 @@ extensions: designer.cs generated.cs extensions: .cs .cpp .h // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. extensions: .xml .config .xsd diff --git a/src/ReactiveUI.Events.XamForms/ReactiveUI.Events.XamForms.csproj b/src/ReactiveUI.Events.XamForms/ReactiveUI.Events.XamForms.csproj index c963c9547a..97609dd8c6 100644 --- a/src/ReactiveUI.Events.XamForms/ReactiveUI.Events.XamForms.csproj +++ b/src/ReactiveUI.Events.XamForms/ReactiveUI.Events.XamForms.csproj @@ -1,4 +1,4 @@ - + netstandard2.0 ReactiveUI.Events.XamForms @@ -11,13 +11,11 @@ - + - + - - \ No newline at end of file diff --git a/src/ReactiveUI.Events.XamForms/ReactiveUI.Events.XamForms.licenseheader b/src/ReactiveUI.Events.XamForms/ReactiveUI.Events.XamForms.licenseheader index b951ef8147..4dc04bc065 100644 --- a/src/ReactiveUI.Events.XamForms/ReactiveUI.Events.XamForms.licenseheader +++ b/src/ReactiveUI.Events.XamForms/ReactiveUI.Events.XamForms.licenseheader @@ -1,12 +1,12 @@ extensions: designer.cs generated.cs extensions: .cs .cpp .h // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. extensions: .xml .config .xsd diff --git a/src/ReactiveUI.Events/ReactiveUI.Events.csproj b/src/ReactiveUI.Events/ReactiveUI.Events.csproj index 66045cc5cb..e8e4bc051f 100644 --- a/src/ReactiveUI.Events/ReactiveUI.Events.csproj +++ b/src/ReactiveUI.Events/ReactiveUI.Events.csproj @@ -1,6 +1,6 @@ - + - uap10.0.16299;Xamarin.iOS10;Xamarin.Mac20;MonoAndroid80 + uap10.0.16299;Xamarin.iOS10;Xamarin.Mac20;MonoAndroid80;tizen40 ReactiveUI.Events ReactiveUI.Events Provides Observable-based events API for common UI controls/eventhandlers. The contents of this package is automatically generated, please target pull-requests to the code generator. @@ -11,7 +11,7 @@ - + @@ -36,5 +36,11 @@ - + + + + + + + diff --git a/src/ReactiveUI.Events/ReactiveUI.Events.licenseheader b/src/ReactiveUI.Events/ReactiveUI.Events.licenseheader index b951ef8147..4dc04bc065 100644 --- a/src/ReactiveUI.Events/ReactiveUI.Events.licenseheader +++ b/src/ReactiveUI.Events/ReactiveUI.Events.licenseheader @@ -1,12 +1,12 @@ extensions: designer.cs generated.cs extensions: .cs .cpp .h // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. extensions: .xml .config .xsd diff --git a/src/ReactiveUI.Events/SingleAwaitSubject.cs b/src/ReactiveUI.Events/SingleAwaitSubject.cs index 6271bebbc9..890551a549 100644 --- a/src/ReactiveUI.Events/SingleAwaitSubject.cs +++ b/src/ReactiveUI.Events/SingleAwaitSubject.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Fody.Helpers/ObservableAsPropertyAttribute.cs b/src/ReactiveUI.Fody.Helpers/ObservableAsPropertyAttribute.cs index 3c1b2c275d..e2ef60e3a6 100644 --- a/src/ReactiveUI.Fody.Helpers/ObservableAsPropertyAttribute.cs +++ b/src/ReactiveUI.Fody.Helpers/ObservableAsPropertyAttribute.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Fody.Helpers/ObservableAsPropertyExtensions.cs b/src/ReactiveUI.Fody.Helpers/ObservableAsPropertyExtensions.cs index 31ad9f836f..4955849cbf 100644 --- a/src/ReactiveUI.Fody.Helpers/ObservableAsPropertyExtensions.cs +++ b/src/ReactiveUI.Fody.Helpers/ObservableAsPropertyExtensions.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Fody.Helpers/Properties/AssemblyInfo.cs b/src/ReactiveUI.Fody.Helpers/Properties/AssemblyInfo.cs index 4fa29309e5..241094917f 100644 --- a/src/ReactiveUI.Fody.Helpers/Properties/AssemblyInfo.cs +++ b/src/ReactiveUI.Fody.Helpers/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; diff --git a/src/ReactiveUI.Fody.Helpers/ReactiveAttribute.cs b/src/ReactiveUI.Fody.Helpers/ReactiveAttribute.cs index caa305568e..73159debfb 100644 --- a/src/ReactiveUI.Fody.Helpers/ReactiveAttribute.cs +++ b/src/ReactiveUI.Fody.Helpers/ReactiveAttribute.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Fody.Helpers/ReactiveDependencyAttribute.cs b/src/ReactiveUI.Fody.Helpers/ReactiveDependencyAttribute.cs index 065414b119..e485845db0 100644 --- a/src/ReactiveUI.Fody.Helpers/ReactiveDependencyAttribute.cs +++ b/src/ReactiveUI.Fody.Helpers/ReactiveDependencyAttribute.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Fody.Helpers/ReactiveUI.Fody.Helpers.csproj b/src/ReactiveUI.Fody.Helpers/ReactiveUI.Fody.Helpers.csproj index bed388444b..9de44da6e9 100644 --- a/src/ReactiveUI.Fody.Helpers/ReactiveUI.Fody.Helpers.csproj +++ b/src/ReactiveUI.Fody.Helpers/ReactiveUI.Fody.Helpers.csproj @@ -1,4 +1,4 @@ - + netstandard2.0;net461;uap10.0.16299;Xamarin.iOS10;Xamarin.Mac20;MonoAndroid80;netcoreapp2.0 ReactiveUI.Fody.Helpers @@ -14,7 +14,7 @@ - + @@ -45,7 +45,5 @@ - - - + diff --git a/src/ReactiveUI.Fody.Helpers/ReactiveUI.Fody.Helpers.licenseheader b/src/ReactiveUI.Fody.Helpers/ReactiveUI.Fody.Helpers.licenseheader index 712fdc59d7..aea52d66b6 100644 --- a/src/ReactiveUI.Fody.Helpers/ReactiveUI.Fody.Helpers.licenseheader +++ b/src/ReactiveUI.Fody.Helpers/ReactiveUI.Fody.Helpers.licenseheader @@ -1,12 +1,12 @@ extensions: designer.cs generated.cs extensions: .cs // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. extensions: .xml .config .xsd diff --git a/src/ReactiveUI.Fody.Tests/API/ApiApprovalTests.cs b/src/ReactiveUI.Fody.Tests/API/ApiApprovalTests.cs index b1ac60d9c3..33645af926 100644 --- a/src/ReactiveUI.Fody.Tests/API/ApiApprovalTests.cs +++ b/src/ReactiveUI.Fody.Tests/API/ApiApprovalTests.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Fody.Tests/FodyWeavers.xml b/src/ReactiveUI.Fody.Tests/FodyWeavers.xml index 287688a724..394cd180dc 100644 --- a/src/ReactiveUI.Fody.Tests/FodyWeavers.xml +++ b/src/ReactiveUI.Fody.Tests/FodyWeavers.xml @@ -1,7 +1,7 @@ diff --git a/src/ReactiveUI.Fody.Tests/Issues/Issue10Tests.cs b/src/ReactiveUI.Fody.Tests/Issues/Issue10Tests.cs index c56305d5a1..65fa5ca634 100644 --- a/src/ReactiveUI.Fody.Tests/Issues/Issue10Tests.cs +++ b/src/ReactiveUI.Fody.Tests/Issues/Issue10Tests.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Fody.Tests/Issues/Issue11Tests.cs b/src/ReactiveUI.Fody.Tests/Issues/Issue11Tests.cs index 00465e276f..8cf9d59eab 100644 --- a/src/ReactiveUI.Fody.Tests/Issues/Issue11Tests.cs +++ b/src/ReactiveUI.Fody.Tests/Issues/Issue11Tests.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Reactive.Linq; diff --git a/src/ReactiveUI.Fody.Tests/Issues/Issue13Tests.cs b/src/ReactiveUI.Fody.Tests/Issues/Issue13Tests.cs index 78d2963668..615dbfb517 100644 --- a/src/ReactiveUI.Fody.Tests/Issues/Issue13Tests.cs +++ b/src/ReactiveUI.Fody.Tests/Issues/Issue13Tests.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using ReactiveUI.Fody.Helpers; diff --git a/src/ReactiveUI.Fody.Tests/ObservableAsPropertyTests.cs b/src/ReactiveUI.Fody.Tests/ObservableAsPropertyTests.cs index f4fccd7018..f16ead9040 100644 --- a/src/ReactiveUI.Fody.Tests/ObservableAsPropertyTests.cs +++ b/src/ReactiveUI.Fody.Tests/ObservableAsPropertyTests.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Reactive.Linq; diff --git a/src/ReactiveUI.Fody.Tests/ReactiveDependencyTests.cs b/src/ReactiveUI.Fody.Tests/ReactiveDependencyTests.cs index 82862edafa..b0d7d127fa 100644 --- a/src/ReactiveUI.Fody.Tests/ReactiveDependencyTests.cs +++ b/src/ReactiveUI.Fody.Tests/ReactiveDependencyTests.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.ComponentModel; diff --git a/src/ReactiveUI.Fody.Tests/ReactiveUI.Fody.Tests.csproj b/src/ReactiveUI.Fody.Tests/ReactiveUI.Fody.Tests.csproj index 3ff0370bc9..5e8c45be4f 100644 --- a/src/ReactiveUI.Fody.Tests/ReactiveUI.Fody.Tests.csproj +++ b/src/ReactiveUI.Fody.Tests/ReactiveUI.Fody.Tests.csproj @@ -1,18 +1,18 @@ - + net461 false - + - - - + + + @@ -43,7 +43,4 @@ until the projects are setup as suggested here: https://github.com/Fody/BasicFodyAddin --> - - - diff --git a/src/ReactiveUI.Fody.Tests/ReactiveUI.Fody.Tests.licenseheader b/src/ReactiveUI.Fody.Tests/ReactiveUI.Fody.Tests.licenseheader index 712fdc59d7..aea52d66b6 100644 --- a/src/ReactiveUI.Fody.Tests/ReactiveUI.Fody.Tests.licenseheader +++ b/src/ReactiveUI.Fody.Tests/ReactiveUI.Fody.Tests.licenseheader @@ -1,12 +1,12 @@ extensions: designer.cs generated.cs extensions: .cs // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. extensions: .xml .config .xsd diff --git a/src/ReactiveUI.Fody/CecilExtensions.cs b/src/ReactiveUI.Fody/CecilExtensions.cs index e6b7b3084f..59edca4ed8 100644 --- a/src/ReactiveUI.Fody/CecilExtensions.cs +++ b/src/ReactiveUI.Fody/CecilExtensions.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Fody/ModuleWeaver.cs b/src/ReactiveUI.Fody/ModuleWeaver.cs index 057099afe3..b8574e73b9 100644 --- a/src/ReactiveUI.Fody/ModuleWeaver.cs +++ b/src/ReactiveUI.Fody/ModuleWeaver.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Collections.Generic; diff --git a/src/ReactiveUI.Fody/ObservableAsPropertyWeaver.cs b/src/ReactiveUI.Fody/ObservableAsPropertyWeaver.cs index d0529d5f9f..9a67493efb 100644 --- a/src/ReactiveUI.Fody/ObservableAsPropertyWeaver.cs +++ b/src/ReactiveUI.Fody/ObservableAsPropertyWeaver.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Fody/Properties/AssemblyInfo.cs b/src/ReactiveUI.Fody/Properties/AssemblyInfo.cs index 4fa29309e5..241094917f 100644 --- a/src/ReactiveUI.Fody/Properties/AssemblyInfo.cs +++ b/src/ReactiveUI.Fody/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; diff --git a/src/ReactiveUI.Fody/ReactiveDependencyPropertyWeaver.cs b/src/ReactiveUI.Fody/ReactiveDependencyPropertyWeaver.cs index fe39456487..fb20c97f7b 100644 --- a/src/ReactiveUI.Fody/ReactiveDependencyPropertyWeaver.cs +++ b/src/ReactiveUI.Fody/ReactiveDependencyPropertyWeaver.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Fody/ReactiveUI.Fody.licenseheader b/src/ReactiveUI.Fody/ReactiveUI.Fody.licenseheader index 712fdc59d7..aea52d66b6 100644 --- a/src/ReactiveUI.Fody/ReactiveUI.Fody.licenseheader +++ b/src/ReactiveUI.Fody/ReactiveUI.Fody.licenseheader @@ -1,12 +1,12 @@ extensions: designer.cs generated.cs extensions: .cs // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. extensions: .xml .config .xsd diff --git a/src/ReactiveUI.Fody/ReactiveUIPropertyWeaver.cs b/src/ReactiveUI.Fody/ReactiveUIPropertyWeaver.cs index 314e155eff..79dac35127 100644 --- a/src/ReactiveUI.Fody/ReactiveUIPropertyWeaver.cs +++ b/src/ReactiveUI.Fody/ReactiveUIPropertyWeaver.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.LeakTests/ReactiveUI.LeakTests.csproj b/src/ReactiveUI.LeakTests/ReactiveUI.LeakTests.csproj index e710340600..1b0f048915 100644 --- a/src/ReactiveUI.LeakTests/ReactiveUI.LeakTests.csproj +++ b/src/ReactiveUI.LeakTests/ReactiveUI.LeakTests.csproj @@ -1,14 +1,14 @@ - + net461 false - - - - + + + + diff --git a/src/ReactiveUI.Testing/Properties/ReactiveUI.Testing.rd.xml b/src/ReactiveUI.Testing/Properties/ReactiveUI.Testing.rd.xml index ce34aa9755..7c04482395 100644 --- a/src/ReactiveUI.Testing/Properties/ReactiveUI.Testing.rd.xml +++ b/src/ReactiveUI.Testing/Properties/ReactiveUI.Testing.rd.xml @@ -1,7 +1,7 @@ diff --git a/src/ReactiveUI.Testing/ReactiveUI.Testing.csproj b/src/ReactiveUI.Testing/ReactiveUI.Testing.csproj index 35c579db71..907e9eef6e 100644 --- a/src/ReactiveUI.Testing/ReactiveUI.Testing.csproj +++ b/src/ReactiveUI.Testing/ReactiveUI.Testing.csproj @@ -1,5 +1,4 @@ - - + netstandard2.0;netcoreapp2.0;net461;uap10.0.16299;Xamarin.iOS10;Xamarin.Mac20;MonoAndroid80 ReactiveUI.Testing @@ -9,9 +8,11 @@ - + - + + + \ No newline at end of file diff --git a/src/ReactiveUI.Testing/ReactiveUI.Testing.licenseheader b/src/ReactiveUI.Testing/ReactiveUI.Testing.licenseheader index b951ef8147..4dc04bc065 100644 --- a/src/ReactiveUI.Testing/ReactiveUI.Testing.licenseheader +++ b/src/ReactiveUI.Testing/ReactiveUI.Testing.licenseheader @@ -1,12 +1,12 @@ extensions: designer.cs generated.cs extensions: .cs .cpp .h // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. extensions: .xml .config .xsd diff --git a/src/ReactiveUI.Testing/TestUtils.cs b/src/ReactiveUI.Testing/TestUtils.cs index 42c0865060..a02b6a6c5b 100644 --- a/src/ReactiveUI.Testing/TestUtils.cs +++ b/src/ReactiveUI.Testing/TestUtils.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Tests/API/ApiApprovalTests.ReactiveUI.approved.txt b/src/ReactiveUI.Tests/API/ApiApprovalTests.ReactiveUI.approved.txt index fcadfd38ef..4d763f7935 100644 --- a/src/ReactiveUI.Tests/API/ApiApprovalTests.ReactiveUI.approved.txt +++ b/src/ReactiveUI.Tests/API/ApiApprovalTests.ReactiveUI.approved.txt @@ -598,7 +598,6 @@ namespace ReactiveUI public virtual void InsertRange(int index, System.Collections.Generic.IEnumerable collection) { } public virtual void Move(int oldIndex, int newIndex) { } protected void MoveItem(int oldIndex, int newIndex) { } - protected virtual void publishResetNotification() { } protected virtual void raiseCollectionChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs args) { } protected virtual void raiseCollectionChanging(System.Collections.Specialized.NotifyCollectionChangedEventArgs args) { } public virtual bool Remove(T item) { } diff --git a/src/ReactiveUI.Tests/API/ApiApprovalTests.cs b/src/ReactiveUI.Tests/API/ApiApprovalTests.cs index c424d93f5b..61f4e0ce3e 100644 --- a/src/ReactiveUI.Tests/API/ApiApprovalTests.cs +++ b/src/ReactiveUI.Tests/API/ApiApprovalTests.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Tests/Activation/ActivatingView.cs b/src/ReactiveUI.Tests/Activation/ActivatingView.cs index 90c21169ec..377d538327 100644 --- a/src/ReactiveUI.Tests/Activation/ActivatingView.cs +++ b/src/ReactiveUI.Tests/Activation/ActivatingView.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Reactive; diff --git a/src/ReactiveUI.Tests/Activation/ActivatingViewFetcher.cs b/src/ReactiveUI.Tests/Activation/ActivatingViewFetcher.cs index 1646d3df03..db699492b9 100644 --- a/src/ReactiveUI.Tests/Activation/ActivatingViewFetcher.cs +++ b/src/ReactiveUI.Tests/Activation/ActivatingViewFetcher.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Tests/Activation/ActivatingViewModel.cs b/src/ReactiveUI.Tests/Activation/ActivatingViewModel.cs index bc4a476281..cf04a568bf 100644 --- a/src/ReactiveUI.Tests/Activation/ActivatingViewModel.cs +++ b/src/ReactiveUI.Tests/Activation/ActivatingViewModel.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Reactive.Disposables; diff --git a/src/ReactiveUI.Tests/Activation/ActivatingViewModelTests.cs b/src/ReactiveUI.Tests/Activation/ActivatingViewModelTests.cs index c809cbdf81..bf553efb35 100644 --- a/src/ReactiveUI.Tests/Activation/ActivatingViewModelTests.cs +++ b/src/ReactiveUI.Tests/Activation/ActivatingViewModelTests.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using Xunit; diff --git a/src/ReactiveUI.Tests/Activation/ActivatingViewTests.cs b/src/ReactiveUI.Tests/Activation/ActivatingViewTests.cs index 7051ddb923..9ac1fa13b7 100644 --- a/src/ReactiveUI.Tests/Activation/ActivatingViewTests.cs +++ b/src/ReactiveUI.Tests/Activation/ActivatingViewTests.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Reactive; diff --git a/src/ReactiveUI.Tests/Activation/CanActivateViewFetcherTests.cs b/src/ReactiveUI.Tests/Activation/CanActivateViewFetcherTests.cs index 2d5221242e..cbd71a5f32 100644 --- a/src/ReactiveUI.Tests/Activation/CanActivateViewFetcherTests.cs +++ b/src/ReactiveUI.Tests/Activation/CanActivateViewFetcherTests.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Tests/Activation/DerivedActivatingViewModel.cs b/src/ReactiveUI.Tests/Activation/DerivedActivatingViewModel.cs index d26c56a21b..f3e655d4a6 100644 --- a/src/ReactiveUI.Tests/Activation/DerivedActivatingViewModel.cs +++ b/src/ReactiveUI.Tests/Activation/DerivedActivatingViewModel.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Reactive.Disposables; diff --git a/src/ReactiveUI.Tests/Activation/ViewModelActivatorTests.cs b/src/ReactiveUI.Tests/Activation/ViewModelActivatorTests.cs index f07e9ea3f4..920b7f03cf 100644 --- a/src/ReactiveUI.Tests/Activation/ViewModelActivatorTests.cs +++ b/src/ReactiveUI.Tests/Activation/ViewModelActivatorTests.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Reactive.Concurrency; diff --git a/src/ReactiveUI.Tests/AutoPersistHelperTest.cs b/src/ReactiveUI.Tests/AutoPersistHelperTest.cs index 46aa8db1a2..c5b9883648 100644 --- a/src/ReactiveUI.Tests/AutoPersistHelperTest.cs +++ b/src/ReactiveUI.Tests/AutoPersistHelperTest.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Tests/AwaiterTest.cs b/src/ReactiveUI.Tests/AwaiterTest.cs index 4dea2d4275..e4c217dfff 100644 --- a/src/ReactiveUI.Tests/AwaiterTest.cs +++ b/src/ReactiveUI.Tests/AwaiterTest.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Tests/BindingTypeConvertersTest.cs b/src/ReactiveUI.Tests/BindingTypeConvertersTest.cs index e6a1c58505..84bc337451 100644 --- a/src/ReactiveUI.Tests/BindingTypeConvertersTest.cs +++ b/src/ReactiveUI.Tests/BindingTypeConvertersTest.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using Xunit; diff --git a/src/ReactiveUI.Tests/CommandBindingTests.cs b/src/ReactiveUI.Tests/CommandBindingTests.cs index 6ae99aeba4..bb9362fffd 100755 --- a/src/ReactiveUI.Tests/CommandBindingTests.cs +++ b/src/ReactiveUI.Tests/CommandBindingTests.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Tests/DependencyResolverTests.cs b/src/ReactiveUI.Tests/DependencyResolverTests.cs index 5c9ecc0e93..c59836eba3 100644 --- a/src/ReactiveUI.Tests/DependencyResolverTests.cs +++ b/src/ReactiveUI.Tests/DependencyResolverTests.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. namespace ReactiveUI.Tests diff --git a/src/ReactiveUI.Tests/INPCObservableForPropertyTests.cs b/src/ReactiveUI.Tests/INPCObservableForPropertyTests.cs index 134cfe7da9..aea9cf330a 100644 --- a/src/ReactiveUI.Tests/INPCObservableForPropertyTests.cs +++ b/src/ReactiveUI.Tests/INPCObservableForPropertyTests.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Tests/InteractionsTest.cs b/src/ReactiveUI.Tests/InteractionsTest.cs index e2c6dd841e..6f7afee06d 100755 --- a/src/ReactiveUI.Tests/InteractionsTest.cs +++ b/src/ReactiveUI.Tests/InteractionsTest.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Tests/MessageBusTest.cs b/src/ReactiveUI.Tests/MessageBusTest.cs index 0b9d1b5ef8..30c7409646 100644 --- a/src/ReactiveUI.Tests/MessageBusTest.cs +++ b/src/ReactiveUI.Tests/MessageBusTest.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Tests/ObservableAsPropertyHelperTest.cs b/src/ReactiveUI.Tests/ObservableAsPropertyHelperTest.cs index b4751cdd7e..1f7bfe8f1a 100755 --- a/src/ReactiveUI.Tests/ObservableAsPropertyHelperTest.cs +++ b/src/ReactiveUI.Tests/ObservableAsPropertyHelperTest.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Tests/ObservedChangedMixinTest.cs b/src/ReactiveUI.Tests/ObservedChangedMixinTest.cs index c732dfb1a2..537bb5094d 100755 --- a/src/ReactiveUI.Tests/ObservedChangedMixinTest.cs +++ b/src/ReactiveUI.Tests/ObservedChangedMixinTest.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Tests/OrderedComparerTests.cs b/src/ReactiveUI.Tests/OrderedComparerTests.cs index e7df65ea2c..a2ff95385a 100644 --- a/src/ReactiveUI.Tests/OrderedComparerTests.cs +++ b/src/ReactiveUI.Tests/OrderedComparerTests.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Tests/Platforms/android/MainActivity.cs b/src/ReactiveUI.Tests/Platforms/android/MainActivity.cs index 660630124c..0489601268 100644 --- a/src/ReactiveUI.Tests/Platforms/android/MainActivity.cs +++ b/src/ReactiveUI.Tests/Platforms/android/MainActivity.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Tests/Platforms/android/PropertyBindingTestViews.cs b/src/ReactiveUI.Tests/Platforms/android/PropertyBindingTestViews.cs index f8f990090f..757051cd7c 100644 --- a/src/ReactiveUI.Tests/Platforms/android/PropertyBindingTestViews.cs +++ b/src/ReactiveUI.Tests/Platforms/android/PropertyBindingTestViews.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Tests/Platforms/cocoa/AppDelegate.cs b/src/ReactiveUI.Tests/Platforms/cocoa/AppDelegate.cs index cfa1fbb0be..a275ff7a0a 100644 --- a/src/ReactiveUI.Tests/Platforms/cocoa/AppDelegate.cs +++ b/src/ReactiveUI.Tests/Platforms/cocoa/AppDelegate.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Tests/Platforms/cocoa/IndexNormalizerTest.cs b/src/ReactiveUI.Tests/Platforms/cocoa/IndexNormalizerTest.cs index fd2f0576a4..c13c730ff4 100644 --- a/src/ReactiveUI.Tests/Platforms/cocoa/IndexNormalizerTest.cs +++ b/src/ReactiveUI.Tests/Platforms/cocoa/IndexNormalizerTest.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. namespace ReactiveUI.Tests diff --git a/src/ReactiveUI.Tests/Platforms/cocoa/KVOBindingTests.cs b/src/ReactiveUI.Tests/Platforms/cocoa/KVOBindingTests.cs index e9467ce3e2..76ad91cbe0 100644 --- a/src/ReactiveUI.Tests/Platforms/cocoa/KVOBindingTests.cs +++ b/src/ReactiveUI.Tests/Platforms/cocoa/KVOBindingTests.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Tests/Platforms/cocoa/Main.cs b/src/ReactiveUI.Tests/Platforms/cocoa/Main.cs index abda85550d..eb2074fa99 100644 --- a/src/ReactiveUI.Tests/Platforms/cocoa/Main.cs +++ b/src/ReactiveUI.Tests/Platforms/cocoa/Main.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Tests/Platforms/cocoa/PropertyBindingTestViews.cs b/src/ReactiveUI.Tests/Platforms/cocoa/PropertyBindingTestViews.cs index a1f70dc8cf..00710a188f 100644 --- a/src/ReactiveUI.Tests/Platforms/cocoa/PropertyBindingTestViews.cs +++ b/src/ReactiveUI.Tests/Platforms/cocoa/PropertyBindingTestViews.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Tests/Platforms/cocoa/UnitTestAppDelegate.cs b/src/ReactiveUI.Tests/Platforms/cocoa/UnitTestAppDelegate.cs index 4246a9118c..982d929db2 100644 --- a/src/ReactiveUI.Tests/Platforms/cocoa/UnitTestAppDelegate.cs +++ b/src/ReactiveUI.Tests/Platforms/cocoa/UnitTestAppDelegate.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Tests/Platforms/winforms/ActivationTests.cs b/src/ReactiveUI.Tests/Platforms/winforms/ActivationTests.cs index 5e56e721ef..a0f25015dd 100644 --- a/src/ReactiveUI.Tests/Platforms/winforms/ActivationTests.cs +++ b/src/ReactiveUI.Tests/Platforms/winforms/ActivationTests.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Tests/Platforms/winforms/CommandBindingTests.cs b/src/ReactiveUI.Tests/Platforms/winforms/CommandBindingTests.cs old mode 100644 new mode 100755 index aeef462ff0..d390892ff2 --- a/src/ReactiveUI.Tests/Platforms/winforms/CommandBindingTests.cs +++ b/src/ReactiveUI.Tests/Platforms/winforms/CommandBindingTests.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Tests/Platforms/winforms/DefaultPropertyBindingTests.cs b/src/ReactiveUI.Tests/Platforms/winforms/DefaultPropertyBindingTests.cs index 1f68ee7b4d..6ccee06bad 100644 --- a/src/ReactiveUI.Tests/Platforms/winforms/DefaultPropertyBindingTests.cs +++ b/src/ReactiveUI.Tests/Platforms/winforms/DefaultPropertyBindingTests.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Tests/Platforms/winforms/ReactiveBindingListTests.cs b/src/ReactiveUI.Tests/Platforms/winforms/ReactiveBindingListTests.cs index 99aa22c46b..226e237aac 100644 --- a/src/ReactiveUI.Tests/Platforms/winforms/ReactiveBindingListTests.cs +++ b/src/ReactiveUI.Tests/Platforms/winforms/ReactiveBindingListTests.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Tests/Platforms/winforms/RoutedViewHostTests.cs b/src/ReactiveUI.Tests/Platforms/winforms/RoutedViewHostTests.cs old mode 100644 new mode 100755 index a4826190fb..a11fd66c03 --- a/src/ReactiveUI.Tests/Platforms/winforms/RoutedViewHostTests.cs +++ b/src/ReactiveUI.Tests/Platforms/winforms/RoutedViewHostTests.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Linq; diff --git a/src/ReactiveUI.Tests/Platforms/winforms/ViewModelViewHostTests.cs b/src/ReactiveUI.Tests/Platforms/winforms/ViewModelViewHostTests.cs index 4e33f42c01..e81796148a 100644 --- a/src/ReactiveUI.Tests/Platforms/winforms/ViewModelViewHostTests.cs +++ b/src/ReactiveUI.Tests/Platforms/winforms/ViewModelViewHostTests.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Tests/Platforms/xaml/ActivationForViewFetcherTest.cs b/src/ReactiveUI.Tests/Platforms/xaml/ActivationForViewFetcherTest.cs index 370a01c51f..3d830a8f4f 100644 --- a/src/ReactiveUI.Tests/Platforms/xaml/ActivationForViewFetcherTest.cs +++ b/src/ReactiveUI.Tests/Platforms/xaml/ActivationForViewFetcherTest.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using Microsoft.Reactive.Testing; diff --git a/src/ReactiveUI.Tests/Platforms/xaml/DependencyObjectObservableForPropertyTest.cs b/src/ReactiveUI.Tests/Platforms/xaml/DependencyObjectObservableForPropertyTest.cs index 590b3a1d9a..904d1cb558 100644 --- a/src/ReactiveUI.Tests/Platforms/xaml/DependencyObjectObservableForPropertyTest.cs +++ b/src/ReactiveUI.Tests/Platforms/xaml/DependencyObjectObservableForPropertyTest.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Tests/Platforms/xaml/PropertyBindingTestViews.cs b/src/ReactiveUI.Tests/Platforms/xaml/PropertyBindingTestViews.cs index c8bc190697..46efe450f8 100644 --- a/src/ReactiveUI.Tests/Platforms/xaml/PropertyBindingTestViews.cs +++ b/src/ReactiveUI.Tests/Platforms/xaml/PropertyBindingTestViews.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Tests/PropertyBindingTest.cs b/src/ReactiveUI.Tests/PropertyBindingTest.cs index 926d9b7073..365e34b27d 100644 --- a/src/ReactiveUI.Tests/PropertyBindingTest.cs +++ b/src/ReactiveUI.Tests/PropertyBindingTest.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Tests/ReactiveCollectionTest.cs b/src/ReactiveUI.Tests/ReactiveCollectionTest.cs index ed14c40e10..99fcc9c653 100644 --- a/src/ReactiveUI.Tests/ReactiveCollectionTest.cs +++ b/src/ReactiveUI.Tests/ReactiveCollectionTest.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using Microsoft.Reactive.Testing; @@ -481,6 +481,149 @@ public void GetAResetWhenWeAddALotOfItems() Assert.Equal(1, reset.Count); } + // ActOnEveryObject + + [Fact] + public void ActOnEveryObjectShouldHandlePreexistingItems() + { + var testObj = new TestFixture + { + NullableInt = null + }; + var fixture = new ReactiveList { testObj }; + + fixture.ActOnEveryObject(addedObj => { + addedObj.NullableInt = 1; + }, removedObj => { + removedObj.NullableInt = 0; + }); + + Assert.Equal(1, testObj.NullableInt); + } + + [Fact] + public void ActOnEveryObjectShouldHandleAddingItems() + { + var testObj = new TestFixture + { + NullableInt = null + }; + var fixture = new ReactiveList(); + + fixture.ActOnEveryObject(addedObj => { + addedObj.NullableInt = 1; + }, removedObj => { + removedObj.NullableInt = 0; + }); + + fixture.Add(testObj); + + Assert.Equal(1, testObj.NullableInt); + } + + [Fact] + public void ActOnEveryObjectShouldHandleRemovingItems() + { + var testObj = new TestFixture + { + NullableInt = null + }; + var fixture = new ReactiveList { testObj }; + + fixture.ActOnEveryObject(addedObj => { + addedObj.NullableInt = 1; + }, removedObj => { + removedObj.NullableInt = 0; + }); + + fixture.Remove(testObj); + + Assert.Equal(0, testObj.NullableInt); + } + + [Fact] + public void ActOnEveryObjectShouldHandleClear() + { + var testObj = new TestFixture + { + NullableInt = null + }; + var fixture = new ReactiveList { testObj }; + + fixture.ActOnEveryObject(addedObj => { + addedObj.NullableInt = 1; + }, removedObj => { + removedObj.NullableInt = 0; + }); + + fixture.Clear(); + + Assert.Equal(0, testObj.NullableInt); + } + + [Fact] + public void ActOnEveryObjectShouldHandleAddUnderSuppressedNotifications() + { + var testObj = new TestFixture + { + NullableInt = null + }; + var fixture = new ReactiveList(); + + fixture.ActOnEveryObject(addedObj => { + addedObj.NullableInt = 1; + }, removedObj => { + removedObj.NullableInt = 0; + }); + + using (fixture.SuppressChangeNotifications()) { + fixture.Add(testObj); + } + Assert.Equal(1, testObj.NullableInt); + } + + [Fact] + public void ActOnEveryObjectShouldHandleRemoveUnderSuppressedNotifications() + { + var testObj = new TestFixture + { + NullableInt = null + }; + var fixture = new ReactiveList { testObj }; + + fixture.ActOnEveryObject(addedObj => { + addedObj.NullableInt = 1; + }, removedObj => { + removedObj.NullableInt = 0; + }); + + using (fixture.SuppressChangeNotifications()) { + fixture.Remove(testObj); + } + Assert.Equal(0, testObj.NullableInt); + } + + [Fact] + public void ActOnEveryObjectShouldHandleClearUnderSuppressedNotifications() + { + var testObj = new TestFixture + { + NullableInt = null + }; + var fixture = new ReactiveList { testObj }; + + fixture.ActOnEveryObject(addedObj => { + addedObj.NullableInt = 1; + }, removedObj => { + removedObj.NullableInt = 0; + }); + + using (fixture.SuppressChangeNotifications()) { + fixture.Clear(); + } + Assert.Equal(0, testObj.NullableInt); + } + [Fact] public void GetARangeWhenWeAddAListOfItems() { @@ -984,6 +1127,67 @@ public void DerviedCollectionShouldHandleItemsRemoved() Assert.Equal(disposed.Count, 2 + count); } + [WpfFact] + public void DataboundReactiveListDoesNotThrowForAddRange() + { + var vm = new PropertyBindViewModel(); + var view = new PropertyBindView { ViewModel = vm }; + var fixture = new PropertyBinderImplementation(); + fixture.OneWayBind(vm, view, m => m.SomeCollectionOfStrings, v => v.FakeItemsControl.ItemsSource); + // eliminate the ResetChangeThreshold from the equation + vm.SomeCollectionOfStrings.ResetChangeThreshold = int.MinValue; + + // Within the reset threshold + vm.SomeCollectionOfStrings.AddRange(Create(5)); + vm.SomeCollectionOfStrings.AddRange(Create(20)); + + IEnumerable Create(int numElements) + => Enumerable.Range(1, numElements).Select(i => $"item_{i}"); + } + + [WpfFact] + public void DataboundReactiveListDoesNotThrowForInsertRange() + { + var vm = new PropertyBindViewModel(); + var view = new PropertyBindView { ViewModel = vm }; + var fixture = new PropertyBinderImplementation(); + fixture.OneWayBind(vm, view, m => m.SomeCollectionOfStrings, v => v.FakeItemsControl.ItemsSource); + vm.SomeCollectionOfStrings.ResetChangeThreshold = int.MinValue; + + foreach (var item in Create(5)) + { + vm.SomeCollectionOfStrings.Add(item); + } + + // within reset threshold + vm.SomeCollectionOfStrings.InsertRange(2, Create(5)); + // outside reset threshold + vm.SomeCollectionOfStrings.InsertRange(2, Create(20)); + + IEnumerable Create(int numElements) + => Enumerable.Range(1, numElements).Select(i => $"item_{i}"); + } + + [WpfFact] + public void DataboundReactiveListDoesNotThrowForRemoveRange() + { + var vm = new PropertyBindViewModel(); + var view = new PropertyBindView { ViewModel = vm }; + var fixture = new PropertyBinderImplementation(); + fixture.OneWayBind(vm, view, m => m.SomeCollectionOfStrings, v => v.FakeItemsControl.ItemsSource); + vm.SomeCollectionOfStrings.ResetChangeThreshold = int.MinValue; + + foreach (var item in Enumerable.Range(1, 40).Select(i => $"item_{i}")) + { + vm.SomeCollectionOfStrings.Add(item); + } + + // within reset threshold + vm.SomeCollectionOfStrings.RemoveRange(2, 5); + // outside reset threshold + vm.SomeCollectionOfStrings.RemoveRange(2, 20); + } + public class DerivedCollectionLogging { // We need a sentinel class to make sure no test has triggered the warnings before diff --git a/src/ReactiveUI.Tests/ReactiveCommandTest.cs b/src/ReactiveUI.Tests/ReactiveCommandTest.cs index 0e3c827335..62dfec1968 100755 --- a/src/ReactiveUI.Tests/ReactiveCommandTest.cs +++ b/src/ReactiveUI.Tests/ReactiveCommandTest.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Tests/ReactiveNotifyPropertyChangedMixinTest.cs b/src/ReactiveUI.Tests/ReactiveNotifyPropertyChangedMixinTest.cs index 6e1a004bca..1589f7404f 100755 --- a/src/ReactiveUI.Tests/ReactiveNotifyPropertyChangedMixinTest.cs +++ b/src/ReactiveUI.Tests/ReactiveNotifyPropertyChangedMixinTest.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Tests/ReactiveObjectTest.cs b/src/ReactiveUI.Tests/ReactiveObjectTest.cs index 7a6073cb20..56c460dbf0 100644 --- a/src/ReactiveUI.Tests/ReactiveObjectTest.cs +++ b/src/ReactiveUI.Tests/ReactiveObjectTest.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Tests/ReactiveUI.Tests.csproj b/src/ReactiveUI.Tests/ReactiveUI.Tests.csproj index 98502db5f7..d4d6d0cfae 100644 --- a/src/ReactiveUI.Tests/ReactiveUI.Tests.csproj +++ b/src/ReactiveUI.Tests/ReactiveUI.Tests.csproj @@ -1,4 +1,4 @@ - + net461 @@ -6,16 +6,16 @@ - + - - - - - - + + + + + + @@ -49,7 +49,4 @@ - - - diff --git a/src/ReactiveUI.Tests/ReactiveUI.Tests.licenseheader b/src/ReactiveUI.Tests/ReactiveUI.Tests.licenseheader index b951ef8147..4dc04bc065 100644 --- a/src/ReactiveUI.Tests/ReactiveUI.Tests.licenseheader +++ b/src/ReactiveUI.Tests/ReactiveUI.Tests.licenseheader @@ -1,12 +1,12 @@ extensions: designer.cs generated.cs extensions: .cs .cpp .h // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. extensions: .xml .config .xsd diff --git a/src/ReactiveUI.Tests/RoutableViewModelMixinTests.cs b/src/ReactiveUI.Tests/RoutableViewModelMixinTests.cs index 9f362505ba..835ccee3bd 100644 --- a/src/ReactiveUI.Tests/RoutableViewModelMixinTests.cs +++ b/src/ReactiveUI.Tests/RoutableViewModelMixinTests.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Tests/RoutingState.cs b/src/ReactiveUI.Tests/RoutingState.cs index 518d4b5d0e..74962738ad 100755 --- a/src/ReactiveUI.Tests/RoutingState.cs +++ b/src/ReactiveUI.Tests/RoutingState.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Tests/RxAppTest.cs b/src/ReactiveUI.Tests/RxAppTest.cs index 06f0b70d34..52ad85f81a 100644 --- a/src/ReactiveUI.Tests/RxAppTest.cs +++ b/src/ReactiveUI.Tests/RxAppTest.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Diagnostics; diff --git a/src/ReactiveUI.Tests/TestLogger.cs b/src/ReactiveUI.Tests/TestLogger.cs index dded7b0a98..18a1614d5b 100644 --- a/src/ReactiveUI.Tests/TestLogger.cs +++ b/src/ReactiveUI.Tests/TestLogger.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Tests/TestUtilsTest.cs b/src/ReactiveUI.Tests/TestUtilsTest.cs index 3cf6b8578a..3c49174e2c 100644 --- a/src/ReactiveUI.Tests/TestUtilsTest.cs +++ b/src/ReactiveUI.Tests/TestUtilsTest.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Threading.Tasks; diff --git a/src/ReactiveUI.Tests/Utility.cs b/src/ReactiveUI.Tests/Utility.cs index a6aa36d89a..efd2391e89 100644 --- a/src/ReactiveUI.Tests/Utility.cs +++ b/src/ReactiveUI.Tests/Utility.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Tests/ViewLocatorTests.cs b/src/ReactiveUI.Tests/ViewLocatorTests.cs index 41ba2341d2..a861b840b8 100644 --- a/src/ReactiveUI.Tests/ViewLocatorTests.cs +++ b/src/ReactiveUI.Tests/ViewLocatorTests.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Tests/WaitForDispatcherSchedulerTests.cs b/src/ReactiveUI.Tests/WaitForDispatcherSchedulerTests.cs new file mode 100644 index 0000000000..6b24f11ccd --- /dev/null +++ b/src/ReactiveUI.Tests/WaitForDispatcherSchedulerTests.cs @@ -0,0 +1,89 @@ +// 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 more information. + +using System; +using System.Reactive.Concurrency; +using System.Reactive.Disposables; +using Xunit; + +namespace ReactiveUI.Tests +{ + public class WaitForDispatcherSchedulerTests + { + [Fact] + public void CallSchedulerFactoryOnCreation() + { + var schedulerFactoryCalls = 0; + var schedulerFactory = new Func(() => { schedulerFactoryCalls++; return null; }); + + var sut = new WaitForDispatcherScheduler(schedulerFactory); + + Assert.Equal(1, schedulerFactoryCalls); + } + + [Fact] + public void FactoryThrowsException_ReCallsOnSchedule() + { + var schedulerFactoryCalls = 0; + var schedulerFactory = new Func(() => { + schedulerFactoryCalls++; + throw new InvalidOperationException(); + }); + + var sut = new WaitForDispatcherScheduler(schedulerFactory); + sut.Schedule(() => { }); + + Assert.Equal(2, schedulerFactoryCalls); + } + + [Fact] + public void SuccessfulFactory_UsesCachedScheduler() + { + var schedulerFactoryCalls = 0; + var schedulerFactory = new Func(() => { + schedulerFactoryCalls++; + return CurrentThreadScheduler.Instance; + }); + + var sut = new WaitForDispatcherScheduler(schedulerFactory); + sut.Schedule(() => { }); + + Assert.Equal(1, schedulerFactoryCalls); + } + + [Fact] + public void FactoryThrowsInvalidOperationException_FallsBackToCurrentThread() + { + IScheduler schedulerExecutedOn = null; + var schedulerFactory = new Func(() => { + throw new InvalidOperationException(); + }); + + var sut = new WaitForDispatcherScheduler(schedulerFactory); + sut.Schedule(null, (scheduler, state) => { + schedulerExecutedOn = scheduler; + return Disposable.Empty; + }); + + Assert.Equal(CurrentThreadScheduler.Instance, schedulerExecutedOn); + } + + [Fact] + public void FactoryThrowsArgumentNullException_FallsBackToCurrentThread() + { + IScheduler schedulerExecutedOn = null; + var schedulerFactory = new Func(() => { + throw new ArgumentNullException(); + }); + + var sut = new WaitForDispatcherScheduler(schedulerFactory); + sut.Schedule(null, (scheduler, state) => { + schedulerExecutedOn = scheduler; + return Disposable.Empty; + }); + + Assert.Equal(CurrentThreadScheduler.Instance, schedulerExecutedOn); + } + } +} \ No newline at end of file diff --git a/src/ReactiveUI.Tests/WeakEventManagerTest.cs b/src/ReactiveUI.Tests/WeakEventManagerTest.cs index 529cb31ff9..f129fc08bc 100755 --- a/src/ReactiveUI.Tests/WeakEventManagerTest.cs +++ b/src/ReactiveUI.Tests/WeakEventManagerTest.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Winforms/ActivationForViewFetcher.cs b/src/ReactiveUI.Winforms/ActivationForViewFetcher.cs index 0a5839d8ec..5af93bdf01 100644 --- a/src/ReactiveUI.Winforms/ActivationForViewFetcher.cs +++ b/src/ReactiveUI.Winforms/ActivationForViewFetcher.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Winforms/CreatesCommandBinding.cs b/src/ReactiveUI.Winforms/CreatesCommandBinding.cs old mode 100644 new mode 100755 index f47d183a65..b925fbaaf4 --- a/src/ReactiveUI.Winforms/CreatesCommandBinding.cs +++ b/src/ReactiveUI.Winforms/CreatesCommandBinding.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Winforms/ObservableCollectionChangedToListChangedTransformer.cs b/src/ReactiveUI.Winforms/ObservableCollectionChangedToListChangedTransformer.cs index 8d6d184562..a086ee0c31 100644 --- a/src/ReactiveUI.Winforms/ObservableCollectionChangedToListChangedTransformer.cs +++ b/src/ReactiveUI.Winforms/ObservableCollectionChangedToListChangedTransformer.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Collections.Generic; diff --git a/src/ReactiveUI.Winforms/PlatformOperations.cs b/src/ReactiveUI.Winforms/PlatformOperations.cs index 729b684374..60e8f84962 100644 --- a/src/ReactiveUI.Winforms/PlatformOperations.cs +++ b/src/ReactiveUI.Winforms/PlatformOperations.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Winforms/ReactiveBindingList.cs b/src/ReactiveUI.Winforms/ReactiveBindingList.cs index 3c3647e06c..7795fe9759 100644 --- a/src/ReactiveUI.Winforms/ReactiveBindingList.cs +++ b/src/ReactiveUI.Winforms/ReactiveBindingList.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Winforms/ReactiveDerivedBindingListMixins.cs b/src/ReactiveUI.Winforms/ReactiveDerivedBindingListMixins.cs index ca2ace5631..f0328b030d 100644 --- a/src/ReactiveUI.Winforms/ReactiveDerivedBindingListMixins.cs +++ b/src/ReactiveUI.Winforms/ReactiveDerivedBindingListMixins.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Winforms/ReactiveUI.Winforms.csproj b/src/ReactiveUI.Winforms/ReactiveUI.Winforms.csproj index 2795303183..7e780231ac 100644 --- a/src/ReactiveUI.Winforms/ReactiveUI.Winforms.csproj +++ b/src/ReactiveUI.Winforms/ReactiveUI.Winforms.csproj @@ -1,4 +1,4 @@ - + net461 @@ -6,6 +6,7 @@ ReactiveUI.Winforms Windows Forms specific extensions to ReactiveUI ReactiveUI.WinForms + true @@ -30,6 +31,4 @@ UserControl - - \ No newline at end of file diff --git a/src/ReactiveUI.Winforms/ReactiveUI.Winforms.licenseheader b/src/ReactiveUI.Winforms/ReactiveUI.Winforms.licenseheader index b951ef8147..4dc04bc065 100644 --- a/src/ReactiveUI.Winforms/ReactiveUI.Winforms.licenseheader +++ b/src/ReactiveUI.Winforms/ReactiveUI.Winforms.licenseheader @@ -1,12 +1,12 @@ extensions: designer.cs generated.cs extensions: .cs .cpp .h // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. extensions: .xml .config .xsd diff --git a/src/ReactiveUI.Winforms/Registrations.cs b/src/ReactiveUI.Winforms/Registrations.cs index 22a7bdcdad..ed1d61a2e1 100644 --- a/src/ReactiveUI.Winforms/Registrations.cs +++ b/src/ReactiveUI.Winforms/Registrations.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using Splat; diff --git a/src/ReactiveUI.Winforms/RoutedViewHost.cs b/src/ReactiveUI.Winforms/RoutedViewHost.cs index 7f61b21bcb..31ba6716ab 100644 --- a/src/ReactiveUI.Winforms/RoutedViewHost.cs +++ b/src/ReactiveUI.Winforms/RoutedViewHost.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Winforms/ViewModelViewHost.cs b/src/ReactiveUI.Winforms/ViewModelViewHost.cs index 24f4af9d64..c932d9bf24 100644 --- a/src/ReactiveUI.Winforms/ViewModelViewHost.cs +++ b/src/ReactiveUI.Winforms/ViewModelViewHost.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Winforms/WeakEventManagerShims.cs b/src/ReactiveUI.Winforms/WeakEventManagerShims.cs index 85e304ad75..7e0987b78e 100644 --- a/src/ReactiveUI.Winforms/WeakEventManagerShims.cs +++ b/src/ReactiveUI.Winforms/WeakEventManagerShims.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Winforms/WinformsCreatesObservableForProperty.cs b/src/ReactiveUI.Winforms/WinformsCreatesObservableForProperty.cs index 0688791832..079ebcb8b9 100644 --- a/src/ReactiveUI.Winforms/WinformsCreatesObservableForProperty.cs +++ b/src/ReactiveUI.Winforms/WinformsCreatesObservableForProperty.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Wpf/Attributes.cs b/src/ReactiveUI.Wpf/Attributes.cs index 5ebf548d06..b0ec4056cc 100644 --- a/src/ReactiveUI.Wpf/Attributes.cs +++ b/src/ReactiveUI.Wpf/Attributes.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Windows; diff --git a/src/ReactiveUI.Wpf/ReactiveUI.Wpf.csproj b/src/ReactiveUI.Wpf/ReactiveUI.Wpf.csproj index 5ed8055301..8d59d629fd 100644 --- a/src/ReactiveUI.Wpf/ReactiveUI.Wpf.csproj +++ b/src/ReactiveUI.Wpf/ReactiveUI.Wpf.csproj @@ -1,12 +1,11 @@ - + <_SdkLanguageName>CSharp + true - - - net461 + net461 WPF specific extensions to ReactiveUI ReactiveUI.WPF @@ -15,8 +14,4 @@ - - - - - \ No newline at end of file + diff --git a/src/ReactiveUI.Wpf/ReactiveUI.Wpf.licenseheader b/src/ReactiveUI.Wpf/ReactiveUI.Wpf.licenseheader index b951ef8147..4dc04bc065 100644 --- a/src/ReactiveUI.Wpf/ReactiveUI.Wpf.licenseheader +++ b/src/ReactiveUI.Wpf/ReactiveUI.Wpf.licenseheader @@ -1,12 +1,12 @@ extensions: designer.cs generated.cs extensions: .cs .cpp .h // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. extensions: .xml .config .xsd diff --git a/src/ReactiveUI.Wpf/Registrations.cs b/src/ReactiveUI.Wpf/Registrations.cs index 6dee7aa59c..2867b3522a 100644 --- a/src/ReactiveUI.Wpf/Registrations.cs +++ b/src/ReactiveUI.Wpf/Registrations.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Wpf/TransitioningContentControl.cs b/src/ReactiveUI.Wpf/TransitioningContentControl.cs index 196fd14d43..a238ecbdb0 100644 --- a/src/ReactiveUI.Wpf/TransitioningContentControl.cs +++ b/src/ReactiveUI.Wpf/TransitioningContentControl.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Wpf/WpfAutoSuspendHelper.cs b/src/ReactiveUI.Wpf/WpfAutoSuspendHelper.cs index 88b620c086..f1f6c12a47 100644 --- a/src/ReactiveUI.Wpf/WpfAutoSuspendHelper.cs +++ b/src/ReactiveUI.Wpf/WpfAutoSuspendHelper.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.Wpf/WpfDependencyObjectObservableForProperty.cs b/src/ReactiveUI.Wpf/WpfDependencyObjectObservableForProperty.cs index 8bbb73e413..eec30926f9 100644 --- a/src/ReactiveUI.Wpf/WpfDependencyObjectObservableForProperty.cs +++ b/src/ReactiveUI.Wpf/WpfDependencyObjectObservableForProperty.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.XamForms/ActivationForViewFetcher.cs b/src/ReactiveUI.XamForms/ActivationForViewFetcher.cs index c8665a5385..9ba75ecc21 100644 --- a/src/ReactiveUI.XamForms/ActivationForViewFetcher.cs +++ b/src/ReactiveUI.XamForms/ActivationForViewFetcher.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.XamForms/ReactiveCarouselPage.cs b/src/ReactiveUI.XamForms/ReactiveCarouselPage.cs index e839ea0b59..04fd39898f 100644 --- a/src/ReactiveUI.XamForms/ReactiveCarouselPage.cs +++ b/src/ReactiveUI.XamForms/ReactiveCarouselPage.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.XamForms/ReactiveContentPage.cs b/src/ReactiveUI.XamForms/ReactiveContentPage.cs index bf37287b8c..02f705634c 100644 --- a/src/ReactiveUI.XamForms/ReactiveContentPage.cs +++ b/src/ReactiveUI.XamForms/ReactiveContentPage.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.XamForms/ReactiveContentView.cs b/src/ReactiveUI.XamForms/ReactiveContentView.cs index bd5df57f59..4d2a8b98fc 100644 --- a/src/ReactiveUI.XamForms/ReactiveContentView.cs +++ b/src/ReactiveUI.XamForms/ReactiveContentView.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.XamForms/ReactiveEntryCell.cs b/src/ReactiveUI.XamForms/ReactiveEntryCell.cs index 7817ba6bfa..e09e135d0a 100644 --- a/src/ReactiveUI.XamForms/ReactiveEntryCell.cs +++ b/src/ReactiveUI.XamForms/ReactiveEntryCell.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using ReactiveUI; diff --git a/src/ReactiveUI.XamForms/ReactiveImageCell.cs b/src/ReactiveUI.XamForms/ReactiveImageCell.cs index 470c790321..731fd9c6a2 100644 --- a/src/ReactiveUI.XamForms/ReactiveImageCell.cs +++ b/src/ReactiveUI.XamForms/ReactiveImageCell.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using ReactiveUI; diff --git a/src/ReactiveUI.XamForms/ReactiveMasterDetailPage.cs b/src/ReactiveUI.XamForms/ReactiveMasterDetailPage.cs index f7442c1143..5c556ad9ce 100644 --- a/src/ReactiveUI.XamForms/ReactiveMasterDetailPage.cs +++ b/src/ReactiveUI.XamForms/ReactiveMasterDetailPage.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.XamForms/ReactiveMultiPage.cs b/src/ReactiveUI.XamForms/ReactiveMultiPage.cs index 8a7c7ab4fc..f0eca8af7b 100644 --- a/src/ReactiveUI.XamForms/ReactiveMultiPage.cs +++ b/src/ReactiveUI.XamForms/ReactiveMultiPage.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.XamForms/ReactiveNavigationPage.cs b/src/ReactiveUI.XamForms/ReactiveNavigationPage.cs index d348b1908f..831888d4d3 100644 --- a/src/ReactiveUI.XamForms/ReactiveNavigationPage.cs +++ b/src/ReactiveUI.XamForms/ReactiveNavigationPage.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.XamForms/ReactiveSwitchCell.cs b/src/ReactiveUI.XamForms/ReactiveSwitchCell.cs index 8790f683b4..6c51d34cee 100644 --- a/src/ReactiveUI.XamForms/ReactiveSwitchCell.cs +++ b/src/ReactiveUI.XamForms/ReactiveSwitchCell.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using ReactiveUI; diff --git a/src/ReactiveUI.XamForms/ReactiveTabbedPage.cs b/src/ReactiveUI.XamForms/ReactiveTabbedPage.cs index 4cd77e443e..60ca218b1d 100644 --- a/src/ReactiveUI.XamForms/ReactiveTabbedPage.cs +++ b/src/ReactiveUI.XamForms/ReactiveTabbedPage.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.XamForms/ReactiveTextCell.cs b/src/ReactiveUI.XamForms/ReactiveTextCell.cs index d4748b527e..0eb23c86db 100644 --- a/src/ReactiveUI.XamForms/ReactiveTextCell.cs +++ b/src/ReactiveUI.XamForms/ReactiveTextCell.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using ReactiveUI; diff --git a/src/ReactiveUI.XamForms/ReactiveUI.XamForms.csproj b/src/ReactiveUI.XamForms/ReactiveUI.XamForms.csproj index 7e0b3bb4e2..2d07d13731 100644 --- a/src/ReactiveUI.XamForms/ReactiveUI.XamForms.csproj +++ b/src/ReactiveUI.XamForms/ReactiveUI.XamForms.csproj @@ -1,5 +1,4 @@ - - + netstandard2.0 Xamarin Forms specific extensions to ReactiveUI @@ -7,12 +6,10 @@ - + - - \ No newline at end of file diff --git a/src/ReactiveUI.XamForms/ReactiveUI.XamForms.licenseheader b/src/ReactiveUI.XamForms/ReactiveUI.XamForms.licenseheader index b951ef8147..4dc04bc065 100644 --- a/src/ReactiveUI.XamForms/ReactiveUI.XamForms.licenseheader +++ b/src/ReactiveUI.XamForms/ReactiveUI.XamForms.licenseheader @@ -1,12 +1,12 @@ extensions: designer.cs generated.cs extensions: .cs .cpp .h // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. extensions: .xml .config .xsd diff --git a/src/ReactiveUI.XamForms/ReactiveViewCell.cs b/src/ReactiveUI.XamForms/ReactiveViewCell.cs index 659122b545..4d0518b925 100644 --- a/src/ReactiveUI.XamForms/ReactiveViewCell.cs +++ b/src/ReactiveUI.XamForms/ReactiveViewCell.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using ReactiveUI; diff --git a/src/ReactiveUI.XamForms/Registrations.cs b/src/ReactiveUI.XamForms/Registrations.cs index e15016a052..d11526f4e2 100644 --- a/src/ReactiveUI.XamForms/Registrations.cs +++ b/src/ReactiveUI.XamForms/Registrations.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.XamForms/RoutedViewHost.cs b/src/ReactiveUI.XamForms/RoutedViewHost.cs index 311a2ba7fd..27b8ec0d91 100644 --- a/src/ReactiveUI.XamForms/RoutedViewHost.cs +++ b/src/ReactiveUI.XamForms/RoutedViewHost.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI.XamForms/ViewModelViewHost.cs b/src/ReactiveUI.XamForms/ViewModelViewHost.cs index 267ef51ed7..c238d26e81 100644 --- a/src/ReactiveUI.XamForms/ViewModelViewHost.cs +++ b/src/ReactiveUI.XamForms/ViewModelViewHost.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Activation/CanActivateViewFetcher.cs b/src/ReactiveUI/Activation/CanActivateViewFetcher.cs index 6828ac3701..7921d314a5 100644 --- a/src/ReactiveUI/Activation/CanActivateViewFetcher.cs +++ b/src/ReactiveUI/Activation/CanActivateViewFetcher.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Activation/IActivationForViewFetcher.cs b/src/ReactiveUI/Activation/IActivationForViewFetcher.cs index 51a9d88269..3e9653d281 100644 --- a/src/ReactiveUI/Activation/IActivationForViewFetcher.cs +++ b/src/ReactiveUI/Activation/IActivationForViewFetcher.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Activation/ViewForMixins.cs b/src/ReactiveUI/Activation/ViewForMixins.cs index b48be2a84c..ae76414072 100644 --- a/src/ReactiveUI/Activation/ViewForMixins.cs +++ b/src/ReactiveUI/Activation/ViewForMixins.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Activation/ViewModelActivator.cs b/src/ReactiveUI/Activation/ViewModelActivator.cs index 0ce76a1c57..1f6599f6b4 100644 --- a/src/ReactiveUI/Activation/ViewModelActivator.cs +++ b/src/ReactiveUI/Activation/ViewModelActivator.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/AutoPersistHelper.cs b/src/ReactiveUI/AutoPersistHelper.cs index e50d799761..67e8c9f0a6 100644 --- a/src/ReactiveUI/AutoPersistHelper.cs +++ b/src/ReactiveUI/AutoPersistHelper.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/BindingTypeConverters.cs b/src/ReactiveUI/BindingTypeConverters.cs index 416d1feece..5c026c9da3 100644 --- a/src/ReactiveUI/BindingTypeConverters.cs +++ b/src/ReactiveUI/BindingTypeConverters.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/CollectionDebugView.cs b/src/ReactiveUI/CollectionDebugView.cs index 0ca226071c..5976e13323 100644 --- a/src/ReactiveUI/CollectionDebugView.cs +++ b/src/ReactiveUI/CollectionDebugView.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/CommandBinding.cs b/src/ReactiveUI/CommandBinding.cs index d95366738e..d5a2b8e80d 100755 --- a/src/ReactiveUI/CommandBinding.cs +++ b/src/ReactiveUI/CommandBinding.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/CompatMixins.cs b/src/ReactiveUI/CompatMixins.cs index f1372fec0d..49f054be50 100644 --- a/src/ReactiveUI/CompatMixins.cs +++ b/src/ReactiveUI/CompatMixins.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/ContractStubs.cs b/src/ReactiveUI/ContractStubs.cs index 29b9dc1be0..5a4475f1a0 100644 --- a/src/ReactiveUI/ContractStubs.cs +++ b/src/ReactiveUI/ContractStubs.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/CreatesCommandBinding.cs b/src/ReactiveUI/CreatesCommandBinding.cs index d4455fddc4..d2b560e5ec 100755 --- a/src/ReactiveUI/CreatesCommandBinding.cs +++ b/src/ReactiveUI/CreatesCommandBinding.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/DisposableMixins.cs b/src/ReactiveUI/DisposableMixins.cs index 11405f73dc..296a89f119 100644 --- a/src/ReactiveUI/DisposableMixins.cs +++ b/src/ReactiveUI/DisposableMixins.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. namespace System.Reactive.Disposables diff --git a/src/ReactiveUI/ExpressionMixins.cs b/src/ReactiveUI/ExpressionMixins.cs index c870de26cd..c129c38820 100644 --- a/src/ReactiveUI/ExpressionMixins.cs +++ b/src/ReactiveUI/ExpressionMixins.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/ExpressionRewriter.cs b/src/ReactiveUI/ExpressionRewriter.cs index d379a1f3e2..35215bc3b9 100644 --- a/src/ReactiveUI/ExpressionRewriter.cs +++ b/src/ReactiveUI/ExpressionRewriter.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/IDependencyResolver.cs b/src/ReactiveUI/IDependencyResolver.cs index 1245cb5fbe..90edf01589 100644 --- a/src/ReactiveUI/IDependencyResolver.cs +++ b/src/ReactiveUI/IDependencyResolver.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; @@ -30,7 +30,7 @@ public static void InitializeReactiveUI(this IMutableDependencyResolver resolver (new Registrations()).Register((f,t) => resolver.RegisterConstant(f(), t)); (new PlatformRegistrations()).Register((f,t) => resolver.RegisterConstant(f(), t)); - var fdr = typeof(ModernDependencyResolver); + var fdr = typeof(DependencyResolverMixins); var assmName = new AssemblyName( fdr.AssemblyQualifiedName.Replace(fdr.FullName + ", ", "")); diff --git a/src/ReactiveUI/INPCObservableForProperty.cs b/src/ReactiveUI/INPCObservableForProperty.cs index c82d7a7712..6fb416c185 100644 --- a/src/ReactiveUI/INPCObservableForProperty.cs +++ b/src/ReactiveUI/INPCObservableForProperty.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/IROObservableForProperty.cs b/src/ReactiveUI/IROObservableForProperty.cs index f8bcfd97fd..dbf662c6ac 100644 --- a/src/ReactiveUI/IROObservableForProperty.cs +++ b/src/ReactiveUI/IROObservableForProperty.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/IReactiveObject.cs b/src/ReactiveUI/IReactiveObject.cs index ddf187552f..cf2c9e3121 100644 --- a/src/ReactiveUI/IReactiveObject.cs +++ b/src/ReactiveUI/IReactiveObject.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Interactions.cs b/src/ReactiveUI/Interactions.cs index 7f9871c5e6..0076ca5bcb 100755 --- a/src/ReactiveUI/Interactions.cs +++ b/src/ReactiveUI/Interactions.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Interfaces.cs b/src/ReactiveUI/Interfaces.cs index 85c8d203ed..5d3469e5bd 100755 --- a/src/ReactiveUI/Interfaces.cs +++ b/src/ReactiveUI/Interfaces.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/LoggingMixins.cs b/src/ReactiveUI/LoggingMixins.cs index cf1f413eda..65b7a24f86 100644 --- a/src/ReactiveUI/LoggingMixins.cs +++ b/src/ReactiveUI/LoggingMixins.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/MessageBus.cs b/src/ReactiveUI/MessageBus.cs index 23c4792e57..8b0bed5d4e 100644 --- a/src/ReactiveUI/MessageBus.cs +++ b/src/ReactiveUI/MessageBus.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/ObservableAsPropertyHelper.cs b/src/ReactiveUI/ObservableAsPropertyHelper.cs index 6ffae676f2..7bdd2ebad9 100755 --- a/src/ReactiveUI/ObservableAsPropertyHelper.cs +++ b/src/ReactiveUI/ObservableAsPropertyHelper.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Observables.cs b/src/ReactiveUI/Observables.cs index 3c606bcd65..2092e05911 100644 --- a/src/ReactiveUI/Observables.cs +++ b/src/ReactiveUI/Observables.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. namespace System.Reactive.Linq diff --git a/src/ReactiveUI/ObservedChangedMixin.cs b/src/ReactiveUI/ObservedChangedMixin.cs index 3d4da293ce..1c4a472577 100644 --- a/src/ReactiveUI/ObservedChangedMixin.cs +++ b/src/ReactiveUI/ObservedChangedMixin.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/OrderedComparer.cs b/src/ReactiveUI/OrderedComparer.cs index 77f10b569a..2b5dc089c8 100644 --- a/src/ReactiveUI/OrderedComparer.cs +++ b/src/ReactiveUI/OrderedComparer.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/POCOObservableForProperty.cs b/src/ReactiveUI/POCOObservableForProperty.cs index edeb2ef85f..a124fb96dc 100644 --- a/src/ReactiveUI/POCOObservableForProperty.cs +++ b/src/ReactiveUI/POCOObservableForProperty.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/android/AndroidCommandBinders.cs b/src/ReactiveUI/Platforms/android/AndroidCommandBinders.cs index fcf84d7b05..a4f392d480 100644 --- a/src/ReactiveUI/Platforms/android/AndroidCommandBinders.cs +++ b/src/ReactiveUI/Platforms/android/AndroidCommandBinders.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/android/AndroidObservableForWidgets.cs b/src/ReactiveUI/Platforms/android/AndroidObservableForWidgets.cs index a9c39642cc..bb427d9b62 100644 --- a/src/ReactiveUI/Platforms/android/AndroidObservableForWidgets.cs +++ b/src/ReactiveUI/Platforms/android/AndroidObservableForWidgets.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/android/AndroidUIScheduler.cs b/src/ReactiveUI/Platforms/android/AndroidUIScheduler.cs index f4ae2dc71d..dea6c2c45d 100644 --- a/src/ReactiveUI/Platforms/android/AndroidUIScheduler.cs +++ b/src/ReactiveUI/Platforms/android/AndroidUIScheduler.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/android/AutoSuspendHelper.cs b/src/ReactiveUI/Platforms/android/AutoSuspendHelper.cs index 4c2a1ad89d..9112bd32d7 100644 --- a/src/ReactiveUI/Platforms/android/AutoSuspendHelper.cs +++ b/src/ReactiveUI/Platforms/android/AutoSuspendHelper.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/android/BundleSuspensionDriver.cs b/src/ReactiveUI/Platforms/android/BundleSuspensionDriver.cs index 37c8daeb87..5e1582bfc5 100644 --- a/src/ReactiveUI/Platforms/android/BundleSuspensionDriver.cs +++ b/src/ReactiveUI/Platforms/android/BundleSuspensionDriver.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/android/ContextExtensions.cs b/src/ReactiveUI/Platforms/android/ContextExtensions.cs index 0f43391fd7..087a0f2c60 100644 --- a/src/ReactiveUI/Platforms/android/ContextExtensions.cs +++ b/src/ReactiveUI/Platforms/android/ContextExtensions.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/android/ControlFetcherMixin.cs b/src/ReactiveUI/Platforms/android/ControlFetcherMixin.cs index c2ee36d4c7..c352dbc573 100644 --- a/src/ReactiveUI/Platforms/android/ControlFetcherMixin.cs +++ b/src/ReactiveUI/Platforms/android/ControlFetcherMixin.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/android/FlexibleCommandBinder.cs b/src/ReactiveUI/Platforms/android/FlexibleCommandBinder.cs index 723dc68f9f..082ab4ca90 100644 --- a/src/ReactiveUI/Platforms/android/FlexibleCommandBinder.cs +++ b/src/ReactiveUI/Platforms/android/FlexibleCommandBinder.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/android/LayoutViewHost.cs b/src/ReactiveUI/Platforms/android/LayoutViewHost.cs index 589e3607de..2ebd3e2c65 100644 --- a/src/ReactiveUI/Platforms/android/LayoutViewHost.cs +++ b/src/ReactiveUI/Platforms/android/LayoutViewHost.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/android/LinkerOverrides.cs b/src/ReactiveUI/Platforms/android/LinkerOverrides.cs index e6578eaec8..4090f1ce9a 100644 --- a/src/ReactiveUI/Platforms/android/LinkerOverrides.cs +++ b/src/ReactiveUI/Platforms/android/LinkerOverrides.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/android/ObjectExtension.cs b/src/ReactiveUI/Platforms/android/ObjectExtension.cs index 68357ad369..db90de149c 100644 --- a/src/ReactiveUI/Platforms/android/ObjectExtension.cs +++ b/src/ReactiveUI/Platforms/android/ObjectExtension.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/android/PlatformOperations.cs b/src/ReactiveUI/Platforms/android/PlatformOperations.cs index 58f61a532a..d90052a2a2 100644 --- a/src/ReactiveUI/Platforms/android/PlatformOperations.cs +++ b/src/ReactiveUI/Platforms/android/PlatformOperations.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/android/PlatformRegistrations.cs b/src/ReactiveUI/Platforms/android/PlatformRegistrations.cs index 03136b7ed7..3306512a7e 100644 --- a/src/ReactiveUI/Platforms/android/PlatformRegistrations.cs +++ b/src/ReactiveUI/Platforms/android/PlatformRegistrations.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/android/ReactiveActivity.cs b/src/ReactiveUI/Platforms/android/ReactiveActivity.cs index 3c984f7d69..44e1c0f10d 100644 --- a/src/ReactiveUI/Platforms/android/ReactiveActivity.cs +++ b/src/ReactiveUI/Platforms/android/ReactiveActivity.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/android/ReactiveFragment.cs b/src/ReactiveUI/Platforms/android/ReactiveFragment.cs index 1c85a9bd94..4138aff9fe 100644 --- a/src/ReactiveUI/Platforms/android/ReactiveFragment.cs +++ b/src/ReactiveUI/Platforms/android/ReactiveFragment.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/android/ReactiveListAdapter.cs b/src/ReactiveUI/Platforms/android/ReactiveListAdapter.cs index 13550f8248..b8b5b3996b 100644 --- a/src/ReactiveUI/Platforms/android/ReactiveListAdapter.cs +++ b/src/ReactiveUI/Platforms/android/ReactiveListAdapter.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/android/ReactivePreferenceActivity.cs b/src/ReactiveUI/Platforms/android/ReactivePreferenceActivity.cs index ce4e284f31..c28fd34d55 100644 --- a/src/ReactiveUI/Platforms/android/ReactivePreferenceActivity.cs +++ b/src/ReactiveUI/Platforms/android/ReactivePreferenceActivity.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/android/ReactivePreferenceFragment.cs b/src/ReactiveUI/Platforms/android/ReactivePreferenceFragment.cs index 75a36742fe..2d8222ac17 100644 --- a/src/ReactiveUI/Platforms/android/ReactivePreferenceFragment.cs +++ b/src/ReactiveUI/Platforms/android/ReactivePreferenceFragment.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/android/SharedPreferencesExtensions.cs b/src/ReactiveUI/Platforms/android/SharedPreferencesExtensions.cs index 41ac381175..a9e4aae75d 100644 --- a/src/ReactiveUI/Platforms/android/SharedPreferencesExtensions.cs +++ b/src/ReactiveUI/Platforms/android/SharedPreferencesExtensions.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/android/UsbManagerExtensions.cs b/src/ReactiveUI/Platforms/android/UsbManagerExtensions.cs index 0784d91896..2182f3e5b4 100644 --- a/src/ReactiveUI/Platforms/android/UsbManagerExtensions.cs +++ b/src/ReactiveUI/Platforms/android/UsbManagerExtensions.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/android/ViewCommandExtensions.cs b/src/ReactiveUI/Platforms/android/ViewCommandExtensions.cs index c06bd6eadd..4fd2adff79 100644 --- a/src/ReactiveUI/Platforms/android/ViewCommandExtensions.cs +++ b/src/ReactiveUI/Platforms/android/ViewCommandExtensions.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/apple-common/AutoLayoutViewModelViewHost.cs b/src/ReactiveUI/Platforms/apple-common/AutoLayoutViewModelViewHost.cs index 4a22f501df..c313b10684 100644 --- a/src/ReactiveUI/Platforms/apple-common/AutoLayoutViewModelViewHost.cs +++ b/src/ReactiveUI/Platforms/apple-common/AutoLayoutViewModelViewHost.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/apple-common/Buildsupport/Linker.xml b/src/ReactiveUI/Platforms/apple-common/Buildsupport/Linker.xml index 1f0b35a934..39b1e00d5e 100644 --- a/src/ReactiveUI/Platforms/apple-common/Buildsupport/Linker.xml +++ b/src/ReactiveUI/Platforms/apple-common/Buildsupport/Linker.xml @@ -1,7 +1,7 @@ diff --git a/src/ReactiveUI/Platforms/apple-common/Converters/DateTimeToNSDateConverter.cs b/src/ReactiveUI/Platforms/apple-common/Converters/DateTimeToNSDateConverter.cs index b9dbaea1a5..96b2d050a5 100644 --- a/src/ReactiveUI/Platforms/apple-common/Converters/DateTimeToNSDateConverter.cs +++ b/src/ReactiveUI/Platforms/apple-common/Converters/DateTimeToNSDateConverter.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/apple-common/IndexNormalizer.cs b/src/ReactiveUI/Platforms/apple-common/IndexNormalizer.cs index 7fcc725000..3e8d74aa1c 100644 --- a/src/ReactiveUI/Platforms/apple-common/IndexNormalizer.cs +++ b/src/ReactiveUI/Platforms/apple-common/IndexNormalizer.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. namespace ReactiveUI diff --git a/src/ReactiveUI/Platforms/apple-common/JsonSuspensionDriver.cs b/src/ReactiveUI/Platforms/apple-common/JsonSuspensionDriver.cs index ffb0cb01a6..8775a7938b 100644 --- a/src/ReactiveUI/Platforms/apple-common/JsonSuspensionDriver.cs +++ b/src/ReactiveUI/Platforms/apple-common/JsonSuspensionDriver.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/apple-common/KVOObservableForProperty.cs b/src/ReactiveUI/Platforms/apple-common/KVOObservableForProperty.cs index 7b01017d15..86c96364b4 100644 --- a/src/ReactiveUI/Platforms/apple-common/KVOObservableForProperty.cs +++ b/src/ReactiveUI/Platforms/apple-common/KVOObservableForProperty.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/apple-common/NSRunloopScheduler.cs b/src/ReactiveUI/Platforms/apple-common/NSRunloopScheduler.cs index 9eb89dc2f9..a7f3f3bdb0 100644 --- a/src/ReactiveUI/Platforms/apple-common/NSRunloopScheduler.cs +++ b/src/ReactiveUI/Platforms/apple-common/NSRunloopScheduler.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/apple-common/ObservableForPropertyBase.cs b/src/ReactiveUI/Platforms/apple-common/ObservableForPropertyBase.cs index 0f435a5d83..a5f618be64 100644 --- a/src/ReactiveUI/Platforms/apple-common/ObservableForPropertyBase.cs +++ b/src/ReactiveUI/Platforms/apple-common/ObservableForPropertyBase.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/apple-common/PlatformOperations.cs b/src/ReactiveUI/Platforms/apple-common/PlatformOperations.cs index d7f5cd786a..311fe8bd91 100644 --- a/src/ReactiveUI/Platforms/apple-common/PlatformOperations.cs +++ b/src/ReactiveUI/Platforms/apple-common/PlatformOperations.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. namespace ReactiveUI diff --git a/src/ReactiveUI/Platforms/apple-common/ReactiveControl.cs b/src/ReactiveUI/Platforms/apple-common/ReactiveControl.cs index 40603af8c2..cc2a7f7a45 100644 --- a/src/ReactiveUI/Platforms/apple-common/ReactiveControl.cs +++ b/src/ReactiveUI/Platforms/apple-common/ReactiveControl.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/apple-common/ReactiveImageView.cs b/src/ReactiveUI/Platforms/apple-common/ReactiveImageView.cs index 9e69d494b5..c3d790353a 100644 --- a/src/ReactiveUI/Platforms/apple-common/ReactiveImageView.cs +++ b/src/ReactiveUI/Platforms/apple-common/ReactiveImageView.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/apple-common/ReactiveNSView.cs b/src/ReactiveUI/Platforms/apple-common/ReactiveNSView.cs index 2e1a058eda..5cabaaafc7 100644 --- a/src/ReactiveUI/Platforms/apple-common/ReactiveNSView.cs +++ b/src/ReactiveUI/Platforms/apple-common/ReactiveNSView.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/apple-common/ReactiveNSViewController.cs b/src/ReactiveUI/Platforms/apple-common/ReactiveNSViewController.cs index 7fcd6de78a..948c52d32f 100644 --- a/src/ReactiveUI/Platforms/apple-common/ReactiveNSViewController.cs +++ b/src/ReactiveUI/Platforms/apple-common/ReactiveNSViewController.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/apple-common/ReactiveSplitViewController.cs b/src/ReactiveUI/Platforms/apple-common/ReactiveSplitViewController.cs index a1479f018f..24928db1eb 100644 --- a/src/ReactiveUI/Platforms/apple-common/ReactiveSplitViewController.cs +++ b/src/ReactiveUI/Platforms/apple-common/ReactiveSplitViewController.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/apple-common/TargetActionCommandBinder.cs b/src/ReactiveUI/Platforms/apple-common/TargetActionCommandBinder.cs index af3cb6a745..fa5bcd1fb6 100644 --- a/src/ReactiveUI/Platforms/apple-common/TargetActionCommandBinder.cs +++ b/src/ReactiveUI/Platforms/apple-common/TargetActionCommandBinder.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/apple-common/ViewModelViewHost.cs b/src/ReactiveUI/Platforms/apple-common/ViewModelViewHost.cs index 6dd46a5814..ac0648991a 100644 --- a/src/ReactiveUI/Platforms/apple-common/ViewModelViewHost.cs +++ b/src/ReactiveUI/Platforms/apple-common/ViewModelViewHost.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/ios/AutoSuspendHelper.cs b/src/ReactiveUI/Platforms/ios/AutoSuspendHelper.cs index ff17548e08..ab729bd2bc 100644 --- a/src/ReactiveUI/Platforms/ios/AutoSuspendHelper.cs +++ b/src/ReactiveUI/Platforms/ios/AutoSuspendHelper.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/ios/CommonReactiveSource.cs b/src/ReactiveUI/Platforms/ios/CommonReactiveSource.cs index 47fdb9b763..aee2104909 100644 --- a/src/ReactiveUI/Platforms/ios/CommonReactiveSource.cs +++ b/src/ReactiveUI/Platforms/ios/CommonReactiveSource.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/ios/FlexibleCommandBinder.cs b/src/ReactiveUI/Platforms/ios/FlexibleCommandBinder.cs index ce628c68ed..652c07f8eb 100644 --- a/src/ReactiveUI/Platforms/ios/FlexibleCommandBinder.cs +++ b/src/ReactiveUI/Platforms/ios/FlexibleCommandBinder.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/ios/LinkerOverrides.cs b/src/ReactiveUI/Platforms/ios/LinkerOverrides.cs index 397985edbc..45593a6005 100644 --- a/src/ReactiveUI/Platforms/ios/LinkerOverrides.cs +++ b/src/ReactiveUI/Platforms/ios/LinkerOverrides.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/ios/PlatformRegistrations.cs b/src/ReactiveUI/Platforms/ios/PlatformRegistrations.cs index 1e94c37622..2db654f2cd 100644 --- a/src/ReactiveUI/Platforms/ios/PlatformRegistrations.cs +++ b/src/ReactiveUI/Platforms/ios/PlatformRegistrations.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/ios/ReactiveCollectionReusableView.cs b/src/ReactiveUI/Platforms/ios/ReactiveCollectionReusableView.cs index 48c28f35e7..6f127e0549 100644 --- a/src/ReactiveUI/Platforms/ios/ReactiveCollectionReusableView.cs +++ b/src/ReactiveUI/Platforms/ios/ReactiveCollectionReusableView.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/ios/ReactiveCollectionView.cs b/src/ReactiveUI/Platforms/ios/ReactiveCollectionView.cs index e8c3656b7e..e5188e4f46 100644 --- a/src/ReactiveUI/Platforms/ios/ReactiveCollectionView.cs +++ b/src/ReactiveUI/Platforms/ios/ReactiveCollectionView.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/ios/ReactiveCollectionViewCell.cs b/src/ReactiveUI/Platforms/ios/ReactiveCollectionViewCell.cs index 3daf7e1165..9f1fd3185f 100644 --- a/src/ReactiveUI/Platforms/ios/ReactiveCollectionViewCell.cs +++ b/src/ReactiveUI/Platforms/ios/ReactiveCollectionViewCell.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/ios/ReactiveCollectionViewController.cs b/src/ReactiveUI/Platforms/ios/ReactiveCollectionViewController.cs index 8cda4904f1..329637411b 100644 --- a/src/ReactiveUI/Platforms/ios/ReactiveCollectionViewController.cs +++ b/src/ReactiveUI/Platforms/ios/ReactiveCollectionViewController.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/ios/ReactiveCollectionViewSource.cs b/src/ReactiveUI/Platforms/ios/ReactiveCollectionViewSource.cs index 24b19956d1..4b1981dadc 100644 --- a/src/ReactiveUI/Platforms/ios/ReactiveCollectionViewSource.cs +++ b/src/ReactiveUI/Platforms/ios/ReactiveCollectionViewSource.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/ios/ReactiveNavigationController.cs b/src/ReactiveUI/Platforms/ios/ReactiveNavigationController.cs index 338b9efd56..1b65949f52 100644 --- a/src/ReactiveUI/Platforms/ios/ReactiveNavigationController.cs +++ b/src/ReactiveUI/Platforms/ios/ReactiveNavigationController.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/ios/ReactivePageViewController.cs b/src/ReactiveUI/Platforms/ios/ReactivePageViewController.cs index 1073132f96..4a57a31c50 100644 --- a/src/ReactiveUI/Platforms/ios/ReactivePageViewController.cs +++ b/src/ReactiveUI/Platforms/ios/ReactivePageViewController.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/ios/ReactiveTabBarController.cs b/src/ReactiveUI/Platforms/ios/ReactiveTabBarController.cs index bbae46b7d8..7ddd0dd0ec 100644 --- a/src/ReactiveUI/Platforms/ios/ReactiveTabBarController.cs +++ b/src/ReactiveUI/Platforms/ios/ReactiveTabBarController.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/ios/ReactiveTableView.cs b/src/ReactiveUI/Platforms/ios/ReactiveTableView.cs index e0409aeca6..4da63c89c9 100644 --- a/src/ReactiveUI/Platforms/ios/ReactiveTableView.cs +++ b/src/ReactiveUI/Platforms/ios/ReactiveTableView.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/ios/ReactiveTableViewCell.cs b/src/ReactiveUI/Platforms/ios/ReactiveTableViewCell.cs index cade707c64..695e52fcb0 100644 --- a/src/ReactiveUI/Platforms/ios/ReactiveTableViewCell.cs +++ b/src/ReactiveUI/Platforms/ios/ReactiveTableViewCell.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/ios/ReactiveTableViewController.cs b/src/ReactiveUI/Platforms/ios/ReactiveTableViewController.cs index 71ea6b0a93..b4f90b28bf 100644 --- a/src/ReactiveUI/Platforms/ios/ReactiveTableViewController.cs +++ b/src/ReactiveUI/Platforms/ios/ReactiveTableViewController.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/ios/ReactiveTableViewSource.cs b/src/ReactiveUI/Platforms/ios/ReactiveTableViewSource.cs index dca8d46782..cbf0032dd8 100644 --- a/src/ReactiveUI/Platforms/ios/ReactiveTableViewSource.cs +++ b/src/ReactiveUI/Platforms/ios/ReactiveTableViewSource.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/ios/RoutedViewHost.cs b/src/ReactiveUI/Platforms/ios/RoutedViewHost.cs index c0cf3dc33b..b506a92790 100644 --- a/src/ReactiveUI/Platforms/ios/RoutedViewHost.cs +++ b/src/ReactiveUI/Platforms/ios/RoutedViewHost.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/ios/UIControlCommandExtensions.cs b/src/ReactiveUI/Platforms/ios/UIControlCommandExtensions.cs index 6a573ff7a6..ffb632a602 100644 --- a/src/ReactiveUI/Platforms/ios/UIControlCommandExtensions.cs +++ b/src/ReactiveUI/Platforms/ios/UIControlCommandExtensions.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/ios/UIKitCommandBinders.cs b/src/ReactiveUI/Platforms/ios/UIKitCommandBinders.cs index 0a528063b8..3190405a10 100644 --- a/src/ReactiveUI/Platforms/ios/UIKitCommandBinders.cs +++ b/src/ReactiveUI/Platforms/ios/UIKitCommandBinders.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/ios/UIKitObservableForProperty.cs b/src/ReactiveUI/Platforms/ios/UIKitObservableForProperty.cs index c26560708a..81cee64710 100644 --- a/src/ReactiveUI/Platforms/ios/UIKitObservableForProperty.cs +++ b/src/ReactiveUI/Platforms/ios/UIKitObservableForProperty.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/mac/AppKitAutoSuspendHelper.cs b/src/ReactiveUI/Platforms/mac/AppKitAutoSuspendHelper.cs index 906e2c04a0..67f5bafe75 100644 --- a/src/ReactiveUI/Platforms/mac/AppKitAutoSuspendHelper.cs +++ b/src/ReactiveUI/Platforms/mac/AppKitAutoSuspendHelper.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/mac/AppKitObservableForProperty.cs b/src/ReactiveUI/Platforms/mac/AppKitObservableForProperty.cs index 57752cb157..ef4c8ed267 100644 --- a/src/ReactiveUI/Platforms/mac/AppKitObservableForProperty.cs +++ b/src/ReactiveUI/Platforms/mac/AppKitObservableForProperty.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/mac/PlatformRegistrations.cs b/src/ReactiveUI/Platforms/mac/PlatformRegistrations.cs index 0801f9adcb..a5fdbfcd39 100644 --- a/src/ReactiveUI/Platforms/mac/PlatformRegistrations.cs +++ b/src/ReactiveUI/Platforms/mac/PlatformRegistrations.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/mac/ReactiveNSWindowController.cs b/src/ReactiveUI/Platforms/mac/ReactiveNSWindowController.cs index de01b46603..b51a53b905 100644 --- a/src/ReactiveUI/Platforms/mac/ReactiveNSWindowController.cs +++ b/src/ReactiveUI/Platforms/mac/ReactiveNSWindowController.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/net461/ComponentModelTypeConverter.cs b/src/ReactiveUI/Platforms/net461/ComponentModelTypeConverter.cs index c4a06e3360..b19f16dc98 100644 --- a/src/ReactiveUI/Platforms/net461/ComponentModelTypeConverter.cs +++ b/src/ReactiveUI/Platforms/net461/ComponentModelTypeConverter.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/net461/PlatformRegistrations.cs b/src/ReactiveUI/Platforms/net461/PlatformRegistrations.cs index 77f9e7ab86..7e840ea570 100644 --- a/src/ReactiveUI/Platforms/net461/PlatformRegistrations.cs +++ b/src/ReactiveUI/Platforms/net461/PlatformRegistrations.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/netcoreapp2.0/PlatformRegistrations.cs b/src/ReactiveUI/Platforms/netcoreapp2.0/PlatformRegistrations.cs index 7ead8021c5..6f90906694 100644 --- a/src/ReactiveUI/Platforms/netcoreapp2.0/PlatformRegistrations.cs +++ b/src/ReactiveUI/Platforms/netcoreapp2.0/PlatformRegistrations.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/netstandard2.0/PlatformRegistrations.cs b/src/ReactiveUI/Platforms/netstandard2.0/PlatformRegistrations.cs index 150f0e97a1..8dc0115d32 100644 --- a/src/ReactiveUI/Platforms/netstandard2.0/PlatformRegistrations.cs +++ b/src/ReactiveUI/Platforms/netstandard2.0/PlatformRegistrations.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/tizen/EcoreMainloopScheduler.cs b/src/ReactiveUI/Platforms/tizen/EcoreMainloopScheduler.cs new file mode 100644 index 0000000000..9a01b3f5be --- /dev/null +++ b/src/ReactiveUI/Platforms/tizen/EcoreMainloopScheduler.cs @@ -0,0 +1,52 @@ +// 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 more information. + +using System; +using System.Reactive.Concurrency; +using System.Reactive.Disposables; +using ElmSharp; + +namespace ReactiveUI +{ + class EcoreMainloopScheduler : IScheduler + { + public static IScheduler MainThreadScheduler = new EcoreMainloopScheduler(); + + public DateTimeOffset Now => DateTimeOffset.Now; + + public IDisposable Schedule(TState state, Func action) + { + var innerDisp = new SingleAssignmentDisposable(); + EcoreMainloop.PostAndWakeUp(() => { + if (!innerDisp.IsDisposed) innerDisp.Disposable = action(this, state); + }); + return innerDisp; + } + + public IDisposable Schedule(TState state, TimeSpan dueTime, Func action) + { + var innerDisp = Disposable.Empty; + bool isCancelled = false; + + IntPtr timer = EcoreMainloop.AddTimer(dueTime.TotalSeconds, () => { + if (!isCancelled) innerDisp = action(this, state); + return false; + }); + + return Disposable.Create(() => { + isCancelled = true; + EcoreMainloop.RemoveTimer(timer); + innerDisp.Dispose(); + }); + } + + public IDisposable Schedule(TState state, DateTimeOffset dueTime, Func action) + { + if (dueTime <= Now) { + return Schedule(state, action); + } + return Schedule(state, dueTime - Now, action); + } + } +} diff --git a/src/ReactiveUI/Platforms/tizen/PlatformOperations.cs b/src/ReactiveUI/Platforms/tizen/PlatformOperations.cs new file mode 100644 index 0000000000..1eb60490ac --- /dev/null +++ b/src/ReactiveUI/Platforms/tizen/PlatformOperations.cs @@ -0,0 +1,17 @@ +// 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 more information. + +namespace ReactiveUI +{ + /// + /// Returns the current orientation of the device on tizen. + /// + public class PlatformOperations : IPlatformOperations + { + public string GetOrientation() + { + return null; + } + } +} diff --git a/src/ReactiveUI/Platforms/tizen/PlatformRegistrations.cs b/src/ReactiveUI/Platforms/tizen/PlatformRegistrations.cs new file mode 100644 index 0000000000..9167feae4f --- /dev/null +++ b/src/ReactiveUI/Platforms/tizen/PlatformRegistrations.cs @@ -0,0 +1,20 @@ +// 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 more information. + +using System; +using System.Reactive.Concurrency; + +namespace ReactiveUI +{ + public class PlatformRegistrations : IWantsToRegisterStuff + { + public void Register(Action, Type> registerFunction) + { + registerFunction(() => new PlatformOperations(), typeof(IPlatformOperations)); + registerFunction(() => new ComponentModelTypeConverter(), typeof(IBindingTypeConverter)); + RxApp.TaskpoolScheduler = TaskPoolScheduler.Default; + RxApp.MainThreadScheduler = EcoreMainloopScheduler.MainThreadScheduler; + } + } +} diff --git a/src/ReactiveUI/Platforms/uap10.0.16299/DependencyObjectObservableForProperty.cs b/src/ReactiveUI/Platforms/uap10.0.16299/DependencyObjectObservableForProperty.cs index 3ba9c0a71f..d1788f5f98 100644 --- a/src/ReactiveUI/Platforms/uap10.0.16299/DependencyObjectObservableForProperty.cs +++ b/src/ReactiveUI/Platforms/uap10.0.16299/DependencyObjectObservableForProperty.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using Splat; diff --git a/src/ReactiveUI/Platforms/uap10.0.16299/PlatformRegistrations.cs b/src/ReactiveUI/Platforms/uap10.0.16299/PlatformRegistrations.cs index 5067697651..ac7265c97e 100644 --- a/src/ReactiveUI/Platforms/uap10.0.16299/PlatformRegistrations.cs +++ b/src/ReactiveUI/Platforms/uap10.0.16299/PlatformRegistrations.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/uap10.0.16299/TransitioningContentControl.Empty.cs b/src/ReactiveUI/Platforms/uap10.0.16299/TransitioningContentControl.Empty.cs index 0a157b8eec..23f7d8a82a 100644 --- a/src/ReactiveUI/Platforms/uap10.0.16299/TransitioningContentControl.Empty.cs +++ b/src/ReactiveUI/Platforms/uap10.0.16299/TransitioningContentControl.Empty.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using Windows.UI.Xaml.Controls; diff --git a/src/ReactiveUI/Platforms/uap10.0.16299/WinRTAppDataDriver.cs b/src/ReactiveUI/Platforms/uap10.0.16299/WinRTAppDataDriver.cs index d70ba65e41..36a5e853c3 100644 --- a/src/ReactiveUI/Platforms/uap10.0.16299/WinRTAppDataDriver.cs +++ b/src/ReactiveUI/Platforms/uap10.0.16299/WinRTAppDataDriver.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/uap10.0.16299/WinRTAutoSuspendApplication.cs b/src/ReactiveUI/Platforms/uap10.0.16299/WinRTAutoSuspendApplication.cs index 20eaffdd49..32c5171863 100644 --- a/src/ReactiveUI/Platforms/uap10.0.16299/WinRTAutoSuspendApplication.cs +++ b/src/ReactiveUI/Platforms/uap10.0.16299/WinRTAutoSuspendApplication.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/windows-common/ActivationForViewFetcher.cs b/src/ReactiveUI/Platforms/windows-common/ActivationForViewFetcher.cs index 6beec2fce4..fb1b691087 100644 --- a/src/ReactiveUI/Platforms/windows-common/ActivationForViewFetcher.cs +++ b/src/ReactiveUI/Platforms/windows-common/ActivationForViewFetcher.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/windows-common/AutoDataTemplateBindingHook.cs b/src/ReactiveUI/Platforms/windows-common/AutoDataTemplateBindingHook.cs index bb3c7219dc..35da3f2962 100644 --- a/src/ReactiveUI/Platforms/windows-common/AutoDataTemplateBindingHook.cs +++ b/src/ReactiveUI/Platforms/windows-common/AutoDataTemplateBindingHook.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/windows-common/BindingTypeConverters.cs b/src/ReactiveUI/Platforms/windows-common/BindingTypeConverters.cs index dbc63f23ef..11241ef91d 100644 --- a/src/ReactiveUI/Platforms/windows-common/BindingTypeConverters.cs +++ b/src/ReactiveUI/Platforms/windows-common/BindingTypeConverters.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/windows-common/PlatformOperations.cs b/src/ReactiveUI/Platforms/windows-common/PlatformOperations.cs index 80cce96af4..cd60e307fc 100644 --- a/src/ReactiveUI/Platforms/windows-common/PlatformOperations.cs +++ b/src/ReactiveUI/Platforms/windows-common/PlatformOperations.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/windows-common/ReactiveUserControl.cs b/src/ReactiveUI/Platforms/windows-common/ReactiveUserControl.cs old mode 100644 new mode 100755 index a5d3b8e9f2..5748437b24 --- a/src/ReactiveUI/Platforms/windows-common/ReactiveUserControl.cs +++ b/src/ReactiveUI/Platforms/windows-common/ReactiveUserControl.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. namespace ReactiveUI diff --git a/src/ReactiveUI/Platforms/windows-common/RoutedViewHost.cs b/src/ReactiveUI/Platforms/windows-common/RoutedViewHost.cs index e9c5bfbe6d..765adccc9c 100644 --- a/src/ReactiveUI/Platforms/windows-common/RoutedViewHost.cs +++ b/src/ReactiveUI/Platforms/windows-common/RoutedViewHost.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/windows-common/ViewModelViewHost.cs b/src/ReactiveUI/Platforms/windows-common/ViewModelViewHost.cs index ea93ba3589..6b34d2e16f 100644 --- a/src/ReactiveUI/Platforms/windows-common/ViewModelViewHost.cs +++ b/src/ReactiveUI/Platforms/windows-common/ViewModelViewHost.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Platforms/xamarin-common/ComponentModelTypeConverter.cs b/src/ReactiveUI/Platforms/xamarin-common/ComponentModelTypeConverter.cs index c4a06e3360..b19f16dc98 100644 --- a/src/ReactiveUI/Platforms/xamarin-common/ComponentModelTypeConverter.cs +++ b/src/ReactiveUI/Platforms/xamarin-common/ComponentModelTypeConverter.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Properties/AssemblyInfo.cs b/src/ReactiveUI/Properties/AssemblyInfo.cs index 4fa29309e5..241094917f 100644 --- a/src/ReactiveUI/Properties/AssemblyInfo.cs +++ b/src/ReactiveUI/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; diff --git a/src/ReactiveUI/PropertyBinding.cs b/src/ReactiveUI/PropertyBinding.cs index d577eb6099..af1eaf5109 100755 --- a/src/ReactiveUI/PropertyBinding.cs +++ b/src/ReactiveUI/PropertyBinding.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/ReactiveBinding.cs b/src/ReactiveUI/ReactiveBinding.cs index 0da25b93f7..b6715c2200 100644 --- a/src/ReactiveUI/ReactiveBinding.cs +++ b/src/ReactiveUI/ReactiveBinding.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/ReactiveCollectionMixins.cs b/src/ReactiveUI/ReactiveCollectionMixins.cs index e3bc2fff0b..ec76287fe2 100644 --- a/src/ReactiveUI/ReactiveCollectionMixins.cs +++ b/src/ReactiveUI/ReactiveCollectionMixins.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using Splat; diff --git a/src/ReactiveUI/ReactiveCommand.cs b/src/ReactiveUI/ReactiveCommand.cs index 27c27d30aa..52c9a82b0a 100755 --- a/src/ReactiveUI/ReactiveCommand.cs +++ b/src/ReactiveUI/ReactiveCommand.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/ReactiveList.cs b/src/ReactiveUI/ReactiveList.cs index ed65a33f35..6e5b47b98a 100644 --- a/src/ReactiveUI/ReactiveList.cs +++ b/src/ReactiveUI/ReactiveList.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using Splat; @@ -29,19 +29,31 @@ public class ReactiveList : IReactiveList, IReadOnlyReactiveList, IList protected virtual void raiseCollectionChanging(NotifyCollectionChangedEventArgs args) { - var handler = this.CollectionChanging; - if (handler != null) { - handler(this, args); - } + // WPF doesn't seem to care much about Range notifications in this case, + // so we'll just pass those right through + this.CollectionChanging?.Invoke(this, args); } public event NotifyCollectionChangedEventHandler CollectionChanged; protected virtual void raiseCollectionChanged(NotifyCollectionChangedEventArgs args) { - var handler = this.CollectionChanged; - if (handler != null) { - handler(this, args); + // WPF throws "Range actions are not supported" under + // certain circumstances, so we catch those here first + this.CollectionChanged?.Invoke(this, replaceIfUnsupported(args)); + } + + NotifyCollectionChangedEventArgs replaceIfUnsupported(NotifyCollectionChangedEventArgs args) + { + // see System.Windows.Data.ListCollectionView.ValidateCollectionChangedEventArgs + switch (args.Action) { + case NotifyCollectionChangedAction.Add when args.NewItems.Count != 1: + case NotifyCollectionChangedAction.Remove when args.OldItems.Count != 1: + case NotifyCollectionChangedAction.Replace when args.NewItems.Count != 1 || args.OldItems.Count != 1: + case NotifyCollectionChangedAction.Move when args.NewItems.Count != 1: + return new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset); + default: + return args; } } @@ -528,11 +540,6 @@ public virtual void Sort(IComparer comparer = null) } public virtual void Reset() - { - publishResetNotification(); - } - - protected virtual void publishResetNotification() { var ea = new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset); _changing.OnNext(ea); @@ -568,7 +575,13 @@ public bool ChangeTrackingEnabled public IDisposable SuppressChangeNotifications() { - Interlocked.Increment(ref _resetNotificationCount); + NotifyCollectionChangedEventArgs resetEventArgs = null; + + if (Interlocked.Increment(ref _resetNotificationCount) == 1) { + // Changes were not suppressed before, publish a Changing reset notification. + resetEventArgs = new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset); + _changing.OnNext(resetEventArgs); + } if (!_hasWhinedAboutNoResetSub && _resetSubCount == 0) { LogHost.Default.Warn("SuppressChangeNotifications was called (perhaps via AddRange), yet you do not"); @@ -579,7 +592,10 @@ public IDisposable SuppressChangeNotifications() return new CompositeDisposable(this.suppressChangeNotifications(), Disposable.Create(() => { if (Interlocked.Decrement(ref _resetNotificationCount) == 0) { - publishResetNotification(); + if (resetEventArgs == null) { + resetEventArgs = new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset); + } + _changed.OnNext(resetEventArgs); } })); } diff --git a/src/ReactiveUI/ReactiveNotifyPropertyChangedMixin.cs b/src/ReactiveUI/ReactiveNotifyPropertyChangedMixin.cs index 6527a83d74..ca9345421f 100644 --- a/src/ReactiveUI/ReactiveNotifyPropertyChangedMixin.cs +++ b/src/ReactiveUI/ReactiveNotifyPropertyChangedMixin.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/ReactiveObject.cs b/src/ReactiveUI/ReactiveObject.cs index 305876d0ce..89f6b613ae 100644 --- a/src/ReactiveUI/ReactiveObject.cs +++ b/src/ReactiveUI/ReactiveObject.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/ReactiveUI.csproj b/src/ReactiveUI/ReactiveUI.csproj index 1709b81cde..3d11bdfff2 100644 --- a/src/ReactiveUI/ReactiveUI.csproj +++ b/src/ReactiveUI/ReactiveUI.csproj @@ -1,6 +1,6 @@ - + - netstandard2.0;net461;uap10.0.16299;Xamarin.iOS10;Xamarin.Mac20;MonoAndroid80;netcoreapp2.0 + netstandard2.0;net461;uap10.0.16299;Xamarin.iOS10;Xamarin.Mac20;MonoAndroid80;netcoreapp2.0;tizen40 ReactiveUI ReactiveUI A MVVM framework that integrates with the Reactive Extensions for .NET to create elegant, testable User Interfaces that run on any mobile or desktop platform. Supports Xamarin.iOS, Xamarin.Android, Xamarin.Mac, Xamarin Forms, WPF, Windows Forms, Windows Phone 8.1, Windows Store and Universal Windows Platform (UWP). @@ -10,8 +10,8 @@ - - + + @@ -21,13 +21,13 @@ - + - + @@ -39,27 +39,43 @@ - + - + + - + - + - + + + + + + + + + + + + + + + + @@ -68,6 +84,4 @@ - - diff --git a/src/ReactiveUI/ReactiveUI.licenseheader b/src/ReactiveUI/ReactiveUI.licenseheader index 712fdc59d7..aea52d66b6 100644 --- a/src/ReactiveUI/ReactiveUI.licenseheader +++ b/src/ReactiveUI/ReactiveUI.licenseheader @@ -1,12 +1,12 @@ extensions: designer.cs generated.cs extensions: .cs // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. extensions: .xml .config .xsd diff --git a/src/ReactiveUI/RefcountDisposeWrapper.cs b/src/ReactiveUI/RefcountDisposeWrapper.cs index 585e61a6ae..d2fad30f92 100644 --- a/src/ReactiveUI/RefcountDisposeWrapper.cs +++ b/src/ReactiveUI/RefcountDisposeWrapper.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Reflection.cs b/src/ReactiveUI/Reflection.cs index 61b3d6bc34..aa1cb56581 100644 --- a/src/ReactiveUI/Reflection.cs +++ b/src/ReactiveUI/Reflection.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/RegisterableInterfaces.cs b/src/ReactiveUI/RegisterableInterfaces.cs index 4ecf985cc3..cf2eaf35e1 100755 --- a/src/ReactiveUI/RegisterableInterfaces.cs +++ b/src/ReactiveUI/RegisterableInterfaces.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/Registrations.cs b/src/ReactiveUI/Registrations.cs index 451aae53fa..40719635a7 100644 --- a/src/ReactiveUI/Registrations.cs +++ b/src/ReactiveUI/Registrations.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/RoutableViewModelMixin.cs b/src/ReactiveUI/RoutableViewModelMixin.cs index 85dfe0a21f..4b75872180 100644 --- a/src/ReactiveUI/RoutableViewModelMixin.cs +++ b/src/ReactiveUI/RoutableViewModelMixin.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/RoutingState.cs b/src/ReactiveUI/RoutingState.cs index b0db3c1f2e..52d601afe1 100755 --- a/src/ReactiveUI/RoutingState.cs +++ b/src/ReactiveUI/RoutingState.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/RxApp.cs b/src/ReactiveUI/RxApp.cs index 0f76e88034..07ad368bce 100644 --- a/src/ReactiveUI/RxApp.cs +++ b/src/ReactiveUI/RxApp.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using Splat; diff --git a/src/ReactiveUI/ScheduledSubject.cs b/src/ReactiveUI/ScheduledSubject.cs index b0d68b846e..f089de0ddc 100644 --- a/src/ReactiveUI/ScheduledSubject.cs +++ b/src/ReactiveUI/ScheduledSubject.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/SuspensionHost.cs b/src/ReactiveUI/SuspensionHost.cs index 2af54cf073..e049186012 100644 --- a/src/ReactiveUI/SuspensionHost.cs +++ b/src/ReactiveUI/SuspensionHost.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/UnhandledErrorException.cs b/src/ReactiveUI/UnhandledErrorException.cs index 522af2ed76..f360e4df8e 100644 --- a/src/ReactiveUI/UnhandledErrorException.cs +++ b/src/ReactiveUI/UnhandledErrorException.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/VariadicTemplates.cs b/src/ReactiveUI/VariadicTemplates.cs index 4551b081bb..8ec9bbbc95 100644 --- a/src/ReactiveUI/VariadicTemplates.cs +++ b/src/ReactiveUI/VariadicTemplates.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/ViewAttributes.cs b/src/ReactiveUI/ViewAttributes.cs index 7de348844e..8f42d3e47d 100644 --- a/src/ReactiveUI/ViewAttributes.cs +++ b/src/ReactiveUI/ViewAttributes.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. namespace ReactiveUI diff --git a/src/ReactiveUI/ViewLocator.cs b/src/ReactiveUI/ViewLocator.cs index d800df360a..0ed178ef18 100755 --- a/src/ReactiveUI/ViewLocator.cs +++ b/src/ReactiveUI/ViewLocator.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/ReactiveUI/WaitForDispatcherScheduler.cs b/src/ReactiveUI/WaitForDispatcherScheduler.cs index f6b7b930bc..b5de071c4b 100644 --- a/src/ReactiveUI/WaitForDispatcherScheduler.cs +++ b/src/ReactiveUI/WaitForDispatcherScheduler.cs @@ -1,12 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; -using System.Collections.Generic; -using System.Linq; using System.Reactive.Concurrency; -using System.Text; namespace ReactiveUI { @@ -18,48 +15,52 @@ namespace ReactiveUI /// public class WaitForDispatcherScheduler : IScheduler { - IScheduler _innerScheduler; - readonly Func _schedulerFactory; + private IScheduler scheduler; + private readonly Func schedulerFactory; public WaitForDispatcherScheduler(Func schedulerFactory) { - _schedulerFactory = schedulerFactory; + this.schedulerFactory = schedulerFactory; // NB: Creating a scheduler will fail on WinRT if we attempt to do // so on a non-UI thread, even if the underlying Dispatcher exists. // We assume (hope?) that WaitForDispatcherScheduler will be created // early enough that this won't be the case. - attemptToCreateScheduler(); + AttemptToCreateScheduler(); } public IDisposable Schedule(TState state, Func action) { - return attemptToCreateScheduler().Schedule(state, action); + return AttemptToCreateScheduler().Schedule(state, action); } public IDisposable Schedule(TState state, TimeSpan dueTime, Func action) { - return attemptToCreateScheduler().Schedule(state, dueTime, action); + return AttemptToCreateScheduler().Schedule(state, dueTime, action); } public IDisposable Schedule(TState state, DateTimeOffset dueTime, Func action) { - return attemptToCreateScheduler().Schedule(state, dueTime, action); + return AttemptToCreateScheduler().Schedule(state, dueTime, action); } - public DateTimeOffset Now { - get { return attemptToCreateScheduler().Now; } + public DateTimeOffset Now + { + get { return AttemptToCreateScheduler().Now; } } - IScheduler attemptToCreateScheduler() + private IScheduler AttemptToCreateScheduler() { - if (_innerScheduler != null) return _innerScheduler; + if (scheduler != null) return scheduler; try { - _innerScheduler = _schedulerFactory(); - return _innerScheduler; + scheduler = schedulerFactory(); + return scheduler; } catch (InvalidOperationException) { // NB: Dispatcher's not ready yet. Keep using CurrentThread return CurrentThreadScheduler.Instance; + } catch (ArgumentNullException) { + // NB: Dispatcher's not ready yet. Keep using CurrentThread + return CurrentThreadScheduler.Instance; } } } diff --git a/src/ReactiveUI/WeakEventManager.cs b/src/ReactiveUI/WeakEventManager.cs index 6492641ae1..0e4015c963 100644 --- a/src/ReactiveUI/WeakEventManager.cs +++ b/src/ReactiveUI/WeakEventManager.cs @@ -1,5 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MS-PL license. +// The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; diff --git a/src/global.json b/src/global.json new file mode 100644 index 0000000000..c5eb039a68 --- /dev/null +++ b/src/global.json @@ -0,0 +1,5 @@ +{ + "msbuild-sdks": { + "MSBuild.Sdk.Extras": "1.6.41" + } +} \ No newline at end of file