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

C# IErrorService类代码示例

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

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



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

示例1: ApplicationModule

        public ApplicationModule(IApplicationService applicationService, IErrorService error)
            : base("/application")
        {
            Post["/register"] = _ =>
            {
                if (Params.AreMissing("SingleUseToken", "Name")) return error.MissingParameters(Response);
                if (!Params.SingleUseToken.IsGuid()) return error.InvalidParameters(Response);
                if (!applicationService.AuthoriseSingleUseToken(Params.SingleUseToken)) return error.PermissionDenied(Response);

                var application = applicationService.Register(Params.Name);
                return (application == null) ? error.InvalidParameters(Response) : Response.AsJson(new { ApplicationId = application.Id });

            };

            Post["/transfer"] = _ =>
            {
                if (Params.AreMissing("SingleUseToken", "Name", "Id")) return error.MissingParameters(Response);
                if (!Params.Id.IsGuid() || !Params.SingleUseToken.IsGuid()) return error.InvalidParameters(Response);
                if (!applicationService.AuthoriseSingleUseToken(Params.SingleUseToken)) return error.PermissionDenied(Response);

                var application = applicationService.Transfer(Params.Name, Params.Id);
                return (application == null) ? error.InvalidParameters(Response) : Response.AsJson(new { ApplicationId = application.Id });

            };
        }
开发者ID:biofractal,项目名称:ThumbsUp,代码行数:25,代码来源:ApplicationModule.cs


示例2: ShellViewModel

 /// <summary>
 /// Initializes a new instance of the <see cref="ShellViewModel"/> class.
 /// </summary>
 /// <param name="errorService">
 /// The error Service.
 /// </param>
 public ShellViewModel(IErrorService errorService)
 {
     this.errorService = errorService;
     this.showMainWindow = true;
     this.showOptions = false;
     this.IsMainPanelEnabled = true;
 }
开发者ID:beppec56,项目名称:HandBrake-git_svn-mirror,代码行数:13,代码来源:ShellViewModel.cs


示例3: MainViewModel

 public MainViewModel(IDialogService dialogService, IErrorService errorService)
 {
     _dialogService = dialogService;
     _errorService = errorService;
     OpenFileCommand = new RelayCommand(OpenFile);
     _showScoreInfoCommand = new RelayCommand(ShowScoreInfo, () => _score != null);
 }
开发者ID:CoderLine,项目名称:alphaTab,代码行数:7,代码来源:MainViewModel.cs


示例4: AdministrationCodeTableService

 /// <summary>
 /// Initializes a new instance of the <see cref="AdministrationCodeTableService"/> class.
 /// </summary>
 /// <param name="context">The context.</param>
 /// <param name="errorService">The error service.</param>
 public AdministrationCodeTableService(AdministrationCodeTableDomainContext context, IErrorService errorService)
 {
     _codeTableDomainContext = context;
     _errorService = errorService;
     _groups=new BindableCollection<Group>();
     _userProfessions=new BindableCollection<UserProfession>();
 }
开发者ID:Marbulinek,项目名称:NIS,代码行数:12,代码来源:AdministrationCodeTableService.cs


示例5: PetitionController

 public PetitionController(IEmailService emailService, ICeremonyService ceremonyService, IPetitionService petitionService, IErrorService errorService)
 {
     _emailService = emailService;
     _ceremonyService = ceremonyService;
     _petitionService = petitionService;
     _errorService = errorService;
 }
开发者ID:ucdavis,项目名称:Commencement,代码行数:7,代码来源:PetitionController.cs


示例6: QueueSelectionViewModel

 /// <summary>
 /// Initializes a new instance of the <see cref="QueueSelectionViewModel"/> class. 
 /// </summary>
 /// <param name="errorService">
 /// The Error Service
 /// </param>
 public QueueSelectionViewModel(IErrorService errorService)
 {
     this.errorService = errorService;
     this.Title = "Add to Queue";
     this.TitleList = new BindingList<SelectionTitle>();
     this.OrderedByTitle = true;
 }
开发者ID:Jesper87,项目名称:HandBrake,代码行数:13,代码来源:QueueSelectionViewModel.cs


