using System;
using System.Collections.Generic;
namespace Ant.Service.Utilities
{
///
/// This class represents the response message
/// returned from both a single line and multi line
/// Pop3 LIST Command.
///
internal sealed class ListResponse : Pop3Response
{
private List _items;
///
/// Gets or sets the items.
///
/// The items.
public List Items
{
get { return _items; }
set { _items = value; }
}
///
/// Gets the message number.
///
/// The message number.
public int MessageNumber
{
get { return _items[0].MessageId; }
}
///
/// Gets number of octets.
///
/// The number of octets.
public long Octets
{
get { return _items[0].Octets; }
}
///
/// Initializes a new instance of the class.
///
/// The response.
/// The items.
public ListResponse(Pop3Response response, List items)
: base(response.ResponseContents, response.HostMessage, response.StatusIndicator)
{
if (items == null)
{
throw new ArgumentNullException("items");
}
_items = items;
}
}
}