本文整理汇总了C#中MediaPortal.Common.Messaging.AsynchronousMessageQueue类的典型用法代码示例。如果您正苦于以下问题:C# AsynchronousMessageQueue类的具体用法?C# AsynchronousMessageQueue怎么用?C# AsynchronousMessageQueue使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AsynchronousMessageQueue类属于MediaPortal.Common.Messaging命名空间,在下文中一共展示了AsynchronousMessageQueue类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: MessageWatcher
public MessageWatcher(object owner, string messageChannel, MessageHandlerDlgt handler, bool autoDispose)
{
_handler = handler;
_autoDispose = autoDispose;
_messageQueue = new AsynchronousMessageQueue(owner, new string[] {messageChannel});
_messageQueue.MessageReceived += OnMessageReceived;
}
开发者ID:chekiI,项目名称:MediaPortal-2,代码行数:7,代码来源:MessageWatcher.cs
示例2: OnMessageReceived
protected void OnMessageReceived(AsynchronousMessageQueue queue, SystemMessage message)
{
if (message.ChannelName == ServerConnectionMessaging.CHANNEL)
{
ServerConnectionMessaging.MessageType messageType =
(ServerConnectionMessaging.MessageType) message.MessageType;
switch (messageType)
{
case ServerConnectionMessaging.MessageType.HomeServerAttached:
case ServerConnectionMessaging.MessageType.HomeServerDetached:
FireStateChanged();
break;
}
}
else if (message.ChannelName == SharesMessaging.CHANNEL)
{
SharesMessaging.MessageType messageType =
(SharesMessaging.MessageType) message.MessageType;
switch (messageType)
{
case SharesMessaging.MessageType.ShareAdded:
case SharesMessaging.MessageType.ShareRemoved:
FireStateChanged();
break;
}
}
}
开发者ID:HAF-Blade,项目名称:MediaPortal-2,代码行数:27,代码来源:SetupDefaultSharesAction.cs
示例3: Create
public static ShutdownWatcher Create(AsynchronousMessageQueue owner)
{
IMessageBroker broker = ServiceRegistration.Get<IMessageBroker>();
ShutdownWatcher result = new ShutdownWatcher(owner);
broker.RegisterMessageReceiver(SystemMessaging.CHANNEL, result);
return result;
}
开发者ID:jgauffin,项目名称:MediaPortal-2,代码行数:7,代码来源:AsynchronousMessageQueue.cs
示例4: Activated
public void Activated(PluginRuntime pluginRuntime)
{
messageQueue = new AsynchronousMessageQueue(this,
new string[] {SystemMessaging.CHANNEL, PlayerManagerMessaging.CHANNEL});
messageQueue.MessageReceived += OnMessageReceived;
messageQueue.Start();
}
开发者ID:chli,项目名称:AtmoLight,代码行数:7,代码来源:Plugin.cs
示例5: OnMessageReceived
void OnMessageReceived(AsynchronousMessageQueue queue, SystemMessage message)
{
if (message.ChannelName == PlayerManagerMessaging.CHANNEL)
{
PlayerManagerMessaging.MessageType messageType = (PlayerManagerMessaging.MessageType) message.MessageType;
switch (messageType)
{
case PlayerManagerMessaging.MessageType.PlayerStarted:
case PlayerManagerMessaging.MessageType.PlayerStopped:
case PlayerManagerMessaging.MessageType.PlayerEnded:
Update();
break;
}
}
else if (message.ChannelName == PlayerContextManagerMessaging.CHANNEL)
{
PlayerContextManagerMessaging.MessageType messageType = (PlayerContextManagerMessaging.MessageType) message.MessageType;
switch (messageType)
{
case PlayerContextManagerMessaging.MessageType.CurrentPlayerChanged:
Update();
break;
}
}
else if (message.ChannelName == WorkflowManagerMessaging.CHANNEL)
{
WorkflowManagerMessaging.MessageType messageType = (WorkflowManagerMessaging.MessageType) message.MessageType;
switch (messageType)
{
case WorkflowManagerMessaging.MessageType.NavigationComplete:
Update();
break;
}
}
}
开发者ID:joconno4,项目名称:MediaPortal-2,代码行数:35,代码来源:FullscreenContentAction.cs
示例6: OnMessageReceived
private void OnMessageReceived(AsynchronousMessageQueue queue, SystemMessage message)
{
if (message.ChannelName == NotificationServiceMessaging.CHANNEL)
Update();
else if (message.ChannelName == WorkflowManagerMessaging.CHANNEL)
Update();
}
开发者ID:chekiI,项目名称:MediaPortal-2,代码行数:7,代码来源:NotificationsModel.cs
示例7: OnMessageReceived
private void OnMessageReceived(AsynchronousMessageQueue queue, SystemMessage message)
{
if (message.ChannelName == PlayerManagerMessaging.CHANNEL)
{
PlayerManagerMessaging.MessageType messageType = (PlayerManagerMessaging.MessageType) message.MessageType;
switch (messageType)
{
case PlayerManagerMessaging.MessageType.PlayerStarted:
case PlayerManagerMessaging.MessageType.PlayerStopped:
case PlayerManagerMessaging.MessageType.PlayerEnded:
HandlePlayerChange();
break;
case PlayerManagerMessaging.MessageType.PlaybackStateChanged:
HandlePlaybackStateChanged();
break;
}
}
else if (message.ChannelName == PlayerContextManagerMessaging.CHANNEL)
{
PlayerContextManagerMessaging.MessageType messageType = (PlayerContextManagerMessaging.MessageType) message.MessageType;
switch (messageType)
{
case PlayerContextManagerMessaging.MessageType.PlayerSlotsChanged:
HandlePlayerChange();
break;
}
}
}
开发者ID:chekiI,项目名称:MediaPortal-2,代码行数:28,代码来源:BaseVideoPlayerSynchronizationStrategy.cs
示例8: Activated
public void Activated(PluginRuntime pluginRuntime)
{
if (_isInitialized)
return;
_isInitialized = true;
// All non-default media item aspects must be registered
var miatr = ServiceRegistration.Get<IMediaItemAspectTypeRegistration>();
miatr.RegisterLocallyKnownMediaItemAspectType(OnlineVideosAspect.Metadata);
InitializeOnlineVideoSettings();
// create a message queue for OnlineVideos to broadcast that the list of site utils was rebuild
_messageQueue = new AsynchronousMessageQueue(this, new string[] { OnlineVideosMessaging.CHANNEL });
_messageQueue.Start();
// load and update sites in a background thread, it takes time and we are on the Main thread delaying MP2 startup
ServiceRegistration.Get<IThreadPool>().Add(
InitialSitesUpdateAndLoad,
"OnlineVideos Initial Sites Load & Update",
QueuePriority.Low,
ThreadPriority.BelowNormal,
AfterInitialLoad);
}
开发者ID:offbyoneBB,项目名称:mp-onlinevideos2,代码行数:26,代码来源:OnlineVideosPlugin.cs
示例9: ImporterModel
public ImporterModel()
{
_statusProperty = new WProperty(typeof(string), null);
_progressProperty = new WProperty(typeof(int), 0);
messageQueue = new AsynchronousMessageQueue(this, new[] { ImporterMessaging.Channel });
messageQueue.MessageReceived += messageQueue_MessageReceived;
}
开发者ID:ministerkrister,项目名称:Emulators,代码行数:8,代码来源:ImporterModel.cs
示例10: SubscribeToMessages
void SubscribeToMessages()
{
_messageQueue = new AsynchronousMessageQueue(this, new string[]
{
ServerConnectionMessaging.CHANNEL
});
_messageQueue.MessageReceived += OnMessageReceived;
_messageQueue.Start();
}
开发者ID:joconno4,项目名称:MediaPortal-2,代码行数:9,代码来源:AttachDetachAction.cs
示例11: Install
public void Install()
{
_messageQueue = new AsynchronousMessageQueue(this, new string[]
{
ServerConnectionMessaging.CHANNEL
});
_messageQueue.MessageReceived += OnMessageReceived;
_messageQueue.Start();
}
开发者ID:chekiI,项目名称:MediaPortal-2,代码行数:9,代码来源:ServerConnectionChangeNotificator.cs
示例12: SubscribeToMessages
private void SubscribeToMessages()
{
_messageQueue = new AsynchronousMessageQueue(this, new string[]
{
ContentDirectoryMessaging.CHANNEL
});
_messageQueue.MessageReceived += OnMessageReceived;
_messageQueue.Start();
}
开发者ID:chekiI,项目名称:MediaPortal-2,代码行数:9,代码来源:AbstractItemsScreenData.cs
示例13: SubscribeToMessages
void SubscribeToMessages()
{
_messageQueue = new AsynchronousMessageQueue(this, new string[]
{
RemovableMediaMessaging.CHANNEL
});
_messageQueue.MessageReceived += OnMessageReceived;
_messageQueue.Start();
}
开发者ID:chekiI,项目名称:MediaPortal-2,代码行数:9,代码来源:RemovableDriveChangeNotificator.cs
示例14: SubscribeToMessages
void SubscribeToMessages()
{
_messageQueue = new AsynchronousMessageQueue(this, new string[]
{
PlayerManagerMessaging.CHANNEL
});
_messageQueue.MessageReceived += OnMessageReceived;
_messageQueue.Start();
}
开发者ID:davinx,项目名称:MediaPortal-2,代码行数:9,代码来源:PlayerConfigurationAction.cs
示例15: CommonNotificationService
public CommonNotificationService()
{
_messageQueue = new AsynchronousMessageQueue(this, new string[]
{
ImporterWorkerMessaging.CHANNEL,
});
_messageQueue.MessageReceived += OnMessageReceived;
_messageQueue.Start();
}
开发者ID:BigGranu,项目名称:MediaPortal-2,代码行数:9,代码来源:CommonNotificationService.cs
示例16: SubscribeToMessages
void SubscribeToMessages()
{
if (_messageQueue == null)
{
_messageQueue = new AsynchronousMessageQueue(this, new[] { SystemMessaging.CHANNEL, ServerConnectionMessaging.CHANNEL });
_messageQueue.PreviewMessage += OnMessageReceived;
_messageQueue.Start();
}
}
开发者ID:aspik,项目名称:MediaPortal-2,代码行数:9,代码来源:NativeTvProxyRegistration.cs
示例17: messageQueue_MessageReceived
void messageQueue_MessageReceived(AsynchronousMessageQueue queue, SystemMessage message)
{
if (message.ChannelName == ImporterMessaging.Channel)
{
ImporterMessaging.MessageType messageType = (ImporterMessaging.MessageType)message.MessageType;
if (messageType == ImporterMessaging.MessageType.Init)
initImporter();
}
}
开发者ID:ministerkrister,项目名称:Emulators,代码行数:9,代码来源:ImporterModel.cs
示例18: BaseVideoPlayerSynchronizationStrategy
protected BaseVideoPlayerSynchronizationStrategy()
{
_messageQueue = new AsynchronousMessageQueue(this, new string[]
{
PlayerManagerMessaging.CHANNEL,
PlayerContextManagerMessaging.CHANNEL,
});
_messageQueue.MessageReceived += OnMessageReceived;
}
开发者ID:chekiI,项目名称:MediaPortal-2,代码行数:9,代码来源:BaseVideoPlayerSynchronizationStrategy.cs
示例19: TaskScheduler
public TaskScheduler()
{
_settings = ServiceRegistration.Get<ISettingsManager>().Load<TaskSchedulerSettings>();
SaveChanges(false);
_wakeUpTimer = new TaskWaitableTimer();
_wakeUpTimer.OnTimerExpired += OnResume;
_messageQueue = new AsynchronousMessageQueue(this, new[] { SystemMessaging.CHANNEL });
_messageQueue.MessageReceived += OnMessageReceived;
// Message queue will be started in Startup()
}
开发者ID:davinx,项目名称:MediaPortal-2,代码行数:10,代码来源:TaskScheduler.cs
示例20: OnlineVideosWorkflowModel
public OnlineVideosWorkflowModel()
{
SiteGroupsList = new ItemsList();
SitesList = new ItemsList();
// create a message queue where we listen to changes to the sites
_messageQueue = new AsynchronousMessageQueue(this, new string[] { OnlineVideosMessaging.CHANNEL });
_messageQueue.MessageReceived += new MessageReceivedHandler(OnlineVideosMessageReceived);
_messageQueue.Start();
}
开发者ID:offbyoneBB,项目名称:mp-onlinevideos2,代码行数:10,代码来源:OnlineVideosWorkflowModel.cs
注:本文中的MediaPortal.Common.Messaging.AsynchronousMessageQueue类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论