• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IMessageReceiver类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: MessageProcessor

 /// <summary>
 /// Parameterized Constructor.
 /// </summary>
 public MessageProcessor(IMessageReceiver receiver,
     IMessageExecutor executor)
 {
     this.receiver = receiver;
     this.executor = executor;
     this.broker = MessageBrokerFactory.Instance.GetOrCreate("message");
 }
开发者ID:y2ket,项目名称:thinknet,代码行数:10,代码来源:MessageProcessor.cs


示例2: removeReciever

        public static IMessageReceiver removeReciever(IMessageReceiver group, IMessageReceiver remove)
        {
            if (group == null)
                throw new Exception("Receiver not found!");

            if (remove == group)
                return null;
            else if (group is DoubleReceiver)
            {
                DoubleReceiver dual = (DoubleReceiver)group;
                IMessageReceiver newone = removeReciever(dual.one, remove);
                IMessageReceiver newtwo = removeReciever(dual.two, remove);
                if (newone != null && newtwo != null)
                {
                    dual.one = newone;
                    dual.two = newtwo;
                    return dual;
                }
                else if (newone != null)
                    return newone;
                else if (newtwo != null)
                    return newtwo;
                else
                    return null;
            }
            else
                return group;
        }
开发者ID:sarang25491,项目名称:Virsona-ChatBot-Tools,代码行数:28,代码来源:DoubleReceiver.cs


示例3: ServiceBusCollector

 public ServiceBusCollector(IMessageReceiver messageReceiver)
 {
     receiverCancellationTokenSource = new CancellationTokenSource();
     receiveWaitTime = TimeSpan.FromMinutes(1);
     receiver = messageReceiver;
     stopped = new ManualResetEventSlim(false);
 }
开发者ID:AndyHitchman,项目名称:BlastTrack,代码行数:7,代码来源:ServiceBusCollector.cs


示例4: addReceiver

        public static IMessageReceiver addReceiver(IMessageReceiver group, IMessageReceiver add)
        {
            if (group == null)
                return add;

            return new DoubleReceiver(add, group);
        }
开发者ID:sarang25491,项目名称:Virsona-ChatBot-Tools,代码行数:7,代码来源:DoubleReceiver.cs


示例5: CreateBus

 public void CreateBus()
 {
     m_Sender = Substitute.For<IMessageSender>();
     m_Receiver = Substitute.For<IMessageReceiver>();
     m_Bus = new MessageBus(m_Sender,
                            m_Receiver);
 }
开发者ID:jystic,项目名称:Triangles-in-space,代码行数:7,代码来源:MessageBusTests.cs


示例6: RemoveReceiver

 internal void RemoveReceiver(IMessageReceiver r)
 {
     lock (inbox)
     {
         inbox.Remove(r);
     }
 }
开发者ID:eropple,项目名称:sharplike,代码行数:7,代码来源:PostOffice.cs


示例7: TriggerNotificationQueueMonitor

        /// <param name="instanceId">The unique name of this worker.</param>
        /// <param name="messageReceiver">The receiver set up to listen for incoming trigger update notifications.</param>
        /// <param name="notificationBuffer">The buffer to which the worker will write all received trigger update notifications.</param>
        public TriggerNotificationQueueMonitor(string instanceId, IMessageReceiver messageReceiver, BlockingCollection<TriggerUpdateNotification> notificationBuffer) : base(instanceId, messageReceiver)
        {
            if (notificationBuffer == null)
                throw new ArgumentNullException("notificationBuffer");

            _notificationBuffer = notificationBuffer;
        }
开发者ID:sjlbos,项目名称:SENG462_DTS,代码行数:10,代码来源:TriggerNotificationQueueMonitor.cs


示例8: Coderack

 /// <summary> 
 /// Create a new coderack
 /// </summary> 
 public Coderack(IMessageReceiver receiver)
 {
     codelets = new SalienceTree<Codelet>();
     isEvaluating = new DescriptorCodelet(this, "evaluating");
     isCompleting = new DescriptorCodelet(this, "completing");
     watching = false;
     this.receiver = receiver;
 }
开发者ID:killix,项目名称:Virsona-ChatBot-Tools,代码行数:11,代码来源:Coderack.cs


示例9: RegisterReceiver

 public static void RegisterReceiver(IMessageReceiver Receiver)
 {
     if (!Receivers.Contains(Receiver))
     {
       Receivers.Add(Receiver);
       Debug.Log("Added new Message Receiver");
     }
 }
开发者ID:shawnmiller,项目名称:RoomWithTheMoose,代码行数:8,代码来源:MessageDispatch.cs


示例10: TransactionMonitorWorker

        public TransactionMonitorWorker(string instanceId, IMessageReceiver messageReceiver, IAuditRepository repository)
            : base(instanceId, messageReceiver)
        {
            if(repository == null)
                throw new ArgumentNullException("repository");

            _repository = repository;
            _deserializer = new TransactionEventConverter();
        }
开发者ID:sjlbos,项目名称:SENG462_DTS,代码行数:9,代码来源:TransactionMonitorWorker.cs


示例11: Initialize

        // Add the plugins actions and data source
        public InitializeResult Initialize(PluginEnvironment env, Assembly assembly, IMessageReceiver receiver)
        {
            env.SetDataSource(PartTypeSourceName, new Sentence(new List<KeyValuePair<string, string>>()));
            env.AddAction(new StringParseHandler(env));
            env.AddAction(new EnumerableParseHandler());
            env.AddAction(new ParaphraseHandler(env));

            return InitializeResult.Success();
        }
