Esempio n. 1
0
 public TestZoneImpl(String zoneId, String zoneUrl, Agent agent, AgentProperties props,
                   MessageDispatcher dispatcher, IProtocolHandler proto)
     : base(zoneId, zoneUrl, agent, props)
 {
     this.Dispatcher = dispatcher;
      fProtocolHandler = proto;
 }
 private void assertNormalHandling(ErrorMessageHandler handler, SifMessagePayload payload, ZoneImpl zone)
 {
     MessageDispatcher testDispatcher = new MessageDispatcher(zone);
      int result = testDispatcher.dispatch(payload);
      Assert.IsTrue(handler.wasCalled(), "Handler was not called");
      Assert.AreEqual(1, result, "Result code should always be 1 because this version does not support SMB");
 }
Esempio n. 3
0
 //private bool connected;
 //public override bool Connected
 //{
 //   get
 //   {
 //      return connected;
 //   }
 //}
 //public override void Connect(ProvisioningFlags provOptions)
 //{
 //   if (Connected)
 //   {
 //      throw new InvalidOperationException("Zone already connected");
 //   }
 //   fImpl = Adk.Primitives;
 //   connected = true;
 //   fState = 0;
 //}
 protected void SetDispatcher(MessageDispatcher dispatcher)
 {
     this.Dispatcher = dispatcher;
 }
            // TODO: Implement SMB
            //internal SMBHelper _smb;

            /// <summary>  Constructs an EvDisp and starts its thread</summary>
            public EvDisp(MessageDispatcher dispatcher)
            {
                fDispatcher = dispatcher;
                _state = new EvState();
                _idle = new Object();
            }
Esempio n. 5
0
 public void SetDispatcher( MessageDispatcher dispatcher )
 {
     this.fDispatcher = dispatcher;
 }