blob: 8a865bca2cde93b0e38cf83e3df36ed04a961de1 [file] [log] [blame]
using System;
using System.Collections;
using Nexus.Core;
namespace PhoneBook.Core
{
/// <summary>
/// Implement Nexus.Core.IEntryList for AppEntry objects.
/// </summary>
///
public class AppEntryList : ArrayList, IEntryList
{
public object Insert(string key)
{
AppEntry entry = new AppEntry();
entry.entry_key = key;
Insert(0, entry);
return entry;
}
public void AddEntry(IDictionary row)
{
AppEntry entry = new AppEntry();
foreach (DictionaryEntry col in row)
{
string key = Convert.ToString(col.Key);
string value = Convert.ToString(col.Value);
entry.Add(key, value);
}
Add(entry);
}
public AppEntry[] ToAppEntryArray()
{
return (AppEntry[])ToArray(typeof(AppEntry));
}
}
}