Example #1
0
        public override void Execute(NntpSession session)
        {
            using (INntpConnection connection = session.Repository.CreateConnection())
            {
                List <INntpGroup> groups =
                    new List <INntpGroup>(connection.GetGroups());

                session.Connection.SendLine("215 List of newsgroups follows");

                foreach (INntpGroup group in groups)
                {
                    session.Connection.SendLine("{0}\t{1}",
                                                group.Name, group.Description);
                }

                session.Connection.SendLine(".");
            }
        }