示例7: QueueSelectionViewModel

 /// <summary>
 /// Initializes a new instance of the <see cref="QueueSelectionViewModel"/> class. 
 /// </summary>
 /// <param name="errorService">
 /// The Error Service
 /// </param>
 /// <param name="userSettingService">
 /// The user Setting Service.
 /// </param>
 public QueueSelectionViewModel(IErrorService errorService, IUserSettingService userSettingService)
 {
     this.errorService = errorService;
     this.userSettingService = userSettingService;
     this.Title = Resources.QueueSelectionViewModel_AddToQueue;
     this.TitleList = new BindingList<SelectionTitle>();
     this.OrderedByTitle = true;
 }
开发者ID:galad87,项目名称:HandBrake-VideoToolbox,代码行数:17,代码来源:QueueSelectionViewModel.cs


示例8: ManagePresetViewModel

 /// <summary>
 /// Initializes a new instance of the <see cref="ManagePresetViewModel"/> class.
 /// </summary>
 /// <param name="presetService">
 /// The Preset Service
 /// </param>
 /// <param name="errorService">
 /// The Error Service
 /// </param>
 /// <param name="windowManager">
 /// The window Manager.
 /// </param>
 public ManagePresetViewModel(IPresetService presetService, IErrorService errorService, IWindowManager windowManager)
 {
     this.presetService = presetService;
     this.errorService = errorService;
     this.windowManager = windowManager;
     this.Title = "Manage Preset";
     this.Preset = new Preset { IsBuildIn = false, IsDefault = false, Category = PresetService.UserPresetCatgoryName};
 }
开发者ID:galad87,项目名称:HandBrake-VideoToolbox,代码行数:20,代码来源:ManagePresetViewModel.cs


示例9: QueueViewModel

 /// <summary>
 /// Initializes a new instance of the <see cref="QueueViewModel"/> class.
 /// </summary>
 /// <param name="windowManager">
 /// The window manager.
 /// </param>
 /// <param name="queueProcessor"> 
 /// The Queue Processor Service 
 /// </param>
 /// <param name="errorService"> 
 /// The Error Service 
 /// </param>
 public QueueViewModel(IWindowManager windowManager, IQueueProcessor queueProcessor, IErrorService errorService)
 {
     this.queueProcessor = queueProcessor;
     this.errorService = errorService;
     this.Title = "Queue";
     this.JobsPending = "No encodes pending";
     this.JobStatus = "There are no jobs currently encoding";
 }
开发者ID:Eddy805,项目名称:HandBrake,代码行数:20,代码来源:QueueViewModel.cs


示例10: AddPresetViewModel

 /// <summary>
 /// Initializes a new instance of the <see cref="AddPresetViewModel"/> class.
 /// </summary>
 /// <param name="windowManager">
 /// The window manager.
 /// </param>
 /// <param name="presetService">
 /// The Preset Service
 /// </param>
 /// <param name="errorService">
 /// The Error Service
 /// </param>
 public AddPresetViewModel(IWindowManager windowManager, IPresetService presetService, IErrorService errorService)
 {
     this.presetService = presetService;
     this.errorService = errorService;
     this.Title = "Add Preset";
     this.Preset = new Preset { IsBuildIn = false, IsDefault = false, Category = PresetService.UserPresetCatgoryName, UsePictureFilters = true};
     this.PictureSettingsModes = EnumHelper<PresetPictureSettingsMode>.GetEnumList();
 }
开发者ID:kallisti5,项目名称:HaikuBrake,代码行数:20,代码来源:AddPresetViewModel.cs


示例11: QueueViewModel

 /// <summary>
 /// Initializes a new instance of the <see cref="QueueViewModel"/> class.
 /// </summary>
 /// <param name="userSettingService">
 /// The user Setting Service.
 /// </param>
 /// <param name="queueProcessor">
 /// The Queue Processor Service 
 /// </param>
 /// <param name="errorService">
 /// The Error Service 
 /// </param>
 public QueueViewModel(IUserSettingService userSettingService, IQueueProcessor queueProcessor, IErrorService errorService)
 {
     this.userSettingService = userSettingService;
     this.queueProcessor = queueProcessor;
     this.errorService = errorService;
     this.Title = "Queue";
     this.JobsPending = "No encodes pending";
     this.JobStatus = "There are no jobs currently encoding";
 }
