本文整理汇总了C#中IExceptionHandler类的典型用法代码示例。如果您正苦于以下问题:C# IExceptionHandler类的具体用法?C# IExceptionHandler怎么用?C# IExceptionHandler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IExceptionHandler类属于命名空间,在下文中一共展示了IExceptionHandler类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetHandler
public static void SetHandler(IExceptionHandler handler)
{
lock (_lock)
{
_handler = handler;
}
}
示例2: DefaultApplicationConfigurationGetter
public DefaultApplicationConfigurationGetter(
IExceptionHandler exceptionHandler,
List<IHttpEndpoint> httpEndpoints)
{
_exceptionHandler = exceptionHandler;
_httpEndpoints = httpEndpoints;
}
示例3: AddFromImdbId
internal static Task AddFromImdbId(INovaromaEngine engine, IExceptionHandler exceptionHandler, IDialogService dialogService, string imdbId) {
var viewModel = new NewMediaWizardViewModel(engine, exceptionHandler, dialogService);
var t = viewModel.AddFromImdbId(imdbId);
new NewMediaWizard(viewModel).ForceShow();
return t;
}
示例4: NewMedia
internal static Task NewMedia(INovaromaEngine engine, IExceptionHandler exceptionHandler, IDialogService dialogService, string searchQuery = null, string parentDirectory = null) {
var viewModel = new NewMediaWizardViewModel(engine, exceptionHandler, dialogService);
var t = viewModel.AddFromSearch(searchQuery, parentDirectory);
new NewMediaWizard(viewModel).ForceShow();
return t;
}
示例5: ValueStack
public ValueStack(IExceptionHandler handler, IExpressionContext expressionContext)
{
Values = new CustomDictionary();
_exceptionHandler = handler;
_evaluator = expressionContext.CreateEvaluator(this);
Persistables = new Dictionary<string, IPersistable>();
}
示例6: ArticleService
public ArticleService(IUnitOfWork unitOfWork, IExceptionHandler exceptionHandler)
{
this.unitOfWork = unitOfWork;
this.articleRepository = unitOfWork.ArticleRepository;
this.articleVersionRepository = unitOfWork.ArticleVersionRepository;
this.exceptionHandler = exceptionHandler;
}
示例7: HandleAsyncCore
private static async Task<HttpResponseMessage> HandleAsyncCore(IExceptionHandler handler,
ExceptionHandlerContext context, CancellationToken cancellationToken)
{
Contract.Assert(handler != null);
Contract.Assert(context != null);
await handler.HandleAsync(context, cancellationToken);
IHttpActionResult result = context.Result;
if (result == null)
{
return null;
}
HttpResponseMessage response = await result.ExecuteAsync(cancellationToken);
if (response == null)
{
throw new InvalidOperationException(Error.Format(SRResources.TypeMethodMustNotReturnNull,
typeof(IHttpActionResult).Name, "ExecuteAsync"));
}
return response;
}
示例8: HandleExceptionAndRetryActionDecorator
protected HandleExceptionAndRetryActionDecorator(ITaskAction action, IExceptionHandler exceptionHandler)
{
RetryInterval = BackoffInterval.Default;
_action = action;
_exceptionHandler = exceptionHandler;
}
示例9: PlayShellView
public PlayShellView(IEventAggregator eventBus, UserSettings settings,
INotificationCenterMessageHandler handler,
IDialogManager dialogManager, IExceptionHandler exceptionHandler) {
InitializeComponent();
Loaded += (sender, args) => DialogHelper.MainWindowLoaded = true;
_userSettings = settings;
_handler = handler;
_dialogManager = dialogManager;
_exceptionHandler = exceptionHandler;
_snow = new Snow(ContentCanvas, eventBus);
WorkaroundSystemMenu_Init();
this.WhenActivated(d => {
d(UserError.RegisterHandler<CanceledUserError>(x => CanceledHandler(x)));
d(UserError.RegisterHandler<NotLoggedInUserError>(x => NotLoggedInDialog(x)));
d(UserError.RegisterHandler<NotConnectedUserError>(x => NotConnectedDialog(x)));
d(UserError.RegisterHandler<BusyUserError>(x => BusyDialog(x)));
d(this.WhenAnyValue(x => x.ViewModel).BindTo(this, v => v.DataContext));
d(this.OneWayBind(ViewModel, vm => vm.Overlay.ActiveItem, v => v.MainScreenFlyout.ViewModel));
d(this.OneWayBind(ViewModel, vm => vm.SubOverlay, v => v.SubscreenFlyout.ViewModel));
d(this.OneWayBind(ViewModel, vm => vm.StatusFlyout, v => v.StatusFlyout.ViewModel));
d(this.WhenAnyObservable(x => x.ViewModel.ActivateWindows)
.ObserveOn(RxApp.MainThreadScheduler)
.Subscribe(x => DialogHelper.ActivateWindows(x)));
d(_userSettings.AppOptions.WhenAnyValue(x => x.DisableEasterEggs)
.ObserveOn(RxApp.MainThreadScheduler)
.Subscribe(HandleEasterEgg));
d(TryCreateTrayIcon());
});
ThemeManager.IsThemeChanged += CustomThemeManager.ThemeManagerOnIsThemeChanged;
}
示例10: MobileDevicesEditor
/// <summary>
/// Initializes a new instance of the <see cref="MobileDevicesEditor"/> class.
/// </summary>
/// <param name="synchronizationService">The synchronization service to be used
/// for manipulating devices at the tracking service.</param>
/// <param name="resourceProvider">The instance of resource provider for obtaining
/// messages.</param>
/// <param name="workingStatusController">The instance of the controller to be used
/// for managing application status.</param>
/// <param name="exceptionHandler">The exception handler for tracking service
/// related errors.</param>
/// <exception cref="ArgumentNullException"><paramref name="synchronizationService"/>,
/// <paramref name="resourceProvider"/>, <paramref name="workingStatusController"/>,
/// <paramref name="exceptionHandler"/> or <paramref name="project"/> is a null
/// reference.</exception>
public MobileDevicesEditor(
ISynchronizationService synchronizationService,
IWorkingStatusController workingStatusController,
IExceptionHandler exceptionHandler,
IProject project)
{
if (synchronizationService == null)
{
throw new ArgumentNullException("synchronizationService");
}
if (workingStatusController == null)
{
throw new ArgumentNullException("workingStatusController");
}
if (exceptionHandler == null)
{
throw new ArgumentNullException("exceptionHandler");
}
if (project == null)
{
throw new ArgumentNullException("project");
}
_synchronizationService = synchronizationService;
_workingStatusController = workingStatusController;
_exceptionHandler = exceptionHandler;
_project = project;
}
示例11: ConfigurationWindow
public ConfigurationWindow(NovaromaEngine engine, IExceptionHandler exceptionHandler, IDialogService dialogService) {
InitializeComponent();
_configurableEngine = engine;
_engine = engine;
_downloader = engine.Settings.Downloader.SelectedItem as IConfigurable;
_exceptionHandler = exceptionHandler;
_dialogService = dialogService;
_initialMovieDir = engine.MovieDirectory;
_initialTvShowDir = engine.TvShowDirectory;
_engineSettings = engine.Settings;
var utor = _downloader as UTorrentDownloader;
if (utor != null && utor.IsAvailable) {
_torrentSettings = utor.Settings;
TorrentHowToHyperink.NavigateUri = new Uri(Properties.Resources.Url_HowToConfigureUtorrentWebUISettings);
}
else {
var trantor = _downloader as TransmissionDownloader;
if (trantor != null) {
_torrentSettings = trantor.Settings;
TorrentHowToHyperink.NavigateUri = new Uri(Properties.Resources.Url_HowToConfigureTransmissionWebUISettings);
}
}
if (_torrentSettings == null)
TorrentSettingsExpander.Visibility = Visibility.Collapsed;
else if (_downloader != null)
TorrentSettingsExpander.Tag = string.Format(Properties.Resources.TorrentWebUISettings, _downloader.SettingName);
DataContext = this;
Closing += OnClosing;
}
示例12: FeatureSnapshot
public FeatureSnapshot(IExceptionHandler exceptionhandler)
: base("snapshot", "control/feature-snapshot", "control/snapshot/action",true, exceptionhandler)
{
actionKey = wmisession.GetXenStoreItem("control/snapshot/action");
typeKey = wmisession.GetXenStoreItem("control/snapshot/type");
statusKey = wmisession.GetXenStoreItem("control/snapshot/status");
threadlock = new object();
}
示例13: LanguageService
public LanguageService(IUnitOfWork unitOfWork, IExceptionHandler exceptionHandler, ILocalStorageService storageService, HttpContextBase context)
{
this.unitOfWork = unitOfWork;
this.languageRepository = unitOfWork.LanguageRepository;
this.exceptionHandler = exceptionHandler;
this.storageService = storageService;
this.context = context;
}
示例14: ExceptionHandledEventArgs
public ExceptionHandledEventArgs(IExceptionHandler handler, Exception exception)
{
if(handler == null)
throw new ArgumentNullException("handler");
this.Handler = handler;
this.Exception = exception;
}
示例15: DownloadSearchViewModel
public DownloadSearchViewModel(INovaromaEngine engine, IExceptionHandler exceptionHandler, IDialogService dialogService, IDownloadable downloadable, string directory)
: base(dialogService) {
_engine = engine;
_exceptionHandler = exceptionHandler;
_downloadable = downloadable;
_directory = directory;
_searchCommand = new RelayCommand(DoSearch, CanSearch);
}