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; }
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); }
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; }
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; }
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; }
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; }
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; }