Exemplo n.º 1
0
        UrlList ISession.Read()
        {
            List<ulong> ids = m_dataSource.ReadAll();
            UrlList result = new UrlList();

            foreach (ulong id in ids)
            {
                string caption = "";
                string description = "";
                DateTime timestamp = new DateTime();
                string url = "";

                if (m_dataSource.Read(id, out caption, out description, out timestamp, out url))
                {
                    UrlEntry entry = new UrlEntry();
                    entry.Caption = caption;
                    entry.Description = description;
                    entry.Timestamp = timestamp;
                    entry.Url = url;

                    result.entries.Add(entry);
                }
            }

            return result;
        }
Exemplo n.º 2
0
        UrlEntry ISession.Create()
        {
            UrlEntry ret = new UrlEntry();
            ret.Id = m_dataSource.Create();

            return ret;
        }
Exemplo n.º 3
0
 void ISession.Update(UrlEntry entry)
 {
     m_dataSource.Update(entry.Id, entry.Caption, entry.Description, entry.Timestamp, entry.Url);
 }
Exemplo n.º 4
0
 void ISession.Delete(UrlEntry entry)
 {
     m_dataSource.Delete(entry.Id);
 }