Esempio n. 1
0
        public AgentMessage Reply(PerformativeType performative)
        {
            AgentMessage reply = this.MemberwiseClone() as AgentMessage;

            reply.Performative = performative;
            reply.Sender       = this.RealReceiver;
            reply.Receiver     = this.Sender;
            reply.RealReceiver = this.Sender;
            reply.InReplyTo    = this.ReplyWith;
            return(reply);
        }
Esempio n. 2
0
 public async Task Given_a_frame_body_byte_array_with_a_performative_When_creating_a_frame_body_Then_performative_equals_byte_array_performative (string performative, PerformativeType expectedType)
 {
     var frameBodyBytes = ConvertToByteArray (performative);
     var result = await FrameBodyFactory.GetFrameBodyFromBytes (frameBodyBytes);
     result.Performative.Should ().Be (expectedType);
 }
Esempio n. 3
0
 public FrameBody (PerformativeType performative, byte[] payloadBytes)
 {
     Performative = performative;
     Payload = payloadBytes;
 }
Esempio n. 4
0
 public AgentMessage(PerformativeType performative)
 {
     this.Performative = performative;
 }
Esempio n. 5
0
 Performative (string name, PerformativeType type)
 {
     Name = name;
     Type = type;
 }