Ejemplo n.º 1
0
        public IntelEventArgs(string agent)
        {
            if (string.IsNullOrEmpty(agent))
                throw new ArgumentException("Cannot be null or empty", "agent");

            this.AgentProfile = new AgentProfile(agent); ;
            this.EventType = IntelEventType.AgentLeave;
        }
Ejemplo n.º 2
0
        public void ConstructorTest_With_ValidAgent_and_EventType()
        {
            string         agent     = "agent";
            IntelEventType eventType = IntelEventType.AgentEnter;
            IntelEventArgs target    = new IntelEventArgs(new AgentProfile(agent));

            Assert.AreEqual <string>(agent, target.AgentProfile.Agent);
            Assert.AreEqual <IntelEventType>(eventType, target.EventType);
        }
Ejemplo n.º 3
0
        public IntelEventArgs(AgentProfile agentProfile) {

            if (string.IsNullOrEmpty(agentProfile.Agent))
                throw new ArgumentException("Cannot be null or empty", "agent");

            this.AgentProfile = agentProfile;
            this.EventType = IntelEventType.AgentEnter;
            
        }
Ejemplo n.º 4
0
        public IntelEventArgs(AgentProfile agentProfile)
        {
            if (string.IsNullOrEmpty(agentProfile.Agent))
            {
                throw new ArgumentException("Cannot be null or empty", "agent");
            }

            this.AgentProfile = agentProfile;
            this.EventType    = IntelEventType.AgentEnter;
        }
Ejemplo n.º 5
0
        public IntelEventArgs(string agent)
        {
            if (string.IsNullOrEmpty(agent))
            {
                throw new ArgumentException("Cannot be null or empty", "agent");
            }

            this.AgentProfile = new AgentProfile(agent);;
            this.EventType    = IntelEventType.AgentLeave;
        }
Ejemplo n.º 6
0
        public IntelEventArgs(IntelData intelData)
        {
            if (intelData.Image == null)
                throw new ArgumentException("Image cannot be null", "image");

            if (string.IsNullOrEmpty(intelData.Agent))
                throw new ArgumentException("Agent cannot be null or empty", "agent");

            this.AgentProfile = new AgentProfile(intelData.Agent);
            this.Image = intelData.Image;
            this.Caption = intelData.Caption;

            this.EventType = IntelEventType.IntelReceived;
        }
Ejemplo n.º 7
0
        public IntelEventArgs(IntelData intelData)
        {
            if (intelData.Image == null)
            {
                throw new ArgumentException("Image cannot be null", "image");
            }

            if (string.IsNullOrEmpty(intelData.Agent))
            {
                throw new ArgumentException("Agent cannot be null or empty", "agent");
            }

            this.AgentProfile = new AgentProfile(intelData.Agent);
            this.Image        = intelData.Image;
            this.Caption      = intelData.Caption;

            this.EventType = IntelEventType.IntelReceived;
        }