コード例 #1
0
ファイル: IntelService.cs プロジェクト: spzenk/sfdocsamples
        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;
        }
コード例 #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);
        }
コード例 #3
0
ファイル: IntelService.cs プロジェクト: spzenk/sfdocsamples
        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;
            
        }
コード例 #4
0
ファイル: IntelService.cs プロジェクト: Br3nda/sfdocsamples
        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;
        }
コード例 #5
0
ファイル: IntelService.cs プロジェクト: Br3nda/sfdocsamples
        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;
        }
コード例 #6
0
ファイル: IntelService.cs プロジェクト: spzenk/sfdocsamples
        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;
        }
コード例 #7
0
ファイル: IntelService.cs プロジェクト: Br3nda/sfdocsamples
        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;
        }