public EmailService(IConfiguration configuration, IExceptionService exceptionService, IClientFactory clientFactory) { _configuration = configuration; _appSettings = _configuration.Get <AppSettings>(); _exceptionService = exceptionService; _clientFactory = clientFactory; }
/// <summary> /// Processes asynchrounously the specified action with possibilty to retry on error. /// </summary> /// <typeparam name="TResult">The result type.</typeparam> /// <param name="exceptionService">The exception service.</param> /// <param name="action">The action.</param> /// <param name="cancellationToken">The cancellation token.</param> /// <returns></returns> /// <exception cref="ArgumentNullException">The <paramref name="action"/> is <c>null</c>.</exception> public static Task <TResult> ProcessWithRetryAsync <TResult>(this IExceptionService exceptionService, Func <TResult> action, CancellationToken cancellationToken = new CancellationToken()) { Argument.IsNotNull("exceptionService", exceptionService); Argument.IsNotNull("action", action); return(TaskHelper.Run(() => exceptionService.ProcessWithRetry(action), cancellationToken)); }
public UploadFileController(IExceptionService exceptionService, IFileDownloadUpload fileDownloadUpload, IImageService image, IHostEnvironment hostingEnvironment) { _exceptionService = exceptionService ?? throw new ArgumentNullException(nameof(exceptionService)); _fileUpload = fileDownloadUpload ?? throw new ArgumentNullException(nameof(fileDownloadUpload)); _imageService = image ?? throw new ArgumentNullException(nameof(image)); _hostingEnvironment = hostingEnvironment ?? throw new ArgumentNullException(nameof(hostingEnvironment)); }
public DashboardService(ILocalizationService localizationSVC, INotificationService notificationSVC, IExceptionService exceptionSVC, IWorkFlowService workflowSVC, ICommonService commonSVC, IRepository <Employee> employeeRepo, IRepository <AttendanceLog> attendanceLogRepo, IRepository <FiscalYear> fiscalYearRepo, IRepository <LeaveApplication> leaveApplicationRepo, IRepository <LeaveType> leaveTypeRepo, IRepository <LeaveCategory> leaveCategoryRepo, IRepository <TravelApplication> travelApplicationRepo, IRepository <TravelCategory> travelCategoryRepo, IRepository <TravelType> travelTypeRepo, IRepository <ItemRequest> itemRequestRepo, IRepository <ItemRequestDetail> itemRequestDetailRepo) { localizationService = localizationSVC; this.notificationService = notificationSVC; exceptionService = exceptionSVC; workflowService = workflowSVC; commonService = commonSVC; employeeRepository = employeeRepo; attendanceLogRepository = attendanceLogRepo; fiscalYearRepository = fiscalYearRepo; leaveApplicationRepository = leaveApplicationRepo; leaveTypeRepository = leaveTypeRepo; leaveCategoryRepository = leaveCategoryRepo; travelApplicationRepository = travelApplicationRepo; travelCategoryRepository = travelCategoryRepo; travelTypeRepository = travelTypeRepo; itemRequestRepository = itemRequestRepo; itemRequestDetailRepository = itemRequestDetailRepo; }
public ServiceParameters(IOrganizationService organizationService, IMetadataService metadataService, INotificationService notificationService, IExceptionService exceptionService) { OrganizationService = organizationService; MetadataService = metadataService; NotificationService = notificationService; ExceptionService = exceptionService; }
public HomeController(ILocationService locationService, IUserService userService, IExceptionService exceptionService) : base(userService, exceptionService) { _locationService = locationService; }
/// <summary> /// Processes the specified action with possibilty to retry on error. /// </summary> /// <param name="exceptionService">The exception service.</param> /// <param name="action">The action.</param> /// <exception cref="ArgumentNullException">The <paramref name="action"/> is <c>null</c>.</exception> public static void ProcessWithRetry(this IExceptionService exceptionService, Action action) { Argument.IsNotNull("exceptionService", exceptionService); Argument.IsNotNull("action", action); exceptionService.ProcessWithRetry(() => { action(); return(default(object)); }); }
private void SendRegistrationToServer(string token) { ILoginViewModel login = ServiceLocator.Current.GetInstance <ILoginViewModel>(); hub = new NotificationHub(AppConfigurations.NotificationHubName, AppConfigurations.NotificationHubConnectionString, this); var tags = new List <string> { //"ucm" }; if (login != null && login.User != null && string.IsNullOrEmpty(login.User.UserName) == false) { //tags.Add(login.User.UserName); tags.Add(ServiceLocator.Current.GetInstance <ILoginViewModel>().User.UserName); } try { Task.Run(() => { hub.Unregister(); var regID = hub.Register(token, tags.ToArray()); }); } catch (Exception ex) { exceptionService = ServiceLocator.Current.GetInstance <IExceptionService>(); exceptionService.RegisterException(ex); } }
public MatchController(IMatchService pridctService, IMapper mapper, IExceptionService exceptionService, IPredictionService predictionService) { _mapper = mapper; _exceptionService = exceptionService; _matchService = pridctService; _predictionService = predictionService; }
public AdminController(IUserService service, IRoleService roleService, IExceptionService exceptionService) { _userService = service; _roleService = roleService; _exceptionService = exceptionService; }
public VehicleDataService( IExceptionService exceptionService, IVehicleRepository <VehicleDetailsModel> vehicleRepository) { _exceptionService = exceptionService; _vehicleRepository = vehicleRepository; }
public UserDataService( IExceptionService exceptionService, IUserDataRepository <UserDataModel> userDataRepository) { _exceptionService = exceptionService; _userRepository = userDataRepository; }
/// <summary> /// Processes asynchrounously the specified action with possibilty to retry on error. /// </summary> /// <param name="exceptionService">The exception service.</param> /// <param name="action">The action.</param> /// <exception cref="ArgumentNullException">The <paramref name="exceptionService"/> is <c>null</c>.</exception> /// <exception cref="ArgumentNullException">The <paramref name="action"/> is <c>null</c>.</exception> public static Task ProcessWithRetryAsync(this IExceptionService exceptionService, Task action) { Argument.IsNotNull("exceptionService", exceptionService); Argument.IsNotNull("action", action); return(exceptionService.ProcessWithRetryAsync(async() => { await action.ConfigureAwait(false); return default(object); })); }
public ReportController(IUserService userService, IExceptionService exceptionService, IReportService reportService, IHostingEnvironment environment) : base(userService, exceptionService) { _reportService = reportService; _environment = environment; }
public BurningService(IBurningReceiptsCatalog BurningReceiptsCatalog, IExceptionService ExceptionService, IProgressControllerFactory ProgressControllerFactory, IEventAggregator EventAggregator) { _burningReceiptsCatalog = BurningReceiptsCatalog; _exceptionService = ExceptionService; _progressControllerFactory = ProgressControllerFactory; _burningStartedEvent = EventAggregator.GetEvent<BurningStartedEvent>(); }
public ExceptionController(IConfiguration config, ILogger <ExceptionController> logger, IExceptionService exceptionService) { _config = config; _logger = logger; _exceptionService = exceptionService; }
public FuelDataService( IExceptionService exceptionService, IFuelDataRepository <FuelDetailsModel> fuelRepository, IService <VehiclesDetailsDto> vehicleService) { _exceptionService = exceptionService; _fuelRepository = fuelRepository; _vehicleService = vehicleService; }
public EditModel( Context context, IRoomService roomService, IExceptionService exceptionService) { _context = context; _roomService = roomService; _exceptionService = exceptionService; }
//public int CountCompany { get; set; } //public int CountArticles { get; set; } //public int CountExceptionToday { get; set; } public ProfileController(IUserProfileService _userSrv, IExceptionService _excepSrv, IOrganizationService _orgSrv , IUserProfileService userSrv, IActionLogService _actionlogSrv) : base(userSrv) { this.userSrv = _userSrv; this.excepSrv = _excepSrv; this.orgSrv = _orgSrv; this.actionLogSrv = _actionlogSrv; }
public VisitController(IUserService userService, IExceptionService exceptionService, IMapper mapper, IVisitService visitService) : base(userService, exceptionService) { _mapper = mapper; _visitService = visitService; }
/// <summary> /// Registers an handler for a specific exception. /// </summary> /// <typeparam name="TExceptionHandler">The type of the exception handler.</typeparam> /// <param name="exceptionService">The exception service.</param> /// <returns>The handler to use.</returns> /// <exception cref="ArgumentNullException">The <paramref name="exceptionService"/> is <c>null</c>.</exception> public static IExceptionHandler Register <TExceptionHandler>(this IExceptionService exceptionService) where TExceptionHandler : IExceptionHandler, new() { Argument.IsNotNull("exceptionService", exceptionService); var exceptionHandler = new TExceptionHandler(); return(exceptionService.Register(exceptionHandler)); }
public UserdataService( IExceptionService exceptionService, IUserDataRepository userDataRepository, ILogger <UserdataService> logger) { _exceptionService = exceptionService; _userDataRepository = userDataRepository; _logger = logger; }
public VehicleDataSubscriberService( ILogger <VehicleDataService> logger, IExceptionService exceptionService, IVehicleDataRepository vehicleDataRepository) { _logger = logger; _exceptionService = exceptionService; _vehicleDataRepository = vehicleDataRepository; }
public VersionService(IExceptionService exceptionService, IConfiguration configuration, ILogger <VersionService> logger, IVersionRepository versionRepository) { _exceptionService = exceptionService; _configuration = configuration; _logger = logger; _versionRepository = versionRepository; _appSettings = configuration.Get <AppSettings>(); }
public GoodsController(IGoodsService goodsService, IExceptionService exceptionService, ILocationService locationService, IUserService userService, IArticleService articleService, IMapper mapper) : base(userService, exceptionService) { _goodsService = goodsService; _mapper = mapper; }
public EmployeeProfileService( ILocalizationService localizationSvc, IExceptionService exceptionSVC, IRepository <Employee> employeeRepo) { localizationService = localizationSvc; exceptionService = exceptionSVC; employeeRepository = employeeRepo; }
/// <summary> /// Handles asynchounously the specified exception if possible. /// </summary> /// <param name="exceptionService">The exception service.</param> /// <param name="exception">The exception to handle.</param> /// <param name="cancellationToken">The cancellation token.</param> /// <exception cref="ArgumentNullException">The <paramref name="exceptionService"/> is <c>null</c>.</exception> /// <exception cref="ArgumentNullException">The <paramref name="exception"/> is <c>null</c>.</exception> /// <returns><c>true</c> if the exception is handled; otherwise <c>false</c>.</returns> public static async Task <bool> HandleExceptionAsync(this IExceptionService exceptionService, Exception exception, CancellationToken cancellationToken = default(CancellationToken)) { Argument.IsNotNull("exceptionService", exceptionService); #if NET40 || SL5 || PCL return(await Task.Factory.StartNew(() => exceptionService.HandleException(exception), cancellationToken).ConfigureAwait(false)); #else return(await Task.Run(() => exceptionService.HandleException(exception), cancellationToken).ConfigureAwait(false)); #endif }
ExceptionListSettings(IExceptionService exceptionService, ISettingsService settingsService, Lazy<IDefaultExceptionSettings> defaultExceptionSettings) { this.exceptionService = exceptionService; this.settingsService = settingsService; this.defaultExceptionSettings = defaultExceptionSettings; exceptionService.Changed += ExceptionService_Changed; disableSaveCounter++; Load(); disableSaveCounter--; }
public UserController(IUserService userService, IExceptionService exceptionService, IRoleService roleService, ILocationService locationService, IMapper mapper) : base(userService, exceptionService) { _roleService = roleService; _locationService = locationService; _mapper = mapper; }
public BurningViewModelFactory(IBurningReceiptsCatalog BurningReceiptsCatalog, IIndexHelper IndexHelper, IExceptionService ExceptionService, IBurningService BurningService, IEventAggregator EventAggregator, ISettingsService SettingsService, BurningStatusViewModel BurningStatus) { _indexHelper = IndexHelper; _burningService = BurningService; _eventAggregator = EventAggregator; _settingsService = SettingsService; _burningStatus = BurningStatus; }
public AttachmentTypeController(IAttachmentTypeService attachmentTypeService, IUserService userService, IExceptionService exceptionService, IHostingEnvironment environment, IAttachmentService attachmentService, IMemoryCache memoryCache, IMapper mapper) : base(userService, exceptionService, environment, attachmentTypeService, attachmentService, memoryCache) { _mapper = mapper; }
public LoaderPageViewModel(IApiService apiService, IDialogService dialogService, IExceptionService exceptionService, IFileService fileService, INavigationService navigationService, ILoginViewModel loginViewModel, IPhoneService phoneService) { this.apiService = apiService; this.dialogService = dialogService; this.exceptionService = exceptionService; this.fileService = fileService; this.navigationService = navigationService; this.loginViewModel = loginViewModel; this.phoneService = phoneService; }
public SignalRClient(IConfiguration configuration, ITokenService tokenService, IExceptionService exceptionService) { _configuration = configuration; _tokenService = tokenService; _exceptionService = exceptionService; _tracer = TextWriter.Null; //ShowUserOnline = true; }
public ExceptionContext(IExceptionService exceptionService, IClassificationFormatMap classificationFormatMap, ITextElementProvider textElementProvider) { ExceptionService = exceptionService; ClassificationFormatMap = classificationFormatMap; TextElementProvider = textElementProvider; }
public ErrorHandlingInterceptor(IExceptionService exceptionService) { this.exceptionService = exceptionService; }
public ExceptionController(IExceptionService exceptionService, IProjectService projectService) { this.exceptionService = exceptionService; this.projectService = projectService; }
ExceptionsVM(IDebuggerSettings debuggerSettings, IExceptionService exceptionService, IExceptionListSettings exceptionListSettings, IGetNewExceptionName getNewExceptionName, IClassificationFormatMapService classificationFormatMapService, ITextElementProvider textElementProvider) { var classificationFormatMap = classificationFormatMapService.GetClassificationFormatMap(AppearanceCategoryConstants.UIMisc); this.debuggerSettings = debuggerSettings; this.exceptionService = exceptionService; this.exceptionListSettings = exceptionListSettings; this.getNewExceptionName = getNewExceptionName; exceptionContext = new ExceptionContext(exceptionService, classificationFormatMap, textElementProvider) { SyntaxHighlight = debuggerSettings.SyntaxHighlightExceptions, }; exceptionsList = new ObservableCollection<ExceptionVM>(); CollectionView = CollectionViewSource.GetDefaultView(exceptionsList); debuggerSettings.PropertyChanged += DebuggerSettings_PropertyChanged; exceptionService.Changed += ExceptionService_Changed; classificationFormatMap.ClassificationFormatMappingChanged += ClassificationFormatMap_ClassificationFormatMappingChanged; InitializeDefaultExceptions(); }