コード例 #1
0
        public virtual void CopyTo(ContactManager.UserCollection collection, bool deep)
        {
            if ((typeof(System.ICloneable).IsAssignableFrom(typeof(ContactManager.User)) == false))
            {
                deep = false;
            }
            System.Collections.Generic.IEnumerator <ContactManager.User> enumerator = this.GetEnumerator();
            bool b;

            for (b = enumerator.MoveNext(); b; b = enumerator.MoveNext())
            {
                if ((deep == true))
                {
                    collection.Add(((ContactManager.User)(((System.ICloneable)(enumerator.Current)).Clone())));
                }
                else
                {
                    collection.Add(enumerator.Current);
                }
            }
        }
コード例 #2
0
 public static ContactManager.UserCollection PageSearch(int pageIndex, int pageSize, CodeFluent.Runtime.PageOptions pageOptions, int id, string email, string firstName, string lastName)
 {
     if ((pageIndex < 0))
     {
         pageIndex = 0;
     }
     if ((pageSize < 0))
     {
         if ((pageOptions != null))
         {
             pageSize = pageOptions.DefaultPageSize;
         }
         else
         {
             pageSize = int.MaxValue;
         }
     }
     ContactManager.UserCollection ret    = new ContactManager.UserCollection();
     System.Data.IDataReader       reader = null;
     try
     {
         reader = ContactManager.UserCollection.PageDataSearch(pageOptions, id, email, firstName, lastName);
         if ((reader == null))
         {
             return(ret);
         }
         ret.Search(pageIndex, pageSize, pageOptions, reader, id, email, firstName, lastName);
     }
     finally
     {
         if ((reader != null))
         {
             reader.Dispose();
         }
         CodeFluent.Runtime.CodeFluentPersistence.CompleteCommand(ContactManager.Constants.ContactManagerStoreName);
     }
     return(ret);
 }
コード例 #3
0
 public virtual ContactManager.UserCollection Clone(bool deep)
 {
     ContactManager.UserCollection ret = new ContactManager.UserCollection();
     this.CopyTo(ret, deep);
     return(ret);
 }
コード例 #4
0
 public static ContactManager.UserCollection Search(int id, string email, string firstName, string lastName)
 {
     ContactManager.UserCollection ret = ContactManager.UserCollection.PageSearch(int.MinValue, int.MaxValue, null, id, email, firstName, lastName);
     return(ret);
 }
コード例 #5
0
 public static ContactManager.UserCollection LoadAll()
 {
     ContactManager.UserCollection ret = ContactManager.UserCollection.PageLoadAll(int.MinValue, int.MaxValue, null);
     return(ret);
 }
コード例 #6
0
 public virtual void SaveAll(ContactManager.UserCollection userCollection)
 {
     ContactManager.UserCollection userCollection1 = userCollection;
     userCollection1.SaveAll();
 }