Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Directory.build.props
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
<PackageReference Include="Xunit.StaFact" Version="1.1.11" />
<PackageReference Include="FluentAssertions" Version="6.5.1" />
<PackageReference Include="Microsoft.Reactive.Testing" Version="5.0.0" />
<PackageReference Include="PublicApiGenerator" Version="10.2.0" />
<PackageReference Include="PublicApiGenerator" Version="10.3.0" />
<PackageReference Include="coverlet.msbuild" Version="3.1.2" PrivateAssets="All" />
<PackageReference Include="Verify.Xunit" Version="16.1.1" />
<PackageReference Include="Verify.Xunit" Version="16.1.2" />
</ItemGroup>

<ItemGroup Condition="'$(IsTestProject)' != 'true'">
Expand All @@ -71,7 +71,7 @@
<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" Version="3.4.255" PrivateAssets="all" />

<PackageReference Include="stylecop.analyzers" Version="1.2.0-beta.354" PrivateAssets="all" />
<PackageReference Include="stylecop.analyzers" Version="1.2.0-beta.406" PrivateAssets="all" />
<PackageReference Include="Roslynator.Analyzers" Version="4.0.2" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/ReactiveUI.Blazor/ReactiveUI.Blazor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</ItemGroup>

<ItemGroup Condition=" $(TargetFramework.StartsWith('net6')) ">
<PackageReference Include="Microsoft.AspNetCore.Components" Version="6.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components" Version="6.0.2" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/ReactiveUI.Maui/ReactiveMasterDetailPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
namespace ReactiveUI.Maui;

/// <summary>
/// This is an <see cref="MasterDetailPage"/> that is also an <see cref="IViewFor{T}"/>.
/// This is an MasterDetailPage that is also an <see cref="IViewFor{T}"/>.
/// </summary>
/// <typeparam name="TViewModel">The type of the view model.</typeparam>
/// <seealso cref="Microsoft.Maui.Controls" />
Expand Down Expand Up @@ -51,4 +51,4 @@ protected override void OnBindingContextChanged()
}

private static void OnViewModelChanged(BindableObject bindableObject, object oldValue, object newValue) => bindableObject.BindingContext = newValue;
}
}
3 changes: 1 addition & 2 deletions src/ReactiveUI.Maui/ReactiveNavigationPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ namespace ReactiveUI.Maui;
/// This is an <see cref="NavigationPage"/> that is also an <see cref="IViewFor{T}"/>.
/// </summary>
/// <typeparam name="TViewModel">The type of the view model.</typeparam>
/// <seealso cref="Xamarin.Forms.NavigationPage" />
/// <seealso cref="ReactiveUI.IViewFor{TViewModel}" />
public class ReactiveNavigationPage<TViewModel> : NavigationPage, IViewFor<TViewModel>
where TViewModel : class
Expand Down Expand Up @@ -51,4 +50,4 @@ protected override void OnBindingContextChanged()
}

