当前位置: 首页>>代码示例>>C#>>正文


C# ICommandFactory类代码示例

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


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

示例1: JobFunctionListViewModel

        public JobFunctionListViewModel(
            IUserDialogService userDialogService,
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            IAccessControlManager accessControlManager,
            IPopupService popupService,
            ICommandFactory commandFactory )
            : base(accessControlManager, commandFactory)
        {
            _popupService = popupService;
            _userDialogService = userDialogService;

            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;

            _pagedCollectionViewWrapper = new PagedCollectionViewWrapper<SystemRoleDto> ();

            var commandFactoryHelper = CommandFactoryHelper.CreateHelper ( this, commandFactory );

            CreateJobFunctionCommand = commandFactoryHelper.BuildDelegateCommand ( () => CreateJobFunctionCommand, ExecuteCreateJobFunctionCommand );
            EditJobFunctionCommand = commandFactoryHelper.BuildDelegateCommand<SystemRoleDto> (
                () => EditJobFunctionCommand, ExecuteEditJobFunctionCommand );
            CloneJobFunctionCommand = commandFactoryHelper.BuildDelegateCommand<SystemRoleDto> (
                () => CloneJobFunctionCommand, ExecuteCloneJobFunctionCommand );
            DeleteJobFunctionCommand = commandFactoryHelper.BuildDelegateCommand<SystemRoleDto> (
                () => DeleteJobFunctionCommand, ExecuteDeleteJobFunction );
        }
开发者ID:divyang4481,项目名称:REM,代码行数:25,代码来源:JobFunctionListViewModel.cs

示例2: MessageCenterWorkspaceViewModel

        /// <summary>
        /// Initializes a new instance of the <see cref="MessageCenterWorkspaceViewModel"/> class.
        /// </summary>
        /// <param name="accessControlManager">The access control manager.</param>
        /// <param name="commandFactory">The command factory.</param>
        /// <param name="popupService">The popup service.</param>
        /// <param name="eventAggregator">The event aggregator.</param>
        /// <param name="dispatcherFactory">The dispatcher factory.</param>
        public MessageCenterWorkspaceViewModel(
            IAccessControlManager accessControlManager,
            ICommandFactory commandFactory,
            IPopupService popupService,
            IEventAggregator eventAggregator,
            IAsyncRequestDispatcherFactory dispatcherFactory
            )
            : base(accessControlManager, commandFactory)
        {
            _popupService = popupService;
            _dispatcherFactory = dispatcherFactory;
            IncomingMail = new ObservableCollection<DirectMailDto>();
            SentMail = new ObservableCollection<DirectMailDto>();

            CommandFactoryHelper<MessageCenterWorkspaceViewModel> commandFactoryHelper = CommandFactoryHelper.CreateHelper ( this, commandFactory );
            SendNewMailCommand = commandFactoryHelper.BuildDelegateCommand ( () => SendNewMailCommand, ExecuteSendNewMail );
            OpenSaveToExternalPatientHistoryCommand =
                commandFactoryHelper.BuildDelegateCommand<string> (
                    () => OpenSaveToExternalPatientHistoryCommand, ExecuteOpenSaveToExternalPatientHistory );
            DownloadMailAttachmentCommand = commandFactoryHelper.BuildDelegateCommand<string>(
                () => DownloadMailAttachmentCommand, DownloadMailAttachment);
            DragQueryCommand = commandFactoryHelper.BuildDelegateCommand<DragDropQueryEventArgs>(() => DragQueryCommand, ExecuteDragQuery);

            eventAggregator.GetEvent<MessageSentEvent> ().Subscribe ( HandleMessageSent );

            SetupImapFolderTimers ();
            RequestInboxContent ( null, null );
            RequestSentItemsContent ( null, null );
        }
开发者ID:divyang4481,项目名称:REM,代码行数:37,代码来源:MessageCenterWorkspaceViewModel.cs

