Esempio n. 1
0
 public void ToStream(ZetboxStreamWriter sw, HashSet <IStreamable> auxObjects, bool eagerLoadLists)
 {
     sw.Write(ReadOnlyContext.GetInterfaceType(this).ToSerializableType());
     sw.Write(ID);
     sw.Write(StringProperty);
     sw.Write(IntProperty);
     sw.Write(BoolProperty);
 }
Esempio n. 2
0
        /// <summary>
        /// Base method for serializing this Object.
        /// </summary>
        /// <param name="sw">Stream to serialize to</param>
        /// <param name="auxObjects">pass a List here to collect auxiliary, eagerly loaded objects. Ignored if null.</param>
        /// <param name="eagerLoadLists">True if Lists should be eager loaded.</param>
        public virtual void ToStream(ZetboxStreamWriter sw, HashSet <IStreamable> auxObjects, bool eagerLoadLists)
        {
            if (sw == null)
            {
                throw new ArgumentNullException("sw");
            }

            sw.Write(ReadOnlyContext.GetInterfaceType(this.GetImplementedInterface()).ToSerializableType());
            sw.Write(this.ID);
        }