Skip to content

Instantly share code, notes, and snippets.

View rdelrosario's full-sized avatar

Rendy Del Rosario rdelrosario

View GitHub Profile
namespace ReactiveToDoSample
{
public class RxExceptionHandler : IObserver<Exception>
{
public void OnNext(Exception ex)
{
if (Debugger.IsAttached)
{
Debugger.Break();
}
namespace ReactiveToDoSample.ViewModels
{
public abstract class ViewModelBase : ReactiveObject, IDisposable, INavigable
{
protected ViewModelBase(IParameterViewStackService viewStackService) => NavigationService = viewStackService;
public abstract string Id { get; }
public virtual IObservable<Unit> WhenNavigatedFrom(INavigationParameter parameter) => Observable.Return(Unit.Default);
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="DynamicDataGroupingSample.NotificationConfigurationsPage"
Title="Notification Settings">
<CollectionView ItemsSource="{Binding NotificationGroups}"
IsGrouped="True">
<CollectionView.GroupHeaderTemplate>
<DataTemplate>
<Label Padding="10"
namespace DynamicDataGroupingSample
{
public class NotificationConfigurationViewModel : ReactiveObjectEx
{
public NotificationConfigurationViewModel()
{
...
var smsChannelChangedCommand = ReactiveCommand.CreateFromTask<NotificationConfiguration>(OnSmsChannelChanged);
var emailChannelChangedCommand = ReactiveCommand.CreateFromTask<NotificationConfiguration>(OnEmailChannelChanged);
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Reactive.Disposables;
using System.Reactive.Linq;
using DynamicData;
using DynamicData.Binding;
using ReactiveUI;
namespace DynamicDataGroupingSample
namespace DynamicDataGroupingSample
{
public class NotificationConfigurationViewModel : ReactiveObjectEx
{
public NotificationConfigurationViewModel()
{
_notificationConfigurationsSourceCache.AddOrUpdate(new List<NotificationConfiguration>()
{
new NotificationConfiguration("Information", 0,"Development", 0,false, false, true, false),
new NotificationConfiguration("Status Changed", 1,"Administration", 1, false, true, false, false),
using System;
using System.Reactive.Disposables;
using ReactiveUI;
namespace DynamicDataGroupingSample
{
public abstract class ReactiveObjectEx : ReactiveObject, IDisposable
{
/// <summary>
/// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
using ReactiveUI;
namespace DynamicDataGroupingSample
{
public class NotificationConfiguration : ReactiveObjectEx
{
public NotificationConfiguration(string name, int order, string groupName, int groupOrder,bool smsChannel, bool emailChannel, bool pushNotificationChannel, bool phoneChannel)
{
Name = name;
Order = order;
namespace App
{
public partial class ExtendedMap : Map
{
public static readonly BindableProperty TappedCommandProperty =
BindableProperty.Create(nameof(TappedCommand), typeof(DelegateCommand<object>), typeof(ExtendedMap), default(DelegateCommand<object>));
public DelegateCommand<object> TappedCommand
{
get { return (DelegateCommand<object>)GetValue(TappedCommandProperty); }
mBraintreeFragment = BraintreeFragment.NewInstance((AppCompatActivity)CrossCurrentActivity.Current.Activity, clientToken);