示例3: ClaimErrorsListViewModel

 /// <summary>
 /// Initializes a new instance of the <see cref="ClaimErrorsListViewModel"/> class.
 /// </summary>
 /// <param name="accessControlManager">The access control manager.</param>
 /// <param name="commandFactory">The command factory.</param>
 public ClaimErrorsListViewModel( IAccessControlManager accessControlManager, ICommandFactory commandFactory )
     : base(accessControlManager, commandFactory)
 {
     Errors = new ObservableCollection<TempClaimModel> ();
     var error1 = new TempClaimModel
         {
             ServiceDate = DateTime.Now.AddDays ( -10 ),
             PayorName = "Aetna",
             ChargeAmount = ( decimal )50.0,
             PatientName = "Albert Smith",
             Message = "BR897 - The patient name does not match the insurance information on file.",
             PayorTypeName = "Commercial"
         };
     var error2 = new TempClaimModel
         {
             ServiceDate = DateTime.Now.AddDays ( -15 ),
             PayorName = "Medicaid",
             ChargeAmount = ( decimal )500.0,
             PatientName = "Tad Young",
             Message = "BR123 - The assessment cannot be incomplete.",
             PayorTypeName = "Medicare"
         };
     Errors.Add ( error1 );
     Errors.Add ( error2 );
 }
开发者ID:divyang4481,项目名称:REM,代码行数:30,代码来源:ClaimErrorsListViewModel.cs

示例4: SaveProjectCommand

 public SaveProjectCommand(IProjectController projectController, IProjectUserOptionsController projectUserOptionsController, 
     ICommandFactory commandFactory)
 {
     this.projectController = projectController;
     this.projectUserOptionsController = projectUserOptionsController;
     this.commandFactory = commandFactory;
 }
开发者ID:dougrathbone,项目名称:mbunit-v3,代码行数:7,代码来源:SaveProjectCommand.cs

示例5: MainPatientSearchViewModel

        /// <summary>
        /// Initializes a new instance of the <see cref="MainPatientSearchViewModel"/> class.
        /// </summary>
        /// <param name="userDialogService">The user dialog service.</param>
        /// <param name="asyncRequestDispatcherFactory">The async request dispatcher factory.</param>
        /// <param name="accessControlManager">The access control manager.</param>
        /// <param name="navigationService">The navigation service.</param>
        /// <param name="commandFactory">The command factory.</param>
        public MainPatientSearchViewModel(
            IUserDialogService userDialogService,
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            IAccessControlManager accessControlManager,
            INavigationService navigationService,
            ICommandFactory commandFactory )
            : base(userDialogService,
                asyncRequestDispatcherFactory,
                accessControlManager,
                navigationService,
                commandFactory)
        {
            _userDialogService = userDialogService;
            _navigationService = navigationService;

            var commandFactoryHelper = CommandFactoryHelper.CreateHelper ( this, commandFactory );

            DragStartingCommand = commandFactoryHelper.BuildDelegateCommand<object> ( () => DragStartingCommand, ExecuteDragStartingCommand );
            ViewDashboardCommand = commandFactoryHelper.BuildDelegateCommand<PatientSearchResultDto> (
                () => ViewDashboardCommand, ExecuteViewDashboard );
            ViewProfileCommand = commandFactoryHelper.BuildDelegateCommand<PatientSearchResultDto> ( () => ViewProfileCommand, ExecuteViewProfile );
            ApplyPaymentCommand = commandFactoryHelper.BuildDelegateCommand<PatientSearchResultDto> ( () => ApplyPaymentCommand, ExecuteApplyPayment );
            CreateNewAppointmentCommand = commandFactoryHelper.BuildDelegateCommand<PatientSearchResultDto> (
                () => CreateNewAppointmentCommand, ExecuteCreateNewAppointment );
        }
开发者ID:divyang4481,项目名称:REM,代码行数:33,代码来源:MainPatientSearchViewModel.cs

示例6: PayorCoverageViewModel

        /// <summary>
        /// Initializes a new instance of the <see cref="PayorCoverageViewModel"/> class.
        /// </summary>
        /// <param name="accessControlManager">The access control manager.</param>
        /// <param name="commandFactory">The command factory.</param>
        /// <param name="asyncRequestDispatcherFactory">The async request dispatcher factory.</param>
        /// <param name="userDialogService">The user dialog service.</param>
        /// <param name="popupService">The popup service.</param>
        /// <param name="navigationService">The navigation service.</param>
        public PayorCoverageViewModel(
            IAccessControlManager accessControlManager,
            ICommandFactory commandFactory,
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            IUserDialogService userDialogService,
            IPopupService popupService,
            INavigationService navigationService)
            : base(accessControlManager, commandFactory)
        {
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
            _userDialogService = userDialogService;
            _popupService = popupService;
            _navigationService = navigationService;

            PageSize = 50;

            var commandFactoryHelper = CommandFactoryHelper.CreateHelper ( this, commandFactory );

            DeletePayorCoverageCommand = commandFactoryHelper.BuildDelegateCommand<PayorCoverageCacheDto> (
                () => DeletePayorCoverageCommand, ExecuteDeletePayorCoverageCommand );
            ShowPayorCoverageEditorCommand = commandFactoryHelper.BuildDelegateCommand<PayorCoverageCacheDto> (
                () => ShowPayorCoverageEditorCommand, ExecuteShowPayorCoverageEditorCommand );
            GoToPatientHistoryCommand = commandFactoryHelper.BuildDelegateCommand (
                () => GoToPatientHistoryCommand, ExecuteGoToPatientHistoryCommand );
        }
