Пример #1
0
        /// <summary>
        /// Call-back method required for custom serialization.
        /// </summary>
        public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
        {
            if (IsDisposed)
            {
                throw new ObjectDisposedException(this.ToString());
            }

            info.AddExtended("Values", _Values);
            info.AddValue("SerializeSchema", _SerializeSchema);
            if (SerializeSchema)
            {
                info.AddExtended("Schema", _Schema);
            }
        }
Пример #2
0
        /// <summary>
        /// Call-back method required for custom serialization.
        /// </summary>
        public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
        {
            if (IsDisposed)
            {
                throw new ObjectDisposedException(this.ToString());
            }

            info.AddValue("CaseSensitiveNames", _CaseSensitiveNames);
            info.AddExtended("Aliases", _Aliases);

            int count = 0; foreach (var member in _Members)

            {
                info.AddExtended("Member" + count, member);
                count++;
            }
            info.AddValue("MembersCount", count);
        }
Пример #3
0
        /// <summary>
        /// Call-back method required for custom serialization.
        /// </summary>
        public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
        {
            if (IsDisposed)
            {
                throw new ObjectDisposedException(this.ToString());
            }

            info.AddValue("Name", _Name);
            info.AddExtended("Value", _Value);
        }
        /// <summary>
        /// Call-back method required for custom serialization.
        /// </summary>
        public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
        {
            if (IsDisposed)
            {
                throw new ObjectDisposedException(this.ToString());
            }

            info.AddValue("CaseSensitiveNames", _CaseSensitiveNames);
            info.AddExtended("List", _Members);
        }
Пример #5
0
        /// <summary>
        /// Call-back method required for custom serialization.
        /// </summary>
        public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
        {
            if (IsDisposed)
            {
                throw new ObjectDisposedException(this.ToString());
            }

            info.AddValue("Name", _Name);
            info.AddValue("Indexed", _Indexed);
            info.AddValue("CaseSensitiveMembers", _CaseSensitiveNames);

            info.AddValue("HasValue", _HasValue);
            if (_HasValue)
            {
                info.AddExtended("Value", _Value);
            }

            info.AddExtended("Members", _Members);
        }
Пример #6
0
        /// <summary>
        /// Call-back method required for custom serialization.
        /// </summary>
        public void GetObjectData(SerializationInfo info, StreamingContext context)
        {
            info.AddValue("HolderType", _Type == null ? null : _Type.AssemblyQualifiedName);
            if (_Type == null)
            {
                return;
            }

            var dict = _Value as IDictionary; if (dict != null)
            {
                int count = 0; foreach (DictionaryEntry entry in dict)
                {
                    info.AddExtended("HolderKey" + count, entry.Key);
                    info.AddExtended("HolderValue" + count, entry.Value);
                    count++;
                }
                info.AddValue("HolderCount", count);
                info.AddValue("HolderManaged", "IDictionary");
                return;
            }

            var list = _Value as IList; if (list != null)

            {
                int count = 0; foreach (var entry in list)
                {
                    info.AddExtended("HolderValue" + count, entry);
                    count++;
                }
                info.AddValue("HolderCount", count);
                info.AddValue("HolderManaged", _Type.IsArray ? "Array" : "IList");
                return;
            }

            info.AddValue("HolderValue", _Value);
            info.AddValue("HolderManaged", ((string)null));
        }
Пример #7
0
 /// <summary>
 /// Call-back method required for custom serialization.
 /// </summary>
 public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
 {
     info.AddExtended("List", _List);
 }