public PushService(IMTProtoService protoService, ICacheService cacheService) { _protoService = protoService; _cacheService = cacheService; _registrationLock = new DisposableMutex(); }
public ContactsService(IMTProtoService protoService, ITelegramEventAggregator aggregator) { _protoService = protoService; _aggregator = aggregator; _syncLock = new DisposableMutex(); _importedPhonesRoot = new object(); }
public ChatSearchViewModel(IProtoService protoService, ICacheService cacheService, ISettingsService settingsService, IEventAggregator aggregator, DialogViewModel viewModel) : base(protoService, cacheService, settingsService, aggregator) { _dialog = viewModel; _loadMoreLock = new DisposableMutex(); NextCommand = new RelayCommand(NextExecute, NextCanExecute); PreviousCommand = new RelayCommand(PreviousExecute, PreviousCanExecute); }
public ContactsService(IProtoService protoService, ICacheService cacheService, IEventAggregator aggregator) { _protoService = protoService; _cacheService = cacheService; _aggregator = aggregator; _syncLock = new DisposableMutex(); _importedPhonesRoot = new object(); }
public NotificationsService(IProtoService protoService, ICacheService cacheService, IEventAggregator aggregator) { _protoService = protoService; _cacheService = cacheService; _aggregator = aggregator; _registrationLock = new DisposableMutex(); _aggregator.Subscribe(this); }
public DialogSearchViewModel(IProtoService protoService, ICacheService cacheService, IEventAggregator aggregator, DialogViewModel viewModel) : base(protoService, cacheService, aggregator) { _dialog = viewModel; _loadMoreLock = new DisposableMutex(); FilterCommand = new RelayCommand(FilterExecute); NextCommand = new RelayCommand(NextExecute, NextCanExecute); PreviousCommand = new RelayCommand(PreviousExecute, PreviousCanExecute); SearchCommand = new RelayCommand <string>(SearchExecute); }
public ContactsViewModel(IProtoService protoService, ICacheService cacheService, ISettingsService settingsService, IEventAggregator aggregator, IContactsService contactsService) : base(protoService, cacheService, settingsService, aggregator) { _contactsService = contactsService; _loadMoreLock = new DisposableMutex(); Items = new SortedObservableCollection <User>(new UserComparer(Settings.IsContactsSortedByEpoch)); Initialize(); }
public NotificationsService(IProtoService protoService, ICacheService cacheService, ISettingsService settingsService, IEventAggregator aggregator) { _protoService = protoService; _cacheService = cacheService; _settings = settingsService; _aggregator = aggregator; _registrationLock = new DisposableMutex(); _aggregator.Subscribe(this); Handle(new UpdateUnreadMessageCount(protoService.UnreadCount, protoService.UnreadUnmutedCount)); }
public ContactsService(IProtoService protoService, ICacheService cacheService, ISettingsService settingsService, IEventAggregator aggregator) { _protoService = protoService; _cacheService = cacheService; _settingsService = settingsService; _aggregator = aggregator; _syncLock = new DisposableMutex(); _importedPhonesRoot = new object(); _contacts = new HashSet <long>(); _aggregator.Subscribe <Telegram.Td.Api.UpdateAuthorizationState>(this, Handle); }
public ContactsService(IProtoService protoService, ICacheService cacheService, ISettingsService settingsService, IEventAggregator aggregator) { _protoService = protoService; _cacheService = cacheService; _settingsService = settingsService; _aggregator = aggregator; _syncLock = new DisposableMutex(); _importedPhonesRoot = new object(); _contacts = new HashSet <int>(); _aggregator.Subscribe(this); }
public NotificationsService(IProtoService protoService, ICacheService cacheService, ISettingsService settingsService, ISessionService sessionService, IEventAggregator aggregator) { _protoService = protoService; _cacheService = cacheService; _settings = settingsService; _sessionService = sessionService; _aggregator = aggregator; _registrationLock = new DisposableMutex(); _aggregator.Subscribe(this); var unreadCount = _cacheService.GetUnreadCount(new ChatListMain()); Handle(unreadCount.UnreadChatCount); Handle(unreadCount.UnreadMessageCount); }
/// <summary>Removes the first occurence of an item from the pool.</summary> /// <param name="item">The item to remove from the pool.</param> /// <param name="mutex">The mutex to use when removing an item from the pool.</param> /// <returns><c>true</c> if <paramref name="item" /> was removed from the pool; otherwise, <c>false</c>.</returns> public bool Remove(T item, ValueMutex mutex) { using var disposableMutex = new DisposableMutex(mutex, isExternallySynchronized: false); return(Remove(item)); }
private MediaLibraryCollection() { _dispatcher = Window.Current.Dispatcher; _loadMoreLock = new DisposableMutex(); }
public ContactsService() { _syncLock = new DisposableMutex(); }