开发者ID:divyang4481,项目名称:REM,代码行数:34,代码来源:PayorCoverageViewModel.cs

示例7: GetAddEmployeeCommand

        private AddEmployeeCommand GetAddEmployeeCommand()
        {
            fakeDapperHub = A.Fake<IDapperHub>();
            fakeCommandFactory = A.Fake<ICommandFactory>();

            return new AddEmployeeCommand(fakeDapperHub, fakeCommandFactory);
        }
开发者ID:SparkyCoder,项目名称:FakeLocity,代码行数:7,代码来源:AddEmployeeCommandTests.cs

示例8: Customer

 public Customer(
     ICommandFactory commandFactory,
     IContextFactory contextFactory)
 {
     _commandFactory = commandFactory;
     _contextFactory = contextFactory;
 }
开发者ID:Bikeman868,项目名称:Prius,代码行数:7,代码来源:Customer.cs

示例9: ReloadCommand

 public ReloadCommand(ICommandFactory commandFactory, IEventAggregator eventAggregator, 
     IOptionsController optionsController)
 {
     this.eventAggregator = eventAggregator;
     this.optionsController = optionsController;
     this.commandFactory = commandFactory;
 }
开发者ID:dougrathbone,项目名称:mbunit-v3,代码行数:7,代码来源:ReloadCommand.cs

示例10: TaskAndTakGroupListViewModel

        public TaskAndTakGroupListViewModel(
            IUserDialogService userDialogService,
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            IAccessControlManager accessControlManager,
            IPopupService popupService,
            ICommandFactory commandFactory )
            : base(accessControlManager, commandFactory)
        {
            _popupService = popupService;

            _userDialogService = userDialogService;
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;

            _pagedCollectionViewWrapper = new PagedCollectionViewWrapper<SystemRoleDto> ();

            InitializeGroupingDescriptions ();

            var commandFactoryHelper = CommandFactoryHelper.CreateHelper ( this, commandFactory );

            CreateTaskOrTaskGroupCommand = commandFactoryHelper.BuildDelegateCommand<object> (
                () => CreateTaskOrTaskGroupCommand, ExecuteCreateTaskOrTaskGroupCommand );
            EditTaskOrTaskGroupCommand = commandFactoryHelper.BuildDelegateCommand<SystemRoleDto> (
                () => EditTaskOrTaskGroupCommand, ExecuteEditTaskOrTaskGroupCommand );
            CloneTaskOrTaskGroupCommand = commandFactoryHelper.BuildDelegateCommand<SystemRoleDto> (
                () => CloneTaskOrTaskGroupCommand, ExecuteCloneTaskOrTaskGroupCommand );
            DeleteTaskOrTaskGroupCommand = commandFactoryHelper.BuildDelegateCommand<SystemRoleDto> (
                () => DeleteTaskOrTaskGroupCommand, ExecuteDeleteTaskOrTaskGroup );
        }
开发者ID:divyang4481,项目名称:REM,代码行数:28,代码来源:TaskAndTakGroupListViewModel.cs

示例11: LineViewModel

 public LineViewModel(IPointViewModel start, IPointViewModel finish,
     Action<PointTransit<ILineViewModel>> insertAction, ICommandFactory commandFactory)
 {
     Start = start;
     Finish = finish;
     InsertCommand = commandFactory.CreateCommand(o => insertAction(((PointTransit) o).Cast<ILineViewModel>()));
 }
开发者ID:PeletonSoft,项目名称:Sketch,代码行数:7,代码来源:LineViewModel.cs

示例12: OpenProjectCommand

 public OpenProjectCommand(IProjectController projectController, IEventAggregator eventAggregator, 
     ICommandFactory commandFactory)
 {
     this.projectController = projectController;
     this.eventAggregator = eventAggregator;
     this.commandFactory = commandFactory;
 }
开发者ID:dougrathbone,项目名称:mbunit-v3,代码行数:7,代码来源:OpenProjectCommand.cs

