View NotificationsViewModel.cs
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 NotificationsViewModel : AppBaseViewModel | |
{ | |
private readonly INotificationService _notificationService; | |
private readonly INotificationPresenter _presenter; | |
public NotificationsViewModel(INotificationPresenter presenter, INotificationService notificationService) | |
{ | |
_presenter = presenter; | |
_notificationService = notificationService; | |
} |
View INotificationService.cs
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 interface INotificationsService | |
{ | |
Task LoadNotifications(); | |
ObservableProperty<int> NotificationsCount { get; } | |
} |
View ObservableProperty.cs
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 ObservableProperty<T> : ExtendedBindableObject, IObservableObject<T> | |
{ | |
readonly List<ValueObserver<T>> _subscribers = new List<ValueObserver<T>>(); | |
T _value; | |
public virtual T Value | |
{ | |
get | |
{ | |
return _value; |
View IObservableObject.cs
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 interface IObservableObject<T> | |
{ | |
Guid Subscribe(Action<T> onNext); | |
void Unsubscribe(Guid guid); | |
} |
View SearchViewModel.cs
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
private async Task BeginSearch() | |
{ | |
ShowBusy = true; | |
await _navigationService.NavigateToAsync<AllItemsViewModel>(SearchText); | |
ShowBusy = false; | |
} |
View BaseView.cs
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
using System; | |
using System.Threading.Tasks; | |
using App.Common.Core.ViewModels; | |
using Xamarin.Forms; | |
namespace App.Common.Core.Views | |
{ | |
public abstract class BaseView : ContentPage | |
{ | |
public BaseView() |
View AppContainer.cs
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
using System; | |
using App.Common.Core.ViewModels; | |
using App.Common.Core.Services.Network; | |
using App.Common.Core.Services.Data; | |
using Autofac; | |
using Xamarin.Forms; | |
using System.Reflection; | |
using App.Common.Core.Services.App; | |
#if AUTOMATION |
View BaseViewModel.cs
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
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Linq.Expressions; | |
using System.Reflection; | |
using System.Runtime.CompilerServices; | |
using System.Threading.Tasks; | |
using Xamarin.Forms; | |
namespace App.Common.Core.ViewModels |
NewerOlder