예제 #1
0
 public override bool Unintialize()
 {
     _log.Write("LPCQuerier uninitialize. ");
     //_responser = null;
     _receiver = null;
     return(true);
 }
예제 #2
0
 public static void RegisterPullReceiver(string pullRouteID, LPCQueryReceiver pullReceiver)
 {
     if (PullReceivers.ContainsKey(pullRouteID))
     {
         return;
     }
     PullReceivers.Add(pullRouteID, pullReceiver);
 }
예제 #3
0
 public override bool Initialize()
 {
     //if (EntityDictionary.Entities.ContainsKey(_parameter.ReceiverEntityID))
     //{
     //    _responser = EntityDictionary.Entities[_parameter.ReceiverEntityID] as IResponser;
     //    if(_responser!= null )_log.Write("LPCQuerier connect with responser successfully. " + _parameter.ReceiverEntityID.ToString());
     //    else _log.Write(LogType.Error, "LPCQuerier connect with responser failed.");
     //}
     _receiver = LPCReceiverDictionary.GetPullReceiver(Channel.ID);
     if (_receiver != null)
     {
         //_log.Write("LPCQuerier connect with responser successfully. " + _parameter.ReceiverEntityID.ToString());
         _log.Write("LPCQuerier connect with responser successfully. Pull route ID: " + Channel.ID);
     }
     else
     {
         //_log.Write(LogType.Warning, "LPCQuerier cannot find responser. " + _parameter.ReceiverEntityID.ToString());
         _log.Write(LogType.Warning, "LPCQuerier cannot find responser. Pull route ID: " + Channel.ID + ". Entity ID: " + _parameter.ReceiverEntityID.ToString());
     }
     //return _responser != null;
     return(_receiver != null);
 }