示例13: PatientListViewModel

        /// <summary>
        /// Initializes a new instance of the <see cref="PatientListViewModel"/> class.
        /// </summary>
        /// <param name="userDialogService">The user dialog service.</param>
        /// <param name="asyncRequestDispatcherFactory">The async request dispatcher factory.</param>
        /// <param name="accessControlManager">The access control manager.</param>
        /// <param name="commandFactory">The command factory.</param>
        public PatientListViewModel(
            IUserDialogService userDialogService,
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            IAccessControlManager accessControlManager,
            ICommandFactory commandFactory )
            : base(accessControlManager, commandFactory)
        {
            _userDialogService = userDialogService;
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;

            var commandFactoryHelper = CommandFactoryHelper.CreateHelper ( this, commandFactory );

            SearchCommand = commandFactoryHelper.BuildDelegateCommand ( () => SearchCommand, ExecuteSearchCommand );
            ClearCommand = commandFactoryHelper.BuildDelegateCommand ( () => ClearCommand, ExecuteClearCommand );

            PatientListCriteria = new PatientListCriteriaDto ();
            PatientListCriteria.PageSize = DEFAULTPAGESIZE;
            PatientListCriteria.LabResultFilterModifier = FilterModifier.EqualTo;
            PatientListCriteria.AgeFilterModifier = FilterModifier.EqualTo;

            FilterModifierList = new List<string>
                {
                    FilterModifier.EqualTo,
                    FilterModifier.GreaterThan,
                    FilterModifier.GreaterThanOrEqualTo,
                    FilterModifier.LessThen,
                    FilterModifier.LessThenOrEqualTo
                };
        }
开发者ID:divyang4481,项目名称:REM,代码行数:36,代码来源:PatientListViewModel.cs

示例14: EditJobFunctionViewModel

        public EditJobFunctionViewModel(
            IUserDialogService userDialogService,
            IEventAggregator eventAggregator,
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            IAccessControlManager accessControlManager,
            IPopupService popupService,
            ICommandFactory commandFactory )
            : base(accessControlManager, commandFactory)
        {
            _userDialogService = userDialogService;
            _eventAggregator = eventAggregator;
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
            _popupService = popupService;

            Wrapper = new EditableDtoWrapper ();

            var commandFactoryHelper = CommandFactoryHelper.CreateHelper ( this, commandFactory );

            SaveJobFunctionCommand = commandFactoryHelper.BuildDelegateCommand ( () => SaveJobFunctionCommand, ExecuteSaveJobFunctionCommand );
            GrantSystemRoleCommand = commandFactoryHelper.BuildDelegateCommand ( () => GrantSystemRoleCommand, ExecuteGrantSystemRoleCommand );
            RevokeSystemRoleCommand = commandFactoryHelper.BuildDelegateCommand<SystemRoleDto> (
                () => RevokeSystemRoleCommand, ExecuteRevokeSystemRoleCommand );
            CancelCommand = commandFactoryHelper.BuildDelegateCommand ( () => CancelCommand, ExecuteCancelCommand );

            CreateCommand = NavigationCommandManager.BuildCommand ( () => CreateCommand, NavigateToCreateCommand );
            EditCommand = NavigationCommandManager.BuildCommand ( () => EditCommand, NavigateToEditCommand );
            CloneCommand = NavigationCommandManager.BuildCommand ( () => CloneCommand, NavigateToCloneCommand );
        }
开发者ID:divyang4481,项目名称:REM,代码行数:28,代码来源:EditJobFunctionViewModel.cs

示例15: Main

 static void Main()
 {
     //NOTE: IoC (e.g. Windsor Container) could be introduced for easier dependency graph handling
     var clock = new Clock();
     var console = new Console();
     var messagePrinter = new MessagePrinter(console, clock);
     var messageRepository = new MessageRepository(clock);
     var subscriptionRepository = new SubscriptionRepository();
     var userRepository = new UserRepository();
     IEnumerable<ICommandFactory> allCommands = new ICommandFactory[]
     {
         new PostMessageCommand(),
         new ShowTimelineCommand(),
         new CreateSubscriptionCommand(),
         new ShowWallCommand()
     };
     var commandParser = new CommandParser(
         allCommands,
         userRepository,
         messageRepository,
         subscriptionRepository,
         messagePrinter);
     while (true)
     {
         commandParser.Parse(console.ReadLine()).Execute();
     }
 }
开发者ID:tekavec,项目名称:Tuite,代码行数:27,代码来源:Program.cs


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