private static void OnViewModelChanged(BindableObject bindableObject, object oldValue, object newValue) => bindableObject.BindingContext = newValue;
}
}
8 changes: 2 additions & 6 deletions src/ReactiveUI.Maui/ReactiveUI.Maui.csproj
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFrameworks>net6.0</TargetFrameworks>
<PackageDescription>Contains the ReactiveUI platform specific extensions for Microsoft Maui</PackageDescription>
<PackageTags>mvvm;reactiveui;rx;reactive extensions;observable;LINQ;events;frp;maui;android;ios;mac;forms;net</PackageTags>
<UseMaui>true</UseMaui>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Maui.Controls" Version="6.0.100-preview.*" />
<PackageReference Include="Microsoft.Maui.Core" Version="6.0.100-preview.*" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\ReactiveUI\ReactiveUI.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ namespace ReactiveUI
}
public interface IPropertyBindingHook
{
bool ExecuteHook(object? source, object target, System.Func<ReactiveUI.IObservedChange<, >[]> getCurrentViewModelProperties, System.Func<ReactiveUI.IObservedChange<, >[]> getCurrentViewProperties, ReactiveUI.BindingDirection direction);
bool ExecuteHook(object? source, object target, System.Func<ReactiveUI.IObservedChange<object, object>[]> getCurrentViewModelProperties, System.Func<ReactiveUI.IObservedChange<object, object>[]> getCurrentViewProperties, ReactiveUI.BindingDirection direction);
}
public class IROObservableForProperty : ReactiveUI.ICreatesObservableForProperty, Splat.IEnableLogger
{
Expand Down Expand Up @@ -402,7 +402,7 @@ namespace ReactiveUI
public class Interaction<TInput, TOutput>
{
public Interaction(System.Reactive.Concurrency.IScheduler? handlerScheduler = null) { }
protected System.Func<, >[] GetHandlers() { }
protected System.Func<ReactiveUI.InteractionContext<TInput, TOutput>, System.IObservable<System.Reactive.Unit>>[] GetHandlers() { }
public virtual System.IObservable<TOutput> Handle(TInput input) { }
public System.IDisposable RegisterHandler(System.Action<ReactiveUI.InteractionContext<TInput, TOutput>> handler) { }
public System.IDisposable RegisterHandler(System.Func<ReactiveUI.InteractionContext<TInput, TOutput>, System.Threading.Tasks.Task> handler) { }
Expand Down Expand Up @@ -745,7 +745,7 @@ namespace ReactiveUI
public static System.Type? ReallyFindType(string? type, bool throwOnFailure) { }
public static System.Linq.Expressions.Expression Rewrite(System.Linq.Expressions.Expression? expression) { }
public static void ThrowIfMethodsNotOverloaded(string callingTypeName, object targetObject, params string[] methodsToCheck) { }
public static bool TryGetAllValuesForPropertyChain(out ReactiveUI.IObservedChange<, >[] changeValues, object? current, System.Collections.Generic.IEnumerable<System.Linq.Expressions.Expression> expressionChain) { }
public static bool TryGetAllValuesForPropertyChain(out ReactiveUI.IObservedChange<object, object?>[] changeValues, object? current, System.Collections.Generic.IEnumerable<System.Linq.Expressions.Expression> expressionChain) { }
public static bool TryGetValueForPropertyChain<TValue>(out TValue changeValue, object? current, System.Collections.Generic.IEnumerable<System.Linq.Expressions.Expression> expressionChain) { }
public static bool TrySetValueToPropertyChain<TValue>(object? target, System.Collections.Generic.IEnumerable<System.Linq.Expressions.Expression> expressionChain, TValue value, bool shouldThrow = true) { }
}
Expand Down Expand Up @@ -824,7 +824,7 @@ namespace ReactiveUI
public int GetAffinityForObjects(System.Type fromType, System.Type toType) { }
public bool TryConvert(object? from, System.Type toType, object? conversionHint, out object result) { }
}
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.All)]
[System.AttributeUsage(System.AttributeTargets.Class)]
public sealed class SingleInstanceViewAttribute : System.Attribute
{
public SingleInstanceViewAttribute() { }
Expand Down Expand Up @@ -873,7 +873,7 @@ namespace ReactiveUI
public ReactiveUI.Interaction<TInput, TOutput>? Interaction { get; }
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
}
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.All)]
[System.AttributeUsage(System.AttributeTargets.Class)]
public sealed class ViewContractAttribute : System.Attribute
{
public ViewContractAttribute(string contract) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ namespace ReactiveUI
}
public interface IPropertyBindingHook
{
bool ExecuteHook(object? source, object target, System.Func<ReactiveUI.IObservedChange<, >[]> getCurrentViewModelProperties, System.Func<ReactiveUI.IObservedChange<, >[]> getCurrentViewProperties, ReactiveUI.BindingDirection direction);
bool ExecuteHook(object? source, object target, System.Func<ReactiveUI.IObservedChange<object, object>[]> getCurrentViewModelProperties, System.Func<ReactiveUI.IObservedChange<object, object>[]> getCurrentViewProperties, ReactiveUI.BindingDirection direction);
}
public class IROObservableForProperty : ReactiveUI.ICreatesObservableForProperty, Splat.IEnableLogger
{
Expand Down Expand Up @@ -409,7 +409,7 @@ namespace ReactiveUI
public class Interaction<TInput, TOutput>
{
public Interaction(System.Reactive.Concurrency.IScheduler? handlerScheduler = null) { }
protected System.Func<, >[] GetHandlers() { }
protected System.Func<ReactiveUI.InteractionContext<TInput, TOutput>, System.IObservable<System.Reactive.Unit>>[] GetHandlers() { }
public virtual System.IObservable<TOutput> Handle(TInput input) { }
public System.IDisposable RegisterHandler(System.Action<ReactiveUI.InteractionContext<TInput, TOutput>> handler) { }
public System.IDisposable RegisterHandler(System.Func<ReactiveUI.InteractionContext<TInput, TOutput>, System.Threading.Tasks.Task> handler) { }
Expand Down Expand Up @@ -752,7 +752,7 @@ namespace ReactiveUI
public static System.Type? ReallyFindType(string? type, bool throwOnFailure) { }
public static System.Linq.Expressions.Expression Rewrite(System.Linq.Expressions.Expression? expression) { }
public static void ThrowIfMethodsNotOverloaded(string callingTypeName, object targetObject, params string[] methodsToCheck) { }
public static bool TryGetAllValuesForPropertyChain(out ReactiveUI.IObservedChange<, >[] changeValues, object? current, System.Collections.Generic.IEnumerable<System.Linq.Expressions.Expression> expressionChain) { }
public static bool TryGetAllValuesForPropertyChain(out ReactiveUI.IObservedChange<object, object?>[] changeValues, object? current, System.Collections.Generic.IEnumerable<System.Linq.Expressions.Expression> expressionChain) { }
public static bool TryGetValueForPropertyChain<TValue>(out TValue changeValue, object? current, System.Collections.Generic.IEnumerable<System.Linq.Expressions.Expression> expressionChain) { }
public static bool TrySetValueToPropertyChain<TValue>(object? target, System.Collections.Generic.IEnumerable<System.Linq.Expressions.Expression> expressionChain, TValue value, bool shouldThrow = true) { }
}
Expand Down Expand Up @@ -831,7 +831,7 @@ namespace ReactiveUI
public int GetAffinityForObjects(System.Type fromType, System.Type toType) { }
public bool TryConvert(object? from, System.Type toType, object? conversionHint, out object result) { }
}
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.All)]
[System.AttributeUsage(System.AttributeTargets.Class)]
public sealed class SingleInstanceViewAttribute : System.Attribute
{
public SingleInstanceViewAttribute() { }
Expand Down Expand Up @@ -880,7 +880,7 @@ namespace ReactiveUI
public ReactiveUI.Interaction<TInput, TOutput>? Interaction { get; }
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
}
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.All)]
[System.AttributeUsage(System.AttributeTargets.Class)]
public sealed class ViewContractAttribute : System.Attribute
{
public ViewContractAttribute(string contract) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace ReactiveUI.Winforms
public class ContentControlBindingHook : ReactiveUI.IPropertyBindingHook
{
public ContentControlBindingHook() { }
public bool ExecuteHook(object? source, object target, System.Func<ReactiveUI.IObservedChange<, >[]> getCurrentViewModelProperties, System.Func<ReactiveUI.IObservedChange<, >[]> getCurrentViewProperties, ReactiveUI.BindingDirection direction) { }
public bool ExecuteHook(object? source, object target, System.Func<ReactiveUI.IObservedChange<object, object>[]> getCurrentViewModelProperties, System.Func<ReactiveUI.IObservedChange<object, object>[]> getCurrentViewProperties, ReactiveUI.BindingDirection direction) { }
}
public class CreatesWinformsCommandBinding : ReactiveUI.ICreatesCommandBinding
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace ReactiveUI.Winforms
public class ContentControlBindingHook : ReactiveUI.IPropertyBindingHook
{
public ContentControlBindingHook() { }
public bool ExecuteHook(object? source, object target, System.Func<ReactiveUI.IObservedChange<, >[]> getCurrentViewModelProperties, System.Func<ReactiveUI.IObservedChange<, >[]> getCurrentViewProperties, ReactiveUI.BindingDirection direction) { }
public bool ExecuteHook(object? source, object target, System.Func<ReactiveUI.IObservedChange<object, object>[]> getCurrentViewModelProperties, System.Func<ReactiveUI.IObservedChange<object, object>[]> getCurrentViewProperties, ReactiveUI.BindingDirection direction) { }
}
public class CreatesWinformsCommandBinding : ReactiveUI.ICreatesCommandBinding
{
Expand Down
2 changes: 1 addition & 1 deletion src/ReactiveUI.Uno.WinUI/ReactiveUI.Uno.WinUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</ItemGroup>

<ItemGroup Condition=" !$(TargetFramework.StartsWith('net6.0-windows10')) ">
<PackageReference Include="Uno.WinUI" Version="4.0.9" />
<PackageReference Include="Uno.WinUI" Version="4.0.13" />
</ItemGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('net6.0-windows10'))">
<DefineConstants>$(DefineConstants);HAS_UNO_WINUI</DefineConstants>
Expand Down
2 changes: 1 addition & 1 deletion src/ReactiveUI.Uno/ReactiveUI.Uno.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</ItemGroup>

<ItemGroup Condition=" !$(TargetFramework.StartsWith('uap')) ">
<PackageReference Include="Uno.UI" Version="4.0.9" />
<PackageReference Include="Uno.UI" Version="4.0.13" />
</ItemGroup>

<ItemGroup Condition=" $(TargetFramework.StartsWith('netstandard')) ">
Expand Down
2 changes: 1 addition & 1 deletion src/ReactiveUI.XamForms/ReactiveUI.XamForms.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2244" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2337" />
</ItemGroup>

<ItemGroup>
Expand Down
5 changes: 3 additions & 2 deletions src/ReactiveUI/Activation/ViewForMixins.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ public static class ViewForMixins
{
var score = x?.GetAffinityForView(t) ?? 0;
return score > acc.count ? (score, x) : acc;
}).viewFetcher, RxApp.SmallCacheLimit);
}).viewFetcher,
RxApp.SmallCacheLimit);

