本文整理汇总了C#中IMessageBroker类的典型用法代码示例。如果您正苦于以下问题:C# IMessageBroker类的具体用法?C# IMessageBroker怎么用?C# IMessageBroker使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IMessageBroker类属于命名空间,在下文中一共展示了IMessageBroker类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: NewMasterDataCommand
protected NewMasterDataCommand(IMessageBroker messageBroker, IClientContext clientContext)
{
Text = () => LanguageData.General_New ;
this.messageBroker = messageBroker;
this.clientContext = clientContext;
}
示例2: NewHouseCommand
public NewHouseCommand(IClientContext clientContext, IMessageBroker messageBroker)
{
Text = () => LanguageData.General_New;
this.messageBroker = messageBroker;
this.clientContext = clientContext;
}
示例3: EmployeeCostEntryViewModel
public EmployeeCostEntryViewModel(
IMessageBroker messageBroker,
IEmployeeCostService costService,
IEmployeeService employeeService,
SaveEmployeeCostCommand saveCostCommand,
CancelCommand cancelCommand, ShowEmployeeCostCommand showListCommand
)
{
this.messageBroker = messageBroker;
this.costService = costService;
this.employeeService = employeeService;
ActualSaveCommand = saveCostCommand;
CancelCommand = cancelCommand;
ShowCostListCommand = showListCommand;
InitializeCommands();
NavigationCommands = new List<CommandBase>{SaveCommand,CancelCommand};
CancelCommand.Action = broker => showListCommand.Execute(null);
PropertiesToValidate = new List<string>()
{
"Date",
"Total",
"Details"
};
Employees = new ObservableCollection<Employee>(employeeService.GetAll());
SubscribeMessages();
}
示例4: SaveHenDepreciationCommand
public SaveHenDepreciationCommand(IMessageBroker broker, IHenDepreciationService service)
{
Text = () => LanguageData.General_Save;
this.broker = broker;
this.service = service;
}
示例5: SaveUsageCommand
public SaveUsageCommand(IMessageBroker messageBroker, IConsumableUsageService usageService)
{
Text = () => LanguageData.General_Save;
this.messageBroker = messageBroker;
this.usageService = usageService;
}
示例6: DeleteEggProductionCommand
public DeleteEggProductionCommand(IMessageBroker messageBroker, IEggProductionService costService)
{
Text = () => LanguageData.General_Delete;
this.broker = messageBroker;
this.service = costService;
}
示例7: MasterDataViewModel
public MasterDataViewModel(
IMessageBroker messageBroker,
Lazy<IHenListView> henListProxy,
Lazy<IHenHouseListView> houseListProxy,
Lazy<IEmployeeListView> employeeListProxy,
Lazy<IConsumableListView> consumableListProxy,
Lazy<IAdditionalCostListView> additionalCostListProxy,
Lazy<IHenEntryView> henEntryProxy,
Lazy<IHenHouseEntryView> houseEntryProxy,
Lazy<IEmployeeEntryView> employeeEntryProxy,
Lazy<IConsumableEntryView> consumableEntryProxy,
Lazy<IAdditionalCostEntryView> additionalCostEntryProxy
)
{
this.messageBroker = messageBroker;
this.henListProxy = henListProxy;
this.houseListProxy = houseListProxy;
this.employeeListProxy = employeeListProxy;
this.consumableListProxy = consumableListProxy;
this.additionalCostListProxy = additionalCostListProxy;
this.henEntryProxy = henEntryProxy;
this.houseEntryProxy = houseEntryProxy;
this.employeeEntryProxy = employeeEntryProxy;
this.consumableEntryProxy = consumableEntryProxy;
this.additionalCostEntryProxy = additionalCostEntryProxy;
InitializeCommand();
SetMessageListeners();
}
示例8: GlimpseTraceWriter
public GlimpseTraceWriter(IMessageBroker messageBroker, Func<IExecutionTimer> timerStrategy, ITraceWriter innerTraceWriter)
{
_messageBroker = messageBroker;
_timerStrategy = timerStrategy;
_innerTraceWriter = innerTraceWriter;
_traceMessages = new List<JsonTraceMessage>();
}
示例9: InspectorContext
/// <summary>
/// Initializes a new instance of the <see cref="InspectorContext" /> class.
/// </summary>
/// <param name="logger">The logger.</param>
/// <param name="proxyFactory">The proxy factory.</param>
/// <param name="messageBroker">The message broker.</param>
/// <param name="timerStrategy">The timer strategy.</param>
/// <param name="runtimePolicyStrategy">The runtime policy strategy.</param>
/// <exception cref="System.ArgumentNullException">Throws an exception if any parameter if <c>null</c>.</exception>
public InspectorContext(ILogger logger, IProxyFactory proxyFactory, IMessageBroker messageBroker, Func<IExecutionTimer> timerStrategy, Func<RuntimePolicy> runtimePolicyStrategy)
{
if (logger == null)
{
throw new ArgumentNullException("logger");
}
if (proxyFactory == null)
{
throw new ArgumentNullException("proxyFactory");
}
if (messageBroker == null)
{
throw new ArgumentNullException("messageBroker");
}
if (timerStrategy == null)
{
throw new ArgumentNullException("timerStrategy");
}
if (runtimePolicyStrategy == null)
{
throw new ArgumentNullException("runtimePolicyStrategy");
}
Logger = logger;
ProxyFactory = proxyFactory;
TimerStrategy = timerStrategy;
MessageBroker = messageBroker;
RuntimePolicyStrategy = runtimePolicyStrategy;
}
示例10: UsageEntryViewModel
public UsageEntryViewModel(IMessageBroker messageBroker, IConsumableUsageService usageService,
IHenHouseService houseService, IConsumableService consumableService,
SaveUsageCommand saveUsageCommand, CancelCommand cancelCommand, ShowUsageCommand showListCommand
)
{
this.messageBroker = messageBroker;
this.usageService = usageService;
this.houseService = houseService;
this.consumableService = consumableService;
this.saveUsageCommand = saveUsageCommand;
this.showListCommand = showListCommand;
CancelCommand = cancelCommand;
PropertiesToValidate = new List<string>()
{
"Date",
"Total",
"Details"
};
InitializeCommands();
HouseList = new ObservableCollection<HenHouse>(houseService.GetAll());
ConsumableList = new ObservableCollection<Consumable>(consumableService.GetAll());
SubscribeMessages();
}
示例11: SaveEmployeeCostCommand
public SaveEmployeeCostCommand(IMessageBroker broker, IEmployeeCostService costService)
{
Text = () => LanguageData.General_Save;
this.broker = broker;
this.costService = costService;
}
示例12: DeleteEmployeeCostCommand
public DeleteEmployeeCostCommand(IMessageBroker messageBroker, IEmployeeCostService costService)
{
Text = () => LanguageData.General_Delete;
this.broker = messageBroker;
this.costService = costService;
}
示例13: DeleteHenDepreciationCommand
public DeleteHenDepreciationCommand(IMessageBroker broker, IHenDepreciationService depreciationService)
{
Text = () => LanguageData.General_Delete;
this.broker = broker;
this.service = depreciationService;
}
示例14: HenDepreciationEntryViewModel
public HenDepreciationEntryViewModel(IMessageBroker messageBroker, IHenDepreciationService service, IHenHouseService houseService,
SaveHenDepreciationCommand saveCommand, CancelCommand cancelCommand, ShowHenDepreciationListCommand showListCommand)
{
this.broker = messageBroker;
this.service = service;
ActualSaveCommand = saveCommand;
CancelCommand = cancelCommand;
CancelCommand.Action = b => showListCommand.Execute(null);
RefreshCommand = new DelegateCommand(p => OnRefresh(),p => true) {Text = () => LanguageData.General_Refresh};
ShowListCommand = showListCommand;
HenHouses = new ObservableCollection<HenHouse>(houseService.GetAll().OrderBy(h => h.Name));
InitializeCommands();
PropertiesToValidate = new List<string>
{
"Date",
"Details"
};
NavigationCommands = new List<CommandBase>(){SaveCommand, CancelCommand, RefreshCommand};
SubscribeMessages();
}
示例15: ApplicationContext
internal ApplicationContext(IImportPool importPool, IMessageBroker messageBroker, IServicePool servicePool, IDataBroker dataBroker, IVisualModuleManager visualModuleManager)
{
VisualModuleManager = visualModuleManager;
DataBroker = dataBroker;
ServicePool = servicePool;
MessageBroker = messageBroker;
ImportPool = importPool;
}