Exemple #1
0
        public virtual void CopyTo(ContactManager.ContactSourceCollection collection, bool deep)
        {
            if ((typeof(System.ICloneable).IsAssignableFrom(typeof(ContactManager.ContactSource)) == false))
            {
                deep = false;
            }
            System.Collections.Generic.IEnumerator <ContactManager.ContactSource> enumerator = this.GetEnumerator();
            bool b;

            for (b = enumerator.MoveNext(); b; b = enumerator.MoveNext())
            {
                if ((deep == true))
                {
                    collection.Add(((ContactManager.ContactSource)(((System.ICloneable)(enumerator.Current)).Clone())));
                }
                else
                {
                    collection.Add(enumerator.Current);
                }
            }
        }
Exemple #2
0
 public static ContactManager.ContactSourceCollection PageLoadAll(int pageIndex, int pageSize, CodeFluent.Runtime.PageOptions pageOptions)
 {
     if ((pageIndex < 0))
     {
         pageIndex = 0;
     }
     if ((pageSize < 0))
     {
         if ((pageOptions != null))
         {
             pageSize = pageOptions.DefaultPageSize;
         }
         else
         {
             pageSize = int.MaxValue;
         }
     }
     ContactManager.ContactSourceCollection ret = new ContactManager.ContactSourceCollection();
     System.Data.IDataReader reader             = null;
     try
     {
         reader = ContactManager.ContactSourceCollection.PageDataLoadAll(pageOptions);
         if ((reader == null))
         {
             return(ret);
         }
         ret.LoadAll(pageIndex, pageSize, pageOptions, reader);
     }
     finally
     {
         if ((reader != null))
         {
             reader.Dispose();
         }
         CodeFluent.Runtime.CodeFluentPersistence.CompleteCommand(ContactManager.Constants.ContactManagerStoreName);
     }
     return(ret);
 }
Exemple #3
0
 public virtual ContactManager.ContactSourceCollection Clone(bool deep)
 {
     ContactManager.ContactSourceCollection ret = new ContactManager.ContactSourceCollection();
     this.CopyTo(ret, deep);
     return(ret);
 }
Exemple #4
0
 public static ContactManager.ContactSourceCollection LoadAll()
 {
     ContactManager.ContactSourceCollection ret = ContactManager.ContactSourceCollection.PageLoadAll(int.MinValue, int.MaxValue, null);
     return(ret);
 }
 public virtual void SaveAll(ContactManager.ContactSourceCollection contactSourceCollection)
 {
     ContactManager.ContactSourceCollection contactSourceCollection1 = contactSourceCollection;
     contactSourceCollection1.SaveAll();
 }