开发者ID:kevleyski,项目名称:HandBrake,代码行数:21,代码来源:QueueViewModel.cs


示例12: QueueProcessor

        /// <summary>
        /// Initializes a new instance of the <see cref="QueueProcessor"/> class.
        /// </summary>
        /// <param name="encodeService">
        /// The encode Service.
        /// </param>
        /// <param name="userSettingService">
        /// The user settings service.
        /// </param>
        /// <param name="errorService">
        /// The Error Service.
        /// </param>
        /// <exception cref="ArgumentNullException">
        /// Services are not setup
        /// </exception>
        public QueueProcessor(IEncode encodeService, IUserSettingService userSettingService, IErrorService errorService)
        {
            this.userSettingService = userSettingService;
            this.errorService = errorService;
            this.EncodeService = encodeService;

            // If this is the first instance, just use the main queue file, otherwise add the instance id to the filename.
            this.queueFile = string.Format("hb_queue_recovery{0}.xml", GeneralUtilities.ProcessId);
        }
开发者ID:felizk,项目名称:HandBrake,代码行数:24,代码来源:QueueProcessor.cs


示例13: ShellViewModel

 /// <summary>
 /// Initializes a new instance of the <see cref="ShellViewModel"/> class.
 /// </summary>
 /// <param name="errorService">
 /// The error Service.
 /// </param>
 /// <param name="mainViewModel">
 /// The main View Model.
 /// </param>
 /// <param name="optionsViewModel">
 /// The options View Model.
 /// </param>
 public ShellViewModel(IErrorService errorService, IMainViewModel mainViewModel, IOptionsViewModel optionsViewModel)
 {
     this.errorService = errorService;
     this.showMainWindow = true;
     this.showOptions = false;
     this.IsMainPanelEnabled = true;
     this.MainViewModel = mainViewModel;
     this.OptionsViewModel = optionsViewModel;
 }
开发者ID:felizk,项目名称:HandBrake,代码行数:21,代码来源:ShellViewModel.cs


示例14: ErrorListViewModel

        public ErrorListViewModel(IErrorService errorService)
        {
            ThrowUtil.ThrowIfNull(errorService);
            _errorService = errorService;

            AllErrors = new ObservableCollection<ErrorListItemVM>();

            ImportExisting();

            _errorService.ErrorAdded += (s, e) => SyncInvoke(() => AddError(e.Value));
            _errorService.ErrorRemoved += (s, e) => SyncInvoke(() => RemoveError(e.Value));
        }
开发者ID:RaptorOne,项目名称:SmartDevelop,代码行数:12,代码来源:ErrorListViewModel.cs


示例15: PreviewViewModel

        /// <summary>
        /// Initializes a new instance of the <see cref="PreviewViewModel"/> class.
        /// </summary>
        /// <param name="encodeService">
        /// The encode Service.
        /// </param>
        /// <param name="errorService">
        /// The error Service.
        /// </param>
        /// <param name="userSettingService">
        /// The user Setting Service.
        /// </param>
        public PreviewViewModel(IEncodeServiceWrapper encodeService, IErrorService errorService, IUserSettingService userSettingService)
        {
            this.encodeService = encodeService;
            this.errorService = errorService;
            this.userSettingService = userSettingService;
            this.Title = "Preview";
            this.Percentage = "0.00%";
            this.PercentageValue = 0;
            this.StartAt = 1;
            this.Duration = 30;

            UseSystemDefaultPlayer = userSettingService.GetUserSetting<bool>(UserSettingConstants.DefaultPlayer);
        }
开发者ID:epowers,项目名称:HandBrakeMirror,代码行数:25,代码来源:PreviewViewModel.cs


