internal static IObservable <T> CatchAndLog <T>( this IObservable <T> This, IExceptionHandlerService ExceptionService, IObservable <T> handledResult) { return(CatchAndLog <T>(This, ExceptionService, () => handledResult)); }
public UserController(ILogger <UserController> logger, IUserService userService, IMediaService mediaService, IExceptionHandlerService exceptionHandlerService) { Logger = logger; UserService = userService; MediaService = mediaService; ExceptionHandlerService = exceptionHandlerService; }
public DialogService(IDataService dataService, IExceptionHandlerService exceptionHandlerService) { _dataService = dataService; _exceptionHandlerService = exceptionHandlerService; InternalCommands.CreateNewRoleStart.RegisterCommand(new DelegateCommand <object>(CreateNewRoleStart)); InternalCommands.DeleteRoleStart.RegisterCommand(new DelegateCommand <Role>(DeleteRoleStart)); }
public DeleteRoleDialogViewModel(Role role, IDataService dataService, IExceptionHandlerService exceptionHandlerService) { _role = role; _dataService = dataService; _exceptionHandlerService = exceptionHandlerService; DeleteCommand = new DelegateCommand <object>(ExecuteDelete); CancelCommand = new DelegateCommand <object>(ExecuteCancel); }
public LocationListener( ICheckPermissionProvider permissionProvider, IExceptionHandlerService exceptionHandling, ISchedulerFactory scheduler, CLLocationManager locationManager = null) : base(permissionProvider, exceptionHandling, scheduler) { _locationManager = locationManager; PositionFactory = createPositionFromPlatform; }
public CustomerRepository(IDataService dataService, IExceptionHandlerService exceptionHandlerService, TaskManagementFilters fetchFilters) { Customers = new ObservableCollection <Customer>(); _dataService = dataService; _exceptionHandlerService = exceptionHandlerService; _fetchFilters = fetchFilters; ApplicationCommands.RefreshData.RegisterCommand(new DelegateCommand <object>(ExecuteRefresh)); }
public BaseService( IBaseRepository baseRepository, ICategoryRepository categoryRepository, ISettingRepository settingRepository) { this.baseRepository = baseRepository ?? throw new ArgumentNullException(nameof(baseRepository)); this.categoryRepository = categoryRepository ?? throw new ArgumentNullException(nameof(categoryRepository)); this.settingRepository = settingRepository ?? throw new ArgumentNullException(nameof(settingRepository)); this.exceptionHandlerService = new ExceptionHandlerService(ConfigurationManager.AppSettings["DFM.ExceptionHandling.Sentry.Environment"]); }
public LocationListener( ICheckPermissionProvider permissionProvider, IExceptionHandlerService exceptionHandling, ISchedulerFactory scheduler, LocationRequest locationRequest = null) : base(permissionProvider, exceptionHandling, scheduler) { mLocationRequest = locationRequest; mFusedLocationClient = LocationServices.GetFusedLocationProviderClient(GetContext()); _myCallback = new LocationCallbackImpl(); PositionFactory = createPositionFromPlatform; }
public static LocationListener Create ( IExceptionHandlerService exceptionHandler = null, ISchedulerFactory scheduler = null, ICheckPermissionProvider permissionProvider = null ) { scheduler = scheduler ?? CreateScheduler(); exceptionHandler = exceptionHandler ?? CreateExceptionHandler(); permissionProvider = permissionProvider ?? CreatePermissionProvider(scheduler); return(new LocationListener(permissionProvider, exceptionHandler, scheduler)); }
public DialogService(IDataService dataService, ICustomerRepository customerRepository, IUserRepository userRepository, IUserSession userSession, IExceptionHandlerService exceptionHandlerService) { _dataService = dataService; _customerRepository = customerRepository; _userRepository = userRepository; _userSession = userSession; _exceptionHandlerService = exceptionHandlerService; InternalCommands.CreateNewUserStart.RegisterCommand(new DelegateCommand <object>(CreateNewUserStart)); InternalCommands.InviteUsersStart.RegisterCommand(new DelegateCommand <object>(InviteUsersStart)); InternalCommands.EditUserPricesStart.RegisterCommand(new DelegateCommand <User>(EditUserPricesStart)); InternalCommands.EditUserStart.RegisterCommand(new DelegateCommand <User>(EditUserStart)); }
internal static IObservable <T> CatchAndLog <T>( this IObservable <T> This, IExceptionHandlerService ExceptionService, Func <IObservable <T> > handledResult) { return(This.Catch((Exception exc) => { if (!ExceptionService.LogException(exc)) { return Observable.Throw <T>(exc); } return handledResult(); })); }
public LocationListenerBase( ICheckPermissionProvider permissionProvider, IExceptionHandlerService exceptionHandling, ISchedulerFactory scheduler) { _scheduler = scheduler ?? throw new ArgumentNullException(nameof(scheduler)); _exceptionHandling = exceptionHandling ?? throw new ArgumentNullException(nameof(exceptionHandling)); _permissionProvider = permissionProvider ?? throw new ArgumentNullException(nameof(permissionProvider)); _isListeningForChangesObs = new BehaviorSubject <bool>(false); _isListeningForChangesImperative = false; _PositionChanged = new Lazy <IObservable <LocationRecorded> >(createPositionChanged); }
public static IObservable <bool> CheckLocationPermission ( this ICheckPermissionProvider permissionProvider, IExceptionHandlerService exceptionHandler ) => permissionProvider .Location .Select(result => { if (!result) { exceptionHandler.LogException(new LocationActivationException(ActivationFailedReasons.PermissionsIssue)); return(false); } return(true); });
public MainViewModel(IUserSession userSession, IDataService dataService, IExceptionHandlerService exceptionHandlerService) { _dataService = dataService; _exceptionHandlerService = exceptionHandlerService; _userSession = userSession; InternalCommands.CreateNewRoleCompleted.RegisterCommand(new DelegateCommand <object>(BindRoles)); InternalCommands.DeleteRoleCompleted.RegisterCommand(new DelegateCommand <object>(BindRoles)); CreateNewRoleCommand = new DelegateCommand <object>(ExecuteCreateNewRole); DeleteRoleCommand = new DelegateCommand <object>(ExecuteDeleteRole, CanDeleteRole); SaveChangesCommand = new DelegateCommand <object>(ExecuteSaveChanges, CanSave); RefreshRolesCommand = new DelegateCommand <object>(ExecuteRefreshRoles); BindRoles(null); _clientApplicationId = 1; }
public MainViewModel(IDataService dataService, IExceptionHandlerService exceptionHandlerService, IUserRepository userRepository) { CreateCommand = new DelegateCommand <object>(ExecuteCreateNewUser); EditCommand = new DelegateCommand <object>(ExecuteEditUser, CanEditUser); InviteCommand = new DelegateCommand <object>(ExecuteInviteUsers); SaveCommand = new DelegateCommand <object>(ExecuteSaveCommand, CanExecuteSave); CancelCommand = new DelegateCommand <object>(ExecuteCancel, CanExecuteSave); EditPricesCommand = new DelegateCommand <object>(ExecuteEditUserPrices, CanEditUserPrices); DeleteUserCommand = new DelegateCommand <object>(ExecuteDeleteUser, CanDeleteUser); InternalCommands.InviteUsersCompleted.RegisterCommand(new DelegateCommand <object>(InviteUsersCompleted)); InternalCommands.CreateNewUserCompleted.RegisterCommand(new DelegateCommand <int?>(CreateNewUserCompleted)); InternalCommands.DeleteUser.RegisterCommand(new DelegateCommand <User>(ExecuteDeleteUser)); InternalCommands.ReloadUsers.RegisterCommand(new DelegateCommand(BindUsers)); _dataService = dataService; _exceptionHandlerService = exceptionHandlerService; _userRepository = userRepository; BindUsers(); }
public EditUserPricesDialogViewModel(User user, ICustomerRepository customerRepository, IDataService dataService, IExceptionHandlerService exceptionHandlerService) { _deleteCustomerInfo = new DelegateCommand <UsersCustomer>(DeleteCustomerInfo); AddCommand = new DelegateCommand <object>(ExecuteAdd, CanExecuteAdd); SaveCommand = new DelegateCommand <object>(ExecuteSaveCommand, CanExecuteSave); CancelCommand = new DelegateCommand <object>(ExecuteCancel); InternalCommands.DeleteCustomerInfo.RegisterCommand(_deleteCustomerInfo); _user = user; _tempUser = user.DeepCopy(); _customerRepository = customerRepository; _dataService = dataService; _exceptionHandlerService = exceptionHandlerService; Customers = new ObservableCollection <Customer>(); InitializePrices(); InitializeCustomers(); }
/// <summary> /// Handles an unhandled exception. /// </summary> /// <param name="exceptionObject">The exception object.</param> /// <param name="isTerminating">if set to <c>true</c> [is terminating].</param> private static void HandleException(object exceptionObject, bool isTerminating) { try { IExceptionHandlerService service = Services.GetService <IExceptionHandlerService>(true); service.HandleException(exceptionObject, isTerminating); } catch (ServiceNotFoundException) { Console.WriteLine("FATAL ERROR: ", exceptionObject); } catch (Exception ex) { try { Console.WriteLine("An exception occured while processing an unhandled exception: ", ex); } catch { // Here, we are allowed to eat the exception ;-) } } }
public PublicationController(ILogger <PublicationController> logger, IPublicationService publicationService, IExceptionHandlerService exceptionHandlerService) { Logger = logger; PublicationService = publicationService; ExceptionHandlerService = exceptionHandlerService; }
/// <summary> /// Initializes a new instance of the <see cref="AppExceptionLogger" /> class. /// </summary> /// <param name="exceptionHandlerService">The exception handling service.</param> public AppExceptionLogger(IExceptionHandlerService exceptionHandlerService) { this.ExceptionHandlerService = exceptionHandlerService; }
public UserRepository(IDataService dataService, IExceptionHandlerService exceptionHandlerService) { _dataService = dataService; _exceptionHandlerService = exceptionHandlerService; }
public MvcApplication() { this.exceptionHandlerService = new ExceptionHandlerService(ConfigurationManager.AppSettings["DFM.ExceptionHandling.Sentry.Environment"]); }
public FeedController(ILogger <FeedController> logger, IFeedService feedService, IExceptionHandlerService exceptionHandlerService) { Logger = logger; FeedService = feedService; ExceptionHandlerService = exceptionHandlerService; }
public MediaController(ILogger <MediaController> logger, IExceptionHandlerService exceptionHandlerService, IMediaService mediaService) { Logger = logger; ExceptionHandlerService = exceptionHandlerService; MediaService = mediaService; }
public ExceptionInterceptor(IExceptionHandlerService handlerService) => _exceptionHandlerService =
public static HttpConfiguration ConfigureExceptionHandling(this HttpConfiguration httpConfiguration, IExceptionHandlerService exceptionHandlerService) { httpConfiguration.Services.Add(typeof(IExceptionLogger), new AppExceptionLogger(exceptionHandlerService)); return(httpConfiguration); }
public LocationListener( ICheckPermissionProvider permissionProvider, IExceptionHandlerService exceptionHandling, ISchedulerFactory scheduler) { }