Пример #1
0
 public virtual void SetSpaces(object values)
 {
     if ((values == null))
     {
         return;
     }
     System.Collections.IDictionary dictionary = null;
     dictionary = values as System.Collections.IDictionary;
     if ((dictionary != null))
     {
         this.SetSpaces(dictionary);
         return;
     }
     SoftFluent.Json.NET.SpaceCollection spaces = null;
     spaces = values as SoftFluent.Json.NET.SpaceCollection;
     if ((spaces != null))
     {
         this._spaces = spaces;
         return;
     }
 }
        public virtual void CopyTo(SoftFluent.Json.NET.SpaceCollection collection, bool deep)
        {
            if ((typeof(System.ICloneable).IsAssignableFrom(typeof(SoftFluent.Json.NET.Space)) == false))
            {
                deep = false;
            }
            System.Collections.Generic.IEnumerator <SoftFluent.Json.NET.Space> enumerator = this.GetEnumerator();
            bool b;

            for (b = enumerator.MoveNext(); b; b = enumerator.MoveNext())
            {
                if ((deep == true))
                {
                    collection.Add(((SoftFluent.Json.NET.Space)(((System.ICloneable)(enumerator.Current)).Clone())));
                }
                else
                {
                    collection.Add(enumerator.Current);
                }
            }
        }
 public static SoftFluent.Json.NET.SpaceCollection PageLoadSpacesSupportBySupport(int pageIndex, int pageSize, CodeFluent.Runtime.PageOptions pageOptions, SoftFluent.Json.NET.Support support)
 {
     if ((pageIndex < 0))
     {
         pageIndex = 0;
     }
     if ((pageSize < 0))
     {
         if ((pageOptions != null))
         {
             pageSize = pageOptions.DefaultPageSize;
         }
         else
         {
             pageSize = int.MaxValue;
         }
     }
     SoftFluent.Json.NET.SpaceCollection ret    = new SoftFluent.Json.NET.SpaceCollection();
     System.Data.IDataReader             reader = null;
     try
     {
         reader = SoftFluent.Json.NET.SpaceCollection.PageDataLoadSpacesSupportBySupport(pageOptions, support);
         if ((reader == null))
         {
             return(ret);
         }
         ret.LoadSpacesSupportBySupport(pageIndex, pageSize, pageOptions, reader, support);
     }
     finally
     {
         if ((reader != null))
         {
             reader.Dispose();
         }
         CodeFluent.Runtime.CodeFluentPersistence.CompleteCommand(SoftFluent.Json.NET.Constants.SoftFluent_Json_NETStoreName);
     }
     return(ret);
 }
 public static SoftFluent.Json.NET.SpaceCollection LoadSpacesSupportBySupport(SoftFluent.Json.NET.Support support)
 {
     SoftFluent.Json.NET.SpaceCollection ret = SoftFluent.Json.NET.SpaceCollection.PageLoadSpacesSupportBySupport(int.MinValue, int.MaxValue, null, support);
     return(ret);
 }
 public static SoftFluent.Json.NET.SpaceCollection LoadAll()
 {
     SoftFluent.Json.NET.SpaceCollection ret = SoftFluent.Json.NET.SpaceCollection.PageLoadAll(int.MinValue, int.MaxValue, null);
     return(ret);
 }
 public virtual SoftFluent.Json.NET.SpaceCollection Clone(bool deep)
 {
     SoftFluent.Json.NET.SpaceCollection ret = new SoftFluent.Json.NET.SpaceCollection();
     this.CopyTo(ret, deep);
     return(ret);
 }