static ViewForMixins() => RxApp.EnsureInitialized();

Expand Down Expand Up @@ -282,4 +283,4 @@ private static IDisposable HandleViewModelActivation(IViewFor view, IObservable<
vmDisposable,
viewVmDisposable);
}
}
}
8 changes: 5 additions & 3 deletions src/ReactiveUI/Bindings/Command/CreatesCommandBinding.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ internal class CreatesCommandBinding
{
var score = x.GetAffinityForObject(t, false);
return (score > acc.score) ? (score, x) : acc;
}).binding, RxApp.SmallCacheLimit);
}).binding,
RxApp.SmallCacheLimit);

private static readonly MemoizingMRUCache<Type, ICreatesCommandBinding?> _bindCommandEventCache =
new(
Expand All @@ -31,7 +32,8 @@ internal class CreatesCommandBinding
{
var score = x.GetAffinityForObject(t, true);
return (score > acc.score) ? (score, x) : acc;
}).binding, RxApp.SmallCacheLimit);
}).binding,
RxApp.SmallCacheLimit);

public static IDisposable BindCommandToObject(ICommand? command, object? target, IObservable<object?> commandParameter)
{
Expand Down Expand Up @@ -74,4 +76,4 @@ public static IDisposable BindCommandToObject(ICommand? command, object? target,

return ret;
}
}
}
5 changes: 3 additions & 2 deletions src/ReactiveUI/Mixins/AutoPersistHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ public static class AutoPersistHelper
private static readonly MemoizingMRUCache<Type, Dictionary<string, bool>> _persistablePropertiesCache = new(
(type, _) => type.GetTypeInfo().DeclaredProperties
.Where(x => x.CustomAttributes.Any(y => typeof(DataMemberAttribute).GetTypeInfo().IsAssignableFrom(y.AttributeType.GetTypeInfo())))
.ToDictionary(k => k.Name, _ => true), RxApp.SmallCacheLimit);
.ToDictionary(k => k.Name, _ => true),
RxApp.SmallCacheLimit);

