XG.Model.Domain.Channel.AddBot C# (CSharp) Method

AddBot() public method

public AddBot ( Bot aBot ) : bool
aBot Bot
return bool
        public bool AddBot(Bot aBot)
        {
            return Add(aBot);
        }

Usage Example

Example #1
0
        public Packets()
        {
            var servers = new Servers();

            var server = new Server
            {
                Name = "test.bitpir.at"
            };
            servers.Add(server);

            var channel = new Channel
            {
                Name = "#test"
            };
            server.AddChannel(channel);

            channel.AddBot(bot1);
            channel.AddBot(bot2);

            bot1.AddPacket(CreatePacket(1, "Under.the.Dome.s01e01.mkv", 101));
            bot1.AddPacket(CreatePacket(2, "Under.the.Dome.s01e02.mkv", 102));
            bot1.AddPacket(CreatePacket(3, "Under.the.Dome.s01e03.mkv", 103));
            bot1.AddPacket(CreatePacket(4, "Under.the.Dome.s01e04.mkv", 104));

            bot2.AddPacket(CreatePacket(1, "Under.the.Dome.s01e01.mkv", 201));
            bot2.AddPacket(CreatePacket(2, "Under.the.Dome.s01e02.mkv", 202));
            bot2.AddPacket(CreatePacket(3, "Under.the.Dome.s01e03.mkv", 203));
            bot2.AddPacket(CreatePacket(4, "Under.the.Dome.s01e04.mkv", 204));
            bot2.AddPacket(CreatePacket(5, "Ander.the.Dome.s01e05.mkv", 205));

            XG.Plugin.Webserver.Search.Packets.Servers = servers;
            XG.Plugin.Webserver.Search.Packets.Initialize();
        }
All Usage Examples Of XG.Model.Domain.Channel::AddBot