本文整理汇总了C#中IEventBus类的典型用法代码示例。如果您正苦于以下问题:C# IEventBus类的具体用法?C# IEventBus怎么用?C# IEventBus使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IEventBus类属于命名空间,在下文中一共展示了IEventBus类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetUp
public void SetUp()
{
channelMock = MockRepository.GenerateStub<IModel>();
eventBus = MockRepository.GenerateStub<IEventBus>();
publisher = new PublisherBasic(eventBus);
}
示例2: ExclusiveConsumer
public ExclusiveConsumer(
IQueue queue,
Func<byte[], MessageProperties, MessageReceivedInfo, Task> onMessage,
IPersistentConnection connection,
IConsumerConfiguration configuration,
IInternalConsumerFactory internalConsumerFactory,
IEventBus eventBus
)
{
Preconditions.CheckNotNull(queue, "queue");
Preconditions.CheckNotNull(onMessage, "onMessage");
Preconditions.CheckNotNull(connection, "connection");
Preconditions.CheckNotNull(internalConsumerFactory, "internalConsumerFactory");
Preconditions.CheckNotNull(eventBus, "eventBus");
Preconditions.CheckNotNull(configuration, "configuration");
this.queue = queue;
this.onMessage = onMessage;
this.connection = connection;
this.configuration = configuration;
this.internalConsumerFactory = internalConsumerFactory;
this.eventBus = eventBus;
timer = new Timer(s =>
{
StartConsumer();
((Timer)s).Change(10000, -1);
});
timer.Change(10000, -1);
}
示例3: GlobalSettingsProvider
public GlobalSettingsProvider(
IToolsOptionsPageProvider visualStudioPackageProvider,
IEventBus eventBus) {
_visualStudioPackageProvider = visualStudioPackageProvider;
_eventBus = eventBus;
_globalSettings = new Lazy<GlobalSettings>(CreateGlobalSettings);
}
示例4: MongoEventStore
public MongoEventStore(IMongoConfiguration mongoConfiguration, IEventBus eventBus)
: base(eventBus)
{
_server = MongoServer.Create(mongoConfiguration.Url);
var mongoDatabaseSettings = _server.CreateDatabaseSettings(mongoConfiguration.DatabaseName);
_database = _server.GetDatabase(mongoDatabaseSettings);
}
示例5: SourceExplorerHierarchyControllerFactory
public SourceExplorerHierarchyControllerFactory(
ISynchronizationContextProvider synchronizationContextProvider,
IFileSystemTreeSource fileSystemTreeSource,
IVisualStudioPackageProvider visualStudioPackageProvider,
IVsGlyphService vsGlyphService,
IImageSourceFactory imageSourceFactory,
IOpenDocumentHelper openDocumentHelper,
IFileSystem fileSystem,
IClipboard clipboard,
IWindowsExplorer windowsExplorer,
IUIRequestProcessor uiRequestProcessor,
IEventBus eventBus,
IGlobalSettingsProvider globalSettingsProvider,
IDelayedOperationProcessor delayedOperationProcessor,
IUIThread uiThread) {
_synchronizationContextProvider = synchronizationContextProvider;
_fileSystemTreeSource = fileSystemTreeSource;
_visualStudioPackageProvider = visualStudioPackageProvider;
_vsGlyphService = vsGlyphService;
_imageSourceFactory = imageSourceFactory;
_openDocumentHelper = openDocumentHelper;
_fileSystem = fileSystem;
_clipboard = clipboard;
_windowsExplorer = windowsExplorer;
_uiRequestProcessor = uiRequestProcessor;
_eventBus = eventBus;
_globalSettingsProvider = globalSettingsProvider;
_delayedOperationProcessor = delayedOperationProcessor;
_uiThread = uiThread;
}
示例6: DiagnosticsManager
internal DiagnosticsManager(IDebugLogService logService, IEventBus eventBus, IConfigurationManager configurationManager, ILogger logger)
{
_logService = logService;
_configurationManager = configurationManager;
eventBus.Subscribe<ErrorEvent>(HandleErrorEvent);
_logger = logger;
}
示例7: SqlServerPersistenceManager
public SqlServerPersistenceManager(string connectionString, IContext context, IEventBus eventBus, IContainer container)
{
this.connectionString = connectionString;
this.context = context;
this.eventBus = eventBus;
this.container = container;
}
示例8: NinjectedCommandBus
public NinjectedCommandBus(IEventBus eventBus, IKernel kernel)
: base(eventBus)
{
_kernel = kernel;
RegisterHandler<EmployeeAggregate>();
}
示例9: StorEvilGlossaryJob
public StorEvilGlossaryJob(IStepProvider stepProvider, IStepDescriber stepDescriber, IEventBus bus, IGlossaryFormatter formatter)
{
_stepProvider = stepProvider;
_stepDescriber = stepDescriber;
_bus = bus;
_formatter = formatter;
}
示例10: RegistrationManager
internal RegistrationManager(
IRegistrationContext registrationContext,
IModuleManager moduleManager,
IPublicRegistrationService publicRegistrationService,
ISdkInformation sdkInformation,
IEnvironmentInformation environmentInformation,
IServiceContext serviceContext,
ISecureRegistrationService secureRegistrationService,
IConfigurationManager configurationManager,
IEventBus eventBus,
IRefreshToken tokenRefresher,
ILogger logger,
IJsonSerialiser serialiser)
{
_registrationContext = registrationContext;
_moduleManager = moduleManager;
_publicRegistrationService = publicRegistrationService;
_sdkInformation = sdkInformation;
_environmentInformation = environmentInformation;
_serviceContext = serviceContext;
_secureRegistrationService = secureRegistrationService;
_configurationManager = configurationManager;
_eventBus = eventBus;
_tokenRefresher = tokenRefresher;
_logger = logger;
_serialiser = serialiser;
}
示例11: ServicesManager
public ServicesManager(
INutConfiguration configurationManager,
Infrastructure.ConfigurationManagement.DbConfigurationSettings.Factory dbConfigurationSettingsFactory,
IEventBus eventBus,
IEnumerable<IReportPeriodically> pushServices,
IEnumerable<IRemoteInvocationService> remoteInvokedServices,
Services.IGlobalSettingsService globalSettings,
Func<RegisteredPackagesPollingClient> packagesPollerFactory,
Func<PollingClientCollection> pollingCollectionFactory,
Repositories.IPackageRepository packageRepository,
IHoardeManager hoardeManager)
{
_log = LogProvider.For<ServicesManager>();
_configurationManager = configurationManager;
_dbConfigurationSettingsFactory = dbConfigurationSettingsFactory;
_eventBus = eventBus;
_pushServices = pushServices;
_remoteInvokedServices = remoteInvokedServices;
_globalSettings = globalSettings;
_packagesPollerFactory = packagesPollerFactory;
_pollingCollectionFactory = pollingCollectionFactory;
_packageRepository = packageRepository;
_hoardeManager = hoardeManager;
}
示例12: Configure
/// <summary>
/// Configuration routine of the autofac container.
/// </summary>
/// <param name="eventBus">The event bus.</param>
/// <param name="hoardeManager">The hoarde manager.</param>
/// <param name="configurationManager">The host's configuration manager.</param>
public static void Configure(IEventBus eventBus, ServiceModel.IHoardeManager hoardeManager, INutConfiguration configurationManager)
{
var builder = new ContainerBuilder();
builder.RegisterInstance(eventBus);
builder.RegisterInstance(hoardeManager);
builder.RegisterInstance(configurationManager);
builder.RegisterType<ServiceModel.ServicesManager>().AsImplementedInterfaces().SingleInstance();
builder.RegisterType<ServiceModel.PollingClientCollection>().AsSelf().SingleInstance();
builder.RegisterType<ServiceModel.RegisteredPackagesPollingClient>().AsSelf().SingleInstance();
builder.RegisterType<ServiceModel.ReleasesPollingClient>();
builder.RegisterType<ConfigurationManagement.DbConfigurationSettings>();
// we will apply most of the configuration in one or more assembly modules.
builder.RegisterAssemblyModules(typeof(AutofacConfig).Assembly);
switch (configurationManager.Mode)
{
case ExecutionMode.Development:
builder.RegisterType<Repositories.OnDisk.OnDiskPackageRepository>().AsImplementedInterfaces().InstancePerLifetimeScope();
break;
case ExecutionMode.Production:
builder.RegisterType<Repositories.SQLiteRepositories.PackageRepository>().AsImplementedInterfaces().InstancePerLifetimeScope();
break;
default:
builder.RegisterType<Repositories.SQLiteRepositories.PackageRepository>().AsImplementedInterfaces().InstancePerLifetimeScope();
_log.WarnFormat("Unknown execution mode '{mode}'. Registered Sqlite Repository.", configurationManager.Mode);
break;
}
_container = builder.Build();
}
示例13: InPlaceCompilingStoryRunner
public InPlaceCompilingStoryRunner(IRemoteHandlerFactory factory, IScenarioPreprocessor preprocessor, IStoryFilter filter, ISessionContext context, IEventBus eventBus)
{
_factory = factory;
_preprocessor = preprocessor;
_filter = filter;
_eventBus = eventBus;
}
示例14: FacebookAccountRepository
public FacebookAccountRepository(IAccountRepository accountRepository,
IFacebookDataRepository facebookDataRepository, IEventBus eventBus)
{
this.accountRepository = accountRepository;
this.facebookDataRepository = facebookDataRepository;
this.eventBus = eventBus;
}
示例15: BaseModule
public BaseModule(IEventBus eventBus, Services.IGlobalSettingsService globalSettingsService, string modulePath, bool verifyConfigured) : base(modulePath)
{
EventBus = eventBus;
GlobalSettingsService = globalSettingsService;
WireSetupPipeline(verifyConfigured);
}