/// <summary>
        ///     Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with the data needed to serialize the target object.
        /// </summary>
        /// <param name="info">
        ///     The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> to populate with data.
        /// </param>
        /// <param name="context">
        ///     The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext" /> ) for this serialization.
        /// </param>
        /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission.</exception>
        public void GetObjectData(SerializationInfo info, StreamingContext context)
        {
            info.AddValueWithType("BindingType", BindingType);
            info.AddValueWithType("Member", Member);

            OnSerialize(info, context);
        }
        /// <summary>
        ///     Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with the data needed to serialize the target object.
        /// </summary>
        /// <param name="info"> The info. </param>
        /// <param name="context"> The context. </param>
        protected override void OnSerialize(SerializationInfo info, StreamingContext context)
        {
            base.OnSerialize(info, context);

            info.AddValueWithType("Member", Member);
            info.AddValueWithType("Expression", Expression);
        }
Beispiel #3
0
        /// <summary>
        ///     Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with the data needed to serialize the target object.
        /// </summary>
        /// <param name="info"> The info. </param>
        /// <param name="context"> The context. </param>
        protected override void OnSerialize(SerializationInfo info, StreamingContext context)
        {
            base.OnSerialize(info, context);

            info.AddValueWithType("Left", Left);
            info.AddValueWithType("Right", Right);
        }
        /// <summary>
        ///     Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with the data needed to serialize the target object.
        /// </summary>
        /// <param name="info"> The info. </param>
        /// <param name="context"> The context. </param>
        protected override void OnSerialize(SerializationInfo info, StreamingContext context)
        {
            base.OnSerialize(info, context);

            info.AddValueWithType("NewExpression", NewExpression);
            info.AddValueWithType("Bindings", Bindings);
        }
Beispiel #5
0
        /// <summary>
        ///     Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with the data needed to serialize the target object.
        /// </summary>
        /// <param name="info">
        ///     The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> to populate with data.
        /// </param>
        /// <param name="context">
        ///     The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext" /> ) for this serialization.
        /// </param>
        /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission.</exception>
        public void GetObjectData(SerializationInfo info, StreamingContext context)
        {
            info.AddValueWithType("Type", Arguments);
            info.AddValueWithType("AddMethod", AddMethod);

            OnSerialize(info, context);
        }
Beispiel #6
0
        /// <summary>
        ///     Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with the data needed to serialize the target object.
        /// </summary>
        /// <param name="info"> The info. </param>
        /// <param name="context"> The context. </param>
        protected override void OnSerialize(SerializationInfo info, StreamingContext context)
        {
            base.OnSerialize(info, context);

            info.AddValueWithType("Test", Test);
            info.AddValueWithType("IfTrue", IfTrue);
            info.AddValueWithType("IfFalse", IfFalse);
        }
Beispiel #7
0
        /// <summary>
        ///     Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with the data needed to serialize the target object.
        /// </summary>
        /// <param name="info"> The info. </param>
        /// <param name="context"> The context. </param>
        protected override void OnSerialize(SerializationInfo info, StreamingContext context)
        {
            base.OnSerialize(info, context);

            info.AddValueWithType("Constructor", Constructor);
            info.AddValueWithType("Members", Members);
            info.AddValueWithType("Arguments", Arguments);
        }
        /// <summary>
        ///     Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with the data needed to serialize the target object.
        /// </summary>
        /// <param name="info"> The info. </param>
        /// <param name="context"> The context. </param>
        protected override void OnSerialize(SerializationInfo info, StreamingContext context)
        {
            base.OnSerialize(info, context);

            info.AddValueWithType("Method", Method);
            info.AddValueWithType("Object", Object);
            info.AddValueWithType("Arguments", Arguments);
        }
Beispiel #9
0
        /// <summary>
        ///     Adds the typed collection.
        /// </summary>
        /// <param name="info"> The info. </param>
        /// <param name="name"> The name. </param>
        /// <param name="value"> The value. </param>
        public static void AddTypedCollection(this SerializationInfo info, string name, IList value)
        {
            info.AddValue(name + "_IsNull", value == null);

            if (value != null)
            {
                info.AddValue(name + "_Length", value.Count);
                info.AddValue(name + "_Type", value.GetType( )
                              .AssemblyQualifiedName);

                int index = 0;

                foreach (object item in value)
                {
                    if (item == null)
                    {
                        continue;
                    }

                    info.AddValueWithType(string.Format(name + _prefix, index), item);

                    index++;
                }
            }
        }
        /// <summary>
        ///     Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with the data needed to serialize the target object.
        /// </summary>
        /// <param name="info"> The info. </param>
        /// <param name="context"> The context. </param>
        protected override void OnSerialize(SerializationInfo info, StreamingContext context)
        {
            base.OnSerialize(info, context);

            info.AddValueWithType("Body", Body);
            info.AddValue("Parameters", Parameters);
        }
        /// <summary>
        ///     Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with the data needed to serialize the target object.
        /// </summary>
        /// <param name="info"> The info. </param>
        /// <param name="context"> The context. </param>
        protected override void OnSerialize(SerializationInfo info, StreamingContext context)
        {
            base.OnSerialize(info, context);

            info.AddValueWithType("Value", Value);
        }