本文整理汇总了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 );
}
示例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 );
}
示例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 );
}
示例4: SaveProjectCommand
public SaveProjectCommand(IProjectController projectController, IProjectUserOptionsController projectUserOptionsController,
ICommandFactory commandFactory)
{
this.projectController = projectController;
this.projectUserOptionsController = projectUserOptionsController;
this.commandFactory = commandFactory;
}
示例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 );
}
示例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 );
}
示例7: GetAddEmployeeCommand
private AddEmployeeCommand GetAddEmployeeCommand()
{
fakeDapperHub = A.Fake<IDapperHub>();
fakeCommandFactory = A.Fake<ICommandFactory>();
return new AddEmployeeCommand(fakeDapperHub, fakeCommandFactory);
}
示例8: Customer
public Customer(
ICommandFactory commandFactory,
IContextFactory contextFactory)
{
_commandFactory = commandFactory;
_contextFactory = contextFactory;
}
示例9: ReloadCommand
public ReloadCommand(ICommandFactory commandFactory, IEventAggregator eventAggregator,
IOptionsController optionsController)
{
this.eventAggregator = eventAggregator;
this.optionsController = optionsController;
this.commandFactory = commandFactory;
}
示例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 );
}
示例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>()));
}
示例12: OpenProjectCommand
public OpenProjectCommand(IProjectController projectController, IEventAggregator eventAggregator,
ICommandFactory commandFactory)
{
this.projectController = projectController;
this.eventAggregator = eventAggregator;
this.commandFactory = commandFactory;
}
示例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
};
}
示例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 );
}
示例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();
}
}