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
4 changes: 4 additions & 0 deletions src/ReactiveUI.Blazor/Registrations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ public void Register(Action<Func<object>, Type> registerFunction)
}

registerFunction(() => new StringConverter(), typeof(IBindingTypeConverter));
registerFunction(() => new ByteToStringTypeConverter(), typeof(IBindingTypeConverter));
registerFunction(() => new ShortToStringTypeConverter(), typeof(IBindingTypeConverter));
registerFunction(() => new IntegerToStringTypeConverter(), typeof(IBindingTypeConverter));
registerFunction(() => new LongToStringTypeConverter(), typeof(IBindingTypeConverter));
registerFunction(() => new SingleToStringTypeConverter(), typeof(IBindingTypeConverter));
registerFunction(() => new DoubleToStringTypeConverter(), typeof(IBindingTypeConverter));
registerFunction(() => new DecimalToStringTypeConverter(), typeof(IBindingTypeConverter));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ namespace ReactiveUI
TwoWay = 1,
AsyncOneWay = 2,
}
public class ByteToStringTypeConverter : ReactiveUI.IBindingTypeConverter, Splat.IEnableLogger
{
public ByteToStringTypeConverter() { }
public int GetAffinityForObjects(System.Type fromType, System.Type toType) { }
public bool TryConvert(object? from, System.Type toType, object? conversionHint, out object result) { }
}
public class CanActivateViewFetcher : ReactiveUI.IActivationForViewFetcher
{
public CanActivateViewFetcher() { }
Expand Down Expand Up @@ -365,6 +371,12 @@ namespace ReactiveUI
{
ReactiveUI.IViewFor? ResolveView<T>(T? viewModel, string? contract = null);
}
public class IntegerToStringTypeConverter : ReactiveUI.IBindingTypeConverter, Splat.IEnableLogger
{
public IntegerToStringTypeConverter() { }
public int GetAffinityForObjects(System.Type fromType, System.Type toType) { }
public bool TryConvert(object? from, System.Type toType, object? conversionHint, out object result) { }
}
public class InteractionBinderImplementation : ReactiveUI.IInteractionBinderImplementation, Splat.IEnableLogger
{
public InteractionBinderImplementation() { }
Expand Down Expand Up @@ -400,6 +412,12 @@ namespace ReactiveUI
public System.IDisposable RegisterHandler(System.Func<ReactiveUI.InteractionContext<TInput, TOutput>, System.Threading.Tasks.Task> handler) { }
public System.IDisposable RegisterHandler<TDontCare>(System.Func<ReactiveUI.InteractionContext<TInput, TOutput>, System.IObservable<TDontCare>> handler) { }
}
public class LongToStringTypeConverter : ReactiveUI.IBindingTypeConverter, Splat.IEnableLogger
{
public LongToStringTypeConverter() { }
public int GetAffinityForObjects(System.Type fromType, System.Type toType) { }
public bool TryConvert(object? from, System.Type toType, object? conversionHint, out object result) { }
}
public class MessageBus : ReactiveUI.IMessageBus, Splat.IEnableLogger
{
public MessageBus() { }
Expand Down Expand Up @@ -761,6 +779,12 @@ namespace ReactiveUI
public void OnNext(T value) { }
public System.IDisposable Subscribe(System.IObserver<T> observer) { }
}
public class ShortToStringTypeConverter : ReactiveUI.IBindingTypeConverter, Splat.IEnableLogger
{
public ShortToStringTypeConverter() { }
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)]
public class SingleInstanceViewAttribute : System.Attribute
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ namespace ReactiveUI
TwoWay = 1,
AsyncOneWay = 2,
}
public class ByteToStringTypeConverter : ReactiveUI.IBindingTypeConverter, Splat.IEnableLogger
{
public ByteToStringTypeConverter() { }
public int GetAffinityForObjects(System.Type fromType, System.Type toType) { }
public bool TryConvert(object? from, System.Type toType, object? conversionHint, out object result) { }
}
public class CanActivateViewFetcher : ReactiveUI.IActivationForViewFetcher
{
public CanActivateViewFetcher() { }
Expand Down Expand Up @@ -360,6 +366,12 @@ namespace ReactiveUI
{
ReactiveUI.IViewFor? ResolveView<T>(T? viewModel, string? contract = null);
}
public class IntegerToStringTypeConverter : ReactiveUI.IBindingTypeConverter, Splat.IEnableLogger
{
public IntegerToStringTypeConverter() { }
public int GetAffinityForObjects(System.Type fromType, System.Type toType) { }
public bool TryConvert(object? from, System.Type toType, object? conversionHint, out object result) { }
}
public class InteractionBinderImplementation : ReactiveUI.IInteractionBinderImplementation, Splat.IEnableLogger
{
public InteractionBinderImplementation() { }
Expand Down Expand Up @@ -395,6 +407,12 @@ namespace ReactiveUI
public System.IDisposable RegisterHandler(System.Func<ReactiveUI.InteractionContext<TInput, TOutput>, System.Threading.Tasks.Task> handler) { }
public System.IDisposable RegisterHandler<TDontCare>(System.Func<ReactiveUI.InteractionContext<TInput, TOutput>, System.IObservable<TDontCare>> handler) { }
}
public class LongToStringTypeConverter : ReactiveUI.IBindingTypeConverter, Splat.IEnableLogger
{
public LongToStringTypeConverter() { }
public int GetAffinityForObjects(System.Type fromType, System.Type toType) { }
public bool TryConvert(object? from, System.Type toType, object? conversionHint, out object result) { }
}
public class MessageBus : ReactiveUI.IMessageBus, Splat.IEnableLogger
{
public MessageBus() { }
Expand Down Expand Up @@ -756,6 +774,12 @@ namespace ReactiveUI
public void OnNext(T value) { }
public System.IDisposable Subscribe(System.IObserver<T> observer) { }
}
public class ShortToStringTypeConverter : ReactiveUI.IBindingTypeConverter, Splat.IEnableLogger
{
public ShortToStringTypeConverter() { }
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)]
public class SingleInstanceViewAttribute : System.Attribute
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ namespace ReactiveUI
TwoWay = 1,
AsyncOneWay = 2,
}
public class ByteToStringTypeConverter : ReactiveUI.IBindingTypeConverter, Splat.IEnableLogger
{
public ByteToStringTypeConverter() { }
public int GetAffinityForObjects(System.Type fromType, System.Type toType) { }
public bool TryConvert(object? from, System.Type toType, object? conversionHint, out object result) { }
}
public class CanActivateViewFetcher : ReactiveUI.IActivationForViewFetcher
{
public CanActivateViewFetcher() { }
Expand Down Expand Up @@ -358,6 +364,12 @@ namespace ReactiveUI
{
ReactiveUI.IViewFor? ResolveView<T>(T? viewModel, string? contract = null);
}
public class IntegerToStringTypeConverter : ReactiveUI.IBindingTypeConverter, Splat.IEnableLogger
{
public IntegerToStringTypeConverter() { }
public int GetAffinityForObjects(System.Type fromType, System.Type toType) { }
public bool TryConvert(object? from, System.Type toType, object? conversionHint, out object result) { }
}
public class InteractionBinderImplementation : ReactiveUI.IInteractionBinderImplementation, Splat.IEnableLogger
{
public InteractionBinderImplementation() { }
Expand Down Expand Up @@ -393,6 +405,12 @@ namespace ReactiveUI
public System.IDisposable RegisterHandler(System.Func<ReactiveUI.InteractionContext<TInput, TOutput>, System.Threading.Tasks.Task> handler) { }
public System.IDisposable RegisterHandler<TDontCare>(System.Func<ReactiveUI.InteractionContext<TInput, TOutput>, System.IObservable<TDontCare>> handler) { }
}
public class LongToStringTypeConverter : ReactiveUI.IBindingTypeConverter, Splat.IEnableLogger
{
public LongToStringTypeConverter() { }
public int GetAffinityForObjects(System.Type fromType, System.Type toType) { }
public bool TryConvert(object? from, System.Type toType, object? conversionHint, out object result) { }
}
public class MessageBus : ReactiveUI.IMessageBus, Splat.IEnableLogger
{
public MessageBus() { }
Expand Down Expand Up @@ -754,6 +772,12 @@ namespace ReactiveUI
public void OnNext(T value) { }
public System.IDisposable Subscribe(System.IObserver<T> observer) { }
}
public class ShortToStringTypeConverter : ReactiveUI.IBindingTypeConverter, Splat.IEnableLogger
{
public ShortToStringTypeConverter() { }
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)]
public class SingleInstanceViewAttribute : System.Attribute
{
Expand Down
30 changes: 30 additions & 0 deletions src/ReactiveUI.Tests/Mocks/PropertyBindViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ public class PropertyBindViewModel : ReactiveObject
private double _justADouble;
private decimal _justADecimal;
private double? _nullableDouble;
private byte _justAByte;
private short _justAInt16;
private int _justAInt32;
private long _justAInt64;
private bool _justABoolean;
private Visibility _justAVisibility;

Expand Down Expand Up @@ -83,6 +86,24 @@ public decimal JustADecimal
set => this.RaiseAndSetIfChanged(ref _justADecimal, value);
}

/// <summary>
/// Gets or sets the just a int32.
/// </summary>
public byte JustAByte
{
get => _justAByte;
set => this.RaiseAndSetIfChanged(ref _justAByte, value);
}

/// <summary>
/// Gets or sets the just a int32.
/// </summary>
public short JustAInt16
{
get => _justAInt16;
set => this.RaiseAndSetIfChanged(ref _justAInt16, value);
}

/// <summary>
/// Gets or sets the just a int32.
/// </summary>
Expand All @@ -92,6 +113,15 @@ public int JustAInt32
set => this.RaiseAndSetIfChanged(ref _justAInt32, value);
}

/// <summary>
/// Gets or sets the just a int32.
/// </summary>
public long JustAInt64
{
get => _justAInt64;
set => this.RaiseAndSetIfChanged(ref _justAInt64, value);
}

/// <summary>
/// Gets or sets the nullable double.
/// </summary>
Expand Down
Loading