示例16: QueueViewModel

        /// <summary>
        /// Initializes a new instance of the <see cref="QueueViewModel"/> class.
        /// </summary>
        /// <param name="userSettingService">
        /// The user Setting Service.
        /// </param>
        /// <param name="queueProcessor">
        /// The Queue Processor Service 
        /// </param>
        /// <param name="errorService">
        /// The Error Service 
        /// </param>
        public QueueViewModel(IUserSettingService userSettingService, IQueueProcessor queueProcessor, IErrorService errorService)
        {
            this.userSettingService = userSettingService;
            this.queueProcessor = queueProcessor;
            this.errorService = errorService;
            this.Title = Resources.QueueViewModel_Queue;
            this.JobsPending = Resources.QueueViewModel_NoEncodesPending;
            this.JobStatus = Resources.QueueViewModel_NoJobsPending;
            this.SelectedItems = new BindingList<QueueTask>();
            this.DisplayName = "Queue";

            this.WhenDoneAction = this.userSettingService.GetUserSetting<string>(UserSettingConstants.WhenCompleteAction);
        }
开发者ID:galad87,项目名称:HandBrake-VideoToolbox,代码行数:25,代码来源:QueueViewModel.cs


示例17: ErrorController

 public ErrorController(ElmahErrorHelper elmahErrorHelper, IErrorService errorService)
 {
     if (elmahErrorHelper == null)
     {
         throw new ArgumentNullException("elmahErrorHelper");
     }
     if (errorService == null)
     {
         throw new ArgumentNullException("errorService");
     }
     _errorService = errorService;
     _elmahErrorHelper = elmahErrorHelper;
 }
开发者ID:RoseMadder,项目名称:vinco-logging-toolkit,代码行数:13,代码来源:ErrorController.cs


示例18: RootModule

        public RootModule(IErrorService error)
        {
            Get["/"] = _ =>
            {
                return "ThumbsUp Security Service is Running";
            };

            Get["/error/{code}"] = url =>
            {
                if (Params.AreMissing("Code")) return error.MissingParameters(Response);
                return Response.AsJson(new { ErrorCode = Params.Code, ErrorMessage = error.Decode(Params.Code)});
            };
        }
开发者ID:biofractal,项目名称:ThumbsUp,代码行数:13,代码来源:RootModule.cs


示例19: AdminController

 public AdminController(IRepositoryWithTypedId<Student, Guid> studentRepository, IRepositoryWithTypedId<MajorCode, string> majorRepository, IStudentService studentService, IEmailService emailService, IMajorService majorService, ICeremonyService ceremonyService, IRegistrationService registrationService, IRegistrationPopulator registrationPopulator, IRepository<Registration> registrationRepository, IErrorService errorService, IReportService reportService)
 {
     if (emailService == null) throw new ArgumentNullException("emailService");
     _studentRepository = studentRepository;
     _majorRepository = majorRepository;
     _studentService = studentService;
     _emailService = emailService;
     _majorService = majorService;
     _ceremonyService = ceremonyService;
     _registrationService = registrationService;
     _registrationPopulator = registrationPopulator;
     _registrationRepository = registrationRepository;
     _errorService = errorService;
     _reportService = reportService;
 }
开发者ID:ucdavis,项目名称:Commencement,代码行数:15,代码来源:AdminController.cs


示例20: IsolatedEncodeService

 /// <summary>
 /// Initializes a new instance of the <see cref="IsolatedEncodeService"/> class. 
 /// </summary>
 /// <param name="errorService">
 /// The error Service.
 /// </param>
 /// <param name="userSettingService">
 /// The user Setting Service.
 /// </param>
 public IsolatedEncodeService(IErrorService errorService, IUserSettingService userSettingService)
     : base(errorService, userSettingService)
 {
     try
     {
         if (this.CanConnect())
         {
             this.Connect();
         }
     }
     catch (Exception exception)
     {
         errorService.ShowError(
             "Unable to connect to scan worker process.", "Try restarting HandBrake", exception);
     }
 }
开发者ID:evolver56k,项目名称:HandBrake,代码行数:25,代码来源:IsolatedEncodeService.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# IEulerPluginContext类代码示例发布时间:2022-05-24
下一篇:
C# IErrorReporter类代码示例发布时间: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