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


C# IEventBus类代码示例

本文整理汇总了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);
 }
开发者ID:akzhigitov,项目名称:EasyNetQ,代码行数:7,代码来源:PublisherConfirmsTests.cs

示例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);
  }
开发者ID:hippasus,项目名称:EasyNetQ,代码行数:29,代码来源:ExclusiveConsumer.cs

示例3: GlobalSettingsProvider

 public GlobalSettingsProvider(
   IToolsOptionsPageProvider visualStudioPackageProvider,
   IEventBus eventBus) {
   _visualStudioPackageProvider = visualStudioPackageProvider;
   _eventBus = eventBus;
   _globalSettings = new Lazy<GlobalSettings>(CreateGlobalSettings);
 }
开发者ID:mbbill,项目名称:vs-chromium,代码行数:7,代码来源:GlobalSettingsProvider.cs

示例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);
 }
开发者ID:mastoj,项目名称:TJ.CQRS,代码行数:7,代码来源:MongoEventStore.cs

示例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;
 }
开发者ID:mbbill,项目名称:vs-chromium,代码行数:30,代码来源:SourceExplorerHierarchyControllerFactory.cs

示例6: DiagnosticsManager

		internal DiagnosticsManager(IDebugLogService logService, IEventBus eventBus, IConfigurationManager configurationManager, ILogger logger)
		{
			_logService = logService;
			_configurationManager = configurationManager;
			eventBus.Subscribe<ErrorEvent>(HandleErrorEvent);
		    _logger = logger;
		}
开发者ID:Donky-Network,项目名称:DonkySDK-Xamarin-Modular,代码行数:7,代码来源:DiagnosticsManager.cs

示例7: SqlServerPersistenceManager

 public SqlServerPersistenceManager(string connectionString, IContext context, IEventBus eventBus, IContainer container)
 {
     this.connectionString = connectionString;
     this.context = context;
     this.eventBus = eventBus;
     this.container = container;
 }
开发者ID:robsiera,项目名称:TransitioningToEventSourcing,代码行数:7,代码来源:SqlServerPersistenceManager.cs

示例8: NinjectedCommandBus

        public NinjectedCommandBus(IEventBus eventBus, IKernel kernel)
            : base(eventBus)
        {
            _kernel = kernel;

            RegisterHandler<EmployeeAggregate>();
        }
开发者ID:dilillo,项目名称:Benefits,代码行数:7,代码来源:NinjectedCommandBus.cs

示例9: StorEvilGlossaryJob

 public StorEvilGlossaryJob(IStepProvider stepProvider, IStepDescriber stepDescriber, IEventBus bus, IGlossaryFormatter formatter)
 {
     _stepProvider = stepProvider;
     _stepDescriber = stepDescriber;
     _bus = bus;
     _formatter = formatter;
 }
开发者ID:paulbatum,项目名称:storevil,代码行数:7,代码来源:StorEvilGlossaryJob.cs

示例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;
        }
开发者ID:Donky-Network,项目名称:DonkySDK-Xamarin-Modular,代码行数:27,代码来源:RegistrationManager.cs

示例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;
        }
开发者ID:dealproc,项目名称:Drey,代码行数:28,代码来源:ServicesManager.cs

示例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();
        }
开发者ID:dealproc,项目名称:Drey,代码行数:39,代码来源:AutofacConfig.cs

示例13: InPlaceCompilingStoryRunner

 public InPlaceCompilingStoryRunner(IRemoteHandlerFactory factory, IScenarioPreprocessor preprocessor, IStoryFilter filter, ISessionContext context, IEventBus eventBus)
 {
     _factory = factory;
     _preprocessor = preprocessor;
     _filter = filter;
     _eventBus = eventBus;
 }
开发者ID:pawelpabich,项目名称:storevil,代码行数:7,代码来源:InPlaceCompilingStoryRunner.cs

示例14: FacebookAccountRepository

 public FacebookAccountRepository(IAccountRepository accountRepository,
                                  IFacebookDataRepository facebookDataRepository, IEventBus eventBus)
 {
     this.accountRepository = accountRepository;
     this.facebookDataRepository = facebookDataRepository;
     this.eventBus = eventBus;
 }
开发者ID:burkhartt,项目名称:Jellyfish,代码行数:7,代码来源:IFacebookAccountDataRepository.cs

示例15: BaseModule

        public BaseModule(IEventBus eventBus, Services.IGlobalSettingsService globalSettingsService, string modulePath, bool verifyConfigured) : base(modulePath)
        {
            EventBus = eventBus;
            GlobalSettingsService = globalSettingsService;

            WireSetupPipeline(verifyConfigured);
        }
开发者ID:dealproc,项目名称:Drey,代码行数:7,代码来源:BaseModule.cs


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