This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Source : UITableViewSource | |
{ | |
public Source(UITableView tableView) | |
{ | |
// because of a call to ReloadData here... | |
tableView.ReloadData(); | |
} | |
// ...this won't be called... | |
public override nint NumberOfSections(UITableView tableView) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyViewModel : ReactiveObject | |
{ | |
private readonly ReactiveCommand<object> saveCommand; | |
private readonly ObservableAsPropertyHelper<string> fullName; | |
private readonly ObservableAsPropertyHelper<string> initials; | |
private string firstName; | |
private string lastName; | |
private bool showLastNameFirst; | |
public MyViewModel() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class ObservableExtensions | |
{ | |
public static IObservable<TSource> RetryWhile<TSource>( | |
this IObservable<TSource> @this, | |
Func<TSource, bool> predicate) | |
{ | |
@this.AssertNotNull(nameof(@this)); | |
predicate.AssertNotNull(nameof(predicate)); | |
return Observable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class InteractionSource | |
{ | |
public static readonly InteractionSource Global = new InteractionSource(); | |
private readonly IList<Func<NewInteraction, IObservable<Unit>>> handlers; | |
public InteractionSource() | |
{ | |
this.handlers = new List<Func<NewInteraction, IObservable<Unit>>>(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Logging | |
{ | |
using System; | |
using System.Diagnostics; | |
using System.Threading; | |
public static class Log | |
{ | |
public static Action<string> LogSink | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace ReactiveUI.XamForms | |
{ | |
using System; | |
using System.ComponentModel; | |
using System.Linq; | |
using System.Reactive; | |
using System.Reactive.Linq; | |
using Xamarin.Forms; | |
// The ReactiveContentView that comes with RxUI does not implement ICanActivate. As such, the activation-for-view-fetcher |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public delegate DeviceViewModel DeviceViewModelFactory(IObservable<IDevice> device, IDeviceMetadata deviceMetadata, IObservable<Unit> timer); | |
public sealed class DeviceViewModel : ReactiveObject | |
{ | |
public DeviceViewModel( | |
IObservable<IDevice> device, | |
IDeviceMetadata deviceMetadata, | |
IScheduler scheduler, | |
IObservable<Unit> timer) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ItemViewModel : ReactiveObject | |
{ | |
private readonly string name; | |
private readonly ObservableAsPropertyHelper<int> sortOrder; | |
public ItemViewModel(string name, IObservable<int> sortOrder, IScheduler scheduler) | |
{ | |
this.name = name; | |
this.sortOrder = sortOrder | |
.ToProperty(this, x => x.SortOrder, scheduler: scheduler); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
07-25 10:16:20.420 D/btif_config_util(30154): btif_config_save_file(L188): in file name:/data/misc/bluedroid/bt_config.new | |
07-25 10:16:21.885 D/audio_hw_primary( 1406): disable_audio_route: reset and update mixer path: low-latency-playback | |
07-25 10:16:21.886 D/audio_hw_primary( 1406): disable_snd_device: snd_device(2: speaker) | |
07-25 10:16:24.671 D/audio_hw_primary( 1406): out_set_parameters: enter: usecase(1: low-latency-playback) kvpairs: routing=2 | |
07-25 10:16:24.682 D/audio_hw_primary( 1406): select_devices: out_snd_device(2: speaker) in_snd_device(0: none) | |
07-25 10:16:24.682 D/msm8974_platform( 1406): platform_send_audio_calibration: sending audio calibration for snd_device(2) acdb_id(15) | |
07-25 10:16:24.682 D/audio_hw_primary( 1406): enable_snd_device: snd_device(2: speaker) | |
07-25 10:16:24.686 D/audio_hw_primary( 1406): enable_audio_route: apply and update mixer path: low-latency-playback | |
07-25 10:16:24.806 D/Mono (20193): DllImport attempting to load: '__Internal'. | |
07-25 10:16:24.806 D/Mono (20193): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this code is a heavily modified (and tested) version of https://gist.github.com/praeclarum/6225853 | |
// example usage | |
this.ContentView.ConstrainLayout(() => | |
this.clientNameLabel.Left() == this.ContentView.Left() + Layout.StandardSuperviewSpacing && | |
this.clientNameLabel.Top() == this.ContentView.Top() + Layout.StandardSiblingViewSpacing && | |
this.createdLabel.Left() == this.clientNameLabel.Right() + Layout.StandardSiblingViewSpacing && | |
this.createdLabel.CenterY() == this.ContentView.CenterY() && | |
this.createdLabel.Right() == this.ContentView.Right() - Layout.StandardSuperviewSpacing && | |
this.referenceLabel.Left() == this.clientNameLabel.Left() && |
OlderNewer