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


C# IEventBus.Subscribe方法代码示例

本文整理汇总了C#中IEventBus.Subscribe方法的典型用法代码示例。如果您正苦于以下问题:C# IEventBus.Subscribe方法的具体用法?C# IEventBus.Subscribe怎么用?C# IEventBus.Subscribe使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IEventBus的用法示例。


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

示例1: ApnsRemoteNotificationChannel

		public ApnsRemoteNotificationChannel(IEventBus eventBus)
		{
			_eventBus = eventBus;

			eventBus.Subscribe<ApnsRegistrationChangedEvent>(HandleApnsRegistrationChanged);
			eventBus.Subscribe<ApnsNotificationReceivedEvent>(HandleApnsNotificationReceived);
			eventBus.Subscribe<RefreshApnsConfigurationEvent>(HandleRefreshApnsConfiguration);
		}
开发者ID:Donky-Network,项目名称:DonkySDK-Xamarin-Modular,代码行数:8,代码来源:ApnsRemoteNotificationChannel.cs

示例2: RemoteNotificationManager

		public RemoteNotificationManager(IRemoteNotificationChannel channel, IRegistrationManager registrationManager, IEventBus eventBus, INotificationManager notificationManager)
		{
			_channel = channel;
			_registrationManager = registrationManager;
			_notificationManager = notificationManager;

			eventBus.Subscribe<RemoteChannelDetailsChanged>(HandleChannelDetailsChanged);
			eventBus.Subscribe<RemoteNotificationReceivedEvent>(HandleNotificationReceived);
		}
开发者ID:Donky-Network,项目名称:DonkySDK-Xamarin-Modular,代码行数:9,代码来源:RemoteNotificationManager.cs

示例3: 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

示例4: GcmRemoteNotificationChannel

		public GcmRemoteNotificationChannel(IEventBus eventBus, IJsonSerialiser serialiser, IConfigurationManager configurationManager)
		{
			_eventBus = eventBus;
			_serialiser = serialiser;
			_configurationManager = configurationManager;

			eventBus.Subscribe<GcmNotificationReceivedEvent>(HandleGcmNotification);
		}
开发者ID:Donky-Network,项目名称:DonkySDK-Xamarin-Modular,代码行数:8,代码来源:GcmRemoteNotificationChannel.cs

示例5: PublisherConfirms

        public PublisherConfirms(ConnectionConfiguration configuration, IEasyNetQLogger logger, IEventBus eventBus) : base (eventBus)
        {
            Preconditions.CheckNotNull(configuration, "configuration");
            Preconditions.CheckNotNull(logger, "logger");
            Preconditions.CheckNotNull(eventBus, "eventBus");

            timeoutSeconds = configuration.Timeout;
            this.logger = logger;

            eventBus.Subscribe<PublishChannelCreatedEvent>(OnPublishChannelCreated);
        }
开发者ID:akzhigitov,项目名称:EasyNetQ,代码行数:11,代码来源:PublisherConfirms.cs

示例6: ConsumerFactory

        public ConsumerFactory(IInternalConsumerFactory internalConsumerFactory, IEventBus eventBus)
        {
            Preconditions.CheckNotNull(internalConsumerFactory, "internalConsumerFactory");

            this.internalConsumerFactory = internalConsumerFactory;
            this.eventBus = eventBus;

            eventBus.Subscribe<StoppedConsumingEvent>(stoppedConsumingEvent =>
                {
                    object value;
                    consumers.TryRemove(stoppedConsumingEvent.Consumer, out value);
                });
        }
开发者ID:JohnEffo,项目名称:EasyNetQ,代码行数:13,代码来源:ConsumerFactory.cs

示例7: PublishConfirmationListener

 public PublishConfirmationListener(IEventBus eventBus)
 {
     eventBus.Subscribe<MessageConfirmationEvent>(OnMessageConfirmation);
     eventBus.Subscribe<PublishChannelCreatedEvent>(OnPublishChannelCreated);
 }
开发者ID:hippasus,项目名称:EasyNetQ,代码行数:5,代码来源:PublishConfirmationListener.cs

示例8: Initialize

 public void Initialize(IEventBus eventBus)
 {
     _eventBus = eventBus;
     _eventBus.Subscribe(typeof(GetGlobalWebModelApplicationEvent), GetGlobalWebModelApplicationEventHandler);
     _eventBus.Subscribe(typeof(GetParticipantApplicationEvent), GetParticipantApplicationEventHandler);
 }
开发者ID:axelnnov,项目名称:codedemo,代码行数:6,代码来源:DbGlobalServiceAdapter.cs

示例9: Init

        public static void Init(IEventBus bus, IViewRepository viewRepository)
        {
            var ligaProjection = new LigaViewProjection(viewRepository.For<LigaView>());

            bus.Subscribe<LigaCreated>(ligaProjection);
        }
开发者ID:yarikzub,项目名称:Ligas,代码行数:6,代码来源:Config.cs


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