• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IExceptionHandler类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IExceptionHandler的典型用法代码示例。如果您正苦于以下问题:C# IExceptionHandler类的具体用法?C# IExceptionHandler怎么用?C# IExceptionHandler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IExceptionHandler类属于命名空间,在下文中一共展示了IExceptionHandler类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: SetHandler

 public static void SetHandler(IExceptionHandler handler)
 {
     lock (_lock)
     {
         _handler = handler;
     }
 }
开发者ID:leehavin,项目名称:linfu,代码行数:7,代码来源:ExceptionHandlerRegistry.cs


示例2: DefaultApplicationConfigurationGetter

 public DefaultApplicationConfigurationGetter(
     IExceptionHandler exceptionHandler, 
     List<IHttpEndpoint> httpEndpoints)
 {
     _exceptionHandler = exceptionHandler;
     _httpEndpoints = httpEndpoints;
 }
开发者ID:vlindos,项目名称:Vlindos,代码行数:7,代码来源:DefaultApplicationConfigurationGetter.cs


示例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;
        }
开发者ID:XMotoGodX,项目名称:novaroma,代码行数:7,代码来源:Helper.cs


示例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;
        }
开发者ID:XMotoGodX,项目名称:novaroma,代码行数:7,代码来源:Helper.cs


示例5: ValueStack

 public ValueStack(IExceptionHandler handler, IExpressionContext expressionContext)
 {
     Values = new CustomDictionary();
     _exceptionHandler = handler;
     _evaluator = expressionContext.CreateEvaluator(this);
     Persistables = new Dictionary<string, IPersistable>();
 }
开发者ID:Fedorm,项目名称:core-master,代码行数:7,代码来源:ValueStack.cs


示例6: ArticleService

 public ArticleService(IUnitOfWork unitOfWork, IExceptionHandler exceptionHandler)
 {
     this.unitOfWork = unitOfWork;
     this.articleRepository = unitOfWork.ArticleRepository;
     this.articleVersionRepository = unitOfWork.ArticleVersionRepository;
     this.exceptionHandler = exceptionHandler;
 }
开发者ID:porl88,项目名称:Website-MVC,代码行数:7,代码来源:ArticleService.cs


示例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;
        }
开发者ID:huangw-t,项目名称:aspnetwebstack,代码行数:25,代码来源:ExceptionHandlerExtensions.cs


示例8: HandleExceptionAndRetryActionDecorator

        protected HandleExceptionAndRetryActionDecorator(ITaskAction action, IExceptionHandler exceptionHandler)
        {
            RetryInterval = BackoffInterval.Default;

            _action = action;
            _exceptionHandler = exceptionHandler;
        }
开发者ID:BrianZell,项目名称:TaskActions,代码行数:7,代码来源:HandleExceptionAndRetryActionDecorator.cs


示例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;
        }
开发者ID:MaHuJa,项目名称:withSIX.Desktop,代码行数:35,代码来源:PlayShellView.xaml.cs


示例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;
        }
开发者ID:erindm,项目名称:route-planner-csharp,代码行数:46,代码来源:MobileDevicesEditor.cs


示例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;
        }
开发者ID:XMotoGodX,项目名称:novaroma,代码行数:34,代码来源:ConfigurationWindow.xaml.cs


示例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();
 }
开发者ID:benchalmers,项目名称:win-xenguestagent,代码行数:8,代码来源:Snapshot.cs


示例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;
 }
开发者ID:porl88,项目名称:Website-MVC,代码行数:8,代码来源:LanguageService.cs


示例14: ExceptionHandledEventArgs

		public ExceptionHandledEventArgs(IExceptionHandler handler, Exception exception)
		{
			if(handler == null)
				throw new ArgumentNullException("handler");

			this.Handler = handler;
			this.Exception = exception;
		}
开发者ID:MetSystem,项目名称:Zongsoft.CoreLibrary,代码行数:8,代码来源:ExceptionHandledEventArgs.cs


示例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);
 }
开发者ID:XMotoGodX,项目名称:novaroma,代码行数:8,代码来源:DownloadSearchViewModel.cs


示例16: LastChanceExceptionHandler

        public LastChanceExceptionHandler(IExceptionHandler innerHandler)
        {
            if (innerHandler == null)
            {
                throw Error.ArgumentNull("innerHandler");
            }

            this.innerHandler = innerHandler;
        }
开发者ID:ctguxp,项目名称:Waffle,代码行数:9,代码来源:LastChanceExceptionHandler.cs


示例17: StepClassInvoker

 public StepClassInvoker(StepType stepType, Type stepClass, KeyValuePair<string,object>[] supportedParameters, IExceptionHandler exceptionHandler)
 {
     if (!typeof(Step).IsAssignableFrom(stepClass))
         throw new ArgumentException("The stepClass must inherit from Step", "stepClass");
     _stepClass = stepClass;
     _exceptionHandler = exceptionHandler;
     Type = stepType;
     Name = new StepName(Type, _stepClass.Name, supportedParameters);
     Parameters = _stepClass.GetConstructors().Single().BindParameters(supportedParameters);
 }
开发者ID:CaseyMacPherson,项目名称:Kekiri,代码行数:10,代码来源:StepClassInvoker.cs


示例18: AddExceptionIntercept

        /// <summary>
        /// Adds the exception intercept.
        /// </summary>
        /// <param name="builder">The builder.</param>
        /// <param name="exceptionIntercept">The exception intercept.</param>
        /// <returns></returns>
        public static IApplicationBuilder AddExceptionIntercept(this IApplicationBuilder builder, IExceptionHandler exceptionInspector)
        {
            var exceptionManager = builder.ApplicationServices.GetService<IExceptionInterceptManager>();
            if (exceptionManager != null)
            {
                exceptionManager.AddExceptionIntercept(exceptionInspector);
            }

            return builder;
        }
开发者ID:codematrix,项目名称:blogdemos,代码行数:16,代码来源:ExceptionInterceptExtensions.cs


示例19: ConsoleApplication

		public ConsoleApplication(ICommandParser commandParser,
		                          IResultHandler resultHandler,
		                          IInput input,
		                          IExceptionHandler exceptionHandler)
		{
			_commandParser = commandParser;
			_resultHandler = resultHandler;
			_input = input;
			_exceptionHandler = exceptionHandler;
		}
开发者ID:raderick,项目名称:MixPanel.CsExport,代码行数:10,代码来源:ConsoleApplication.cs


示例20: WebTokenCreator

 public WebTokenCreator(
     IExceptionHandler exceptionHandler,
     IFactory<ITemporaryCredentials> applicationCredentialsUnityFactory,
     IOAuthWebRequestGenerator oAuthWebRequestGenerator,
     ITwitterRequestHandler twitterRequestHandler)
 {
     _exceptionHandler = exceptionHandler;
     _applicationCredentialsUnityFactory = applicationCredentialsUnityFactory;
     _oAuthWebRequestGenerator = oAuthWebRequestGenerator;
     _twitterRequestHandler = twitterRequestHandler;
 }
开发者ID:Murtaza-libs,项目名称:tweetinvi,代码行数:11,代码来源:WebTokenCreator.cs



注:本文中的IExceptionHandler类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IExecutionContext类代码示例发布时间:2022-05-24
下一篇:
C# IExampleInterface类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap