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


C# IMessageReceiver.GetType方法代码示例

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


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

示例1: SubscribeToChannels

 /// <summary>
 /// Thread safe. Automatically subscribe to all channels specified in class attributes.
 /// </summary>
 /// <remarks>If an object is subscribed to a channel, it MUST be unsubscribed on destruction.</remarks>
 /// <see cref="Sharplike.Core.Game.Unsubscribe"/>
 /// <seealso cref="Sharplike.Core.Messaging.ChannelSubscriberAttribute"/>
 /// <param name="subscriber">The object to create subscriptions for.</param>
 public static void SubscribeToChannels(IMessageReceiver subscriber)
 {
     foreach (ChannelSubscriberAttribute attr in
         Attribute.GetCustomAttributes(subscriber.GetType()))
     {
         SubscribeToChannel(attr.Channel, subscriber);
     }
 }
开发者ID:eropple,项目名称:sharplike,代码行数:15,代码来源:Game.cs

示例2: MessageReceiverStarting

 internal void MessageReceiverStarting(IMessageReceiver receiver, MessageHandlerMap map)
 {
     if (IsEnabled())
         MessageReceiverStarting(receiver.GetType().Name, receiver.Path, map.HandlerTypes.Count, map.HandlerTypes.SelectMany(m => m.Value).Count(), Thread.CurrentThread.ManagedThreadId, GetTask());
 }
开发者ID:RobinSoenen,项目名称:RedDog,代码行数:5,代码来源:MessagingEventSource.cs

示例3: MessageReceived

 internal void MessageReceived(string contentType, IMessageReceiver receiver, string messageId, string correlationId, string sessionId)
 {
     if (IsEnabled())
         MessageReceived(contentType, receiver.GetType().Name, receiver.Path, messageId, correlationId, sessionId, Thread.CurrentThread.ManagedThreadId, GetTask());
 }
开发者ID:RobinSoenen,项目名称:RedDog,代码行数:5,代码来源:MessagingEventSource.cs

示例4: MessageReceived

 internal void MessageReceived(string contentType, IMessageReceiver receiver, string messageId, string correlationId, string sessionId)
 {
     if (IsEnabled())
         MessageReceived(contentType, receiver.GetType().Name, receiver.Path, messageId, correlationId, sessionId);
 }
开发者ID:Mecabot,项目名称:RedDog,代码行数:5,代码来源:MessengerEventSource.cs


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