本文整理汇总了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);
}
示例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);
}
示例3: DiagnosticsManager
internal DiagnosticsManager(IDebugLogService logService, IEventBus eventBus, IConfigurationManager configurationManager, ILogger logger)
{
_logService = logService;
_configurationManager = configurationManager;
eventBus.Subscribe<ErrorEvent>(HandleErrorEvent);
_logger = logger;
}
示例4: GcmRemoteNotificationChannel
public GcmRemoteNotificationChannel(IEventBus eventBus, IJsonSerialiser serialiser, IConfigurationManager configurationManager)
{
_eventBus = eventBus;
_serialiser = serialiser;
_configurationManager = configurationManager;
eventBus.Subscribe<GcmNotificationReceivedEvent>(HandleGcmNotification);
}
示例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);
}
示例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);
});
}
示例7: PublishConfirmationListener
public PublishConfirmationListener(IEventBus eventBus)
{
eventBus.Subscribe<MessageConfirmationEvent>(OnMessageConfirmation);
eventBus.Subscribe<PublishChannelCreatedEvent>(OnPublishChannelCreated);
}
示例8: Initialize
public void Initialize(IEventBus eventBus)
{
_eventBus = eventBus;
_eventBus.Subscribe(typeof(GetGlobalWebModelApplicationEvent), GetGlobalWebModelApplicationEventHandler);
_eventBus.Subscribe(typeof(GetParticipantApplicationEvent), GetParticipantApplicationEventHandler);
}
示例9: Init
public static void Init(IEventBus bus, IViewRepository viewRepository)
{
var ligaProjection = new LigaViewProjection(viewRepository.For<LigaView>());
bus.Subscribe<LigaCreated>(ligaProjection);
}