private static readonly MemoizingMRUCache<Type, bool> _dataContractCheckCache = new(
(t, _) => t.GetTypeInfo().GetCustomAttributes(typeof(DataContractAttribute), true).Length > 0,
Expand Down Expand Up @@ -401,4 +402,4 @@ public static IDisposable ActOnEveryObject<TItem>(this IObservable<IChangeSet<TI
}
}
});
}
}
5 changes: 3 additions & 2 deletions src/ReactiveUI/Mixins/ReactiveNotifyPropertyChangedMixin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ public static class ReactiveNotifyPropertyChangedMixin
{
var score = x.GetAffinityForObject(t.senderType, t.propertyName, t.beforeChange);
return score > acc.score ? (score, x) : acc;
}).binding, RxApp.BigCacheLimit);
}).binding,
RxApp.BigCacheLimit);

static ReactiveNotifyPropertyChangedMixin() => RxApp.EnsureInitialized();

Expand Down Expand Up @@ -204,4 +205,4 @@ public static IObservable<IObservedChange<TSender, TValue>> SubscribeToExpressio

return result.GetNotificationForProperty(sender, expression, propertyName, beforeChange, suppressWarnings);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ public class ComponentModelTypeConverter : IBindingTypeConverter

var converter = TypeDescriptor.GetConverter(types.fromType);
return converter.CanConvertTo(types.toType) ? converter : null;
}, RxApp.SmallCacheLimit);
},
RxApp.SmallCacheLimit);

/// <inheritdoc/>
public int GetAffinityForObjects(Type fromType, Type toType)
Expand Down