开发者ID:killix,项目名称:Virsona-ChatBot-Tools,代码行数:10,代码来源:AgentParserInterface.cs


示例12: NmqMessageServer

        /// <summary>
        /// Initializes a new instance of the <see cref="NmqMessageServer"/> class.
        /// </summary>
        /// <param name="messageReceiver">The message receiver.</param>
        /// <param name="port">The port.</param>
        internal NmqMessageServer(IMessageReceiver messageReceiver, int port)
        {
            tokenSource = new CancellationTokenSource();

            this.port = port;
            this.messageReceiver = messageReceiver;
            context = NetMQContext.Create();
            responseQueue = new NmqResponseQueue(context, port);
        }
开发者ID:yonglehou,项目名称:DistributedCommunicationDotNet,代码行数:14,代码来源:NmqMessageServer.cs


示例13: CommandProcessor

 public CommandProcessor(
     IMessageReceiver messageReceiver,
     ICommandRouter commandRouter,
     ITextSerializer serializer)
 {
     _messageReceiver = messageReceiver;
     _commandRouter = commandRouter;
     _serializer = serializer;
 }
开发者ID:perokvist,项目名称:CommandBus.Lab,代码行数:9,代码来源:CommandProcessor.cs


示例14: WorkloadQueueMonitor

        public WorkloadQueueMonitor(string instanceId, IMessageReceiver messageReceiver, IMessagePublisher statusPublisher, int httpWorkerCount) 
            : base(instanceId, messageReceiver)
        {
            if(statusPublisher == null)
                throw new ArgumentNullException("statusPublisher");

            _batchQueue = new ConcurrentQueue<WorkloadBatchMessage>();
            _httpWorkerCount = httpWorkerCount;
            _statusPublisher = statusPublisher;
        }
开发者ID:sjlbos,项目名称:SENG462_DTS,代码行数:10,代码来源:WorkloadQueueMonitor.cs


示例15: QueueMonitorWorker

        protected QueueMonitorWorker(string instanceId, IMessageReceiver messageReceiver)
        {
            if (instanceId == null)
                throw new ArgumentNullException("instanceId");
            if (messageReceiver == null)
                throw new ArgumentNullException("messageReceiver");

            InstanceId = instanceId;
            Receiver = messageReceiver;
        }
开发者ID:sjlbos,项目名称:SENG462_DTS,代码行数:10,代码来源:QueueMonitorWorker.cs


示例16: Initialize

        public InitializeResult Initialize(PluginEnvironment env, Assembly assembly, IMessageReceiver receiver)
        {
            // Data files contained in [datadrectory]/wordnet
            string basedir = env.GetConfigDirectory("datadirectory") + Path.DirectorySeparatorChar + "morpho" + Path.DirectorySeparatorChar;

            InitializeNouns(env, basedir);
            InitializeVerbs(env, basedir);

            return InitializeResult.Success();
        }
开发者ID:killix,项目名称:Virsona-ChatBot-Tools,代码行数:10,代码来源:MorphologerInterface.cs


示例17: WndProcRouter

		public WndProcRouter (Control control, IMessageReceiver receiver)
		{
			if (control == null)
				throw new ArgumentNullException ("control");
			if (receiver == null)
				throw new ArgumentNullException ("receiver");
			
			_oldTarget = control.WindowTarget;
			_control = control;
			_receiver = receiver;
		}
开发者ID:nlhepler,项目名称:mono,代码行数:11,代码来源:WndProcRouter.cs


示例18: ChangeZoneMsg

 public ChangeZoneMsg(
     IMessageSender sender, 
     IMessageReceiver receiver,
     Entity entity,
     string destZone,
     Point destPosition,
     int sendTime)
     : base(MessageType.ChangeZone, sender, receiver, sendTime)
 {
     Entity = entity;
     DestZone = destZone;
     DestPosition = destPosition;
 }
开发者ID:endy,项目名称:IvyXNA,代码行数:13,代码来源:Message.cs


示例19: Initialize

        // Add the plugins actions and data source
        public InitializeResult Initialize(PluginEnvironment env, Assembly assembly, IMessageReceiver receiver)
        {
            // Data files contained in [datadrectory]/parser
            string parserdir = env.GetConfigDirectory("datadirectory") + Path.DirectorySeparatorChar + "parser" + Path.DirectorySeparatorChar;
            POSTagger tagger = new POSTagger(parserdir + "lexicon_all", parserdir + "ruleset", assembly, null);

            env.SetDataSource<string, string[]>(LanguageNet.Grammarian.POSTagger.PartsSourceName, tagger);
            env.AddAction(new EnumerableTagHandler(tagger));
            env.AddAction(new PhraseResolveHandler(tagger));
            env.AddAction(new StringTagHandler(tagger));

            return InitializeResult.Success();
        }
开发者ID:killix,项目名称:Virsona-ChatBot-Tools,代码行数:14,代码来源:HeppleTaggerInterface.cs


示例20: CreateBus

 public void CreateBus()
 {
     m_Sender = Substitute.For<IMessageSender>();
     m_Receiver = Substitute.For<IMessageReceiver>();
     m_MessageList = Substitute.For<IMessageRegistrationList>();
     m_MessageList.Messages.Returns(new List<Type>
     {
         typeof(TestMessage)
     });
     m_Bus = new MessageBus(m_Sender,
                            m_Receiver,
                            m_MessageList);
 }
开发者ID:anthony-martin,项目名称:Triangles-in-space,代码行数:13,代码来源:MessageBusTests.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IMessageSender类代码示例发布时间:2022-05-24
下一篇:
C# IMessageLogger类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap