Exemplo n.º 1
0
        public virtual void CopyTo(SoftFluent.Json.NET.CustomerCollection collection, bool deep)
        {
            if ((typeof(System.ICloneable).IsAssignableFrom(typeof(SoftFluent.Json.NET.Customer)) == false))
            {
                deep = false;
            }
            System.Collections.Generic.IEnumerator <SoftFluent.Json.NET.Customer> enumerator = this.GetEnumerator();
            bool b;

            for (b = enumerator.MoveNext(); b; b = enumerator.MoveNext())
            {
                if ((deep == true))
                {
                    collection.Add(((SoftFluent.Json.NET.Customer)(((System.ICloneable)(enumerator.Current)).Clone())));
                }
                else
                {
                    collection.Add(enumerator.Current);
                }
            }
        }
Exemplo n.º 2
0
 public static SoftFluent.Json.NET.CustomerCollection 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;
         }
     }
     SoftFluent.Json.NET.CustomerCollection ret = new SoftFluent.Json.NET.CustomerCollection();
     System.Data.IDataReader reader             = null;
     try
     {
         reader = SoftFluent.Json.NET.CustomerCollection.PageDataLoadAll(pageOptions);
         if ((reader == null))
         {
             return(ret);
         }
         ret.LoadAll(pageIndex, pageSize, pageOptions, reader);
     }
     finally
     {
         if ((reader != null))
         {
             reader.Dispose();
         }
         CodeFluent.Runtime.CodeFluentPersistence.CompleteCommand(SoftFluent.Json.NET.Constants.SoftFluent_Json_NETStoreName);
     }
     return(ret);
 }
Exemplo n.º 3
0
 public virtual SoftFluent.Json.NET.CustomerCollection Clone(bool deep)
 {
     SoftFluent.Json.NET.CustomerCollection ret = new SoftFluent.Json.NET.CustomerCollection();
     this.CopyTo(ret, deep);
     return(ret);
 }
Exemplo n.º 4
0
 public static SoftFluent.Json.NET.CustomerCollection LoadAll()
 {
     SoftFluent.Json.NET.CustomerCollection ret = SoftFluent.Json.NET.CustomerCollection.PageLoadAll(int.MinValue, int.MaxValue, null);
     return(ret);
 }