Пример #1
0
 /// <summary>
 /// Recupera os dados da instância anteriormente serializada.
 /// </summary>
 /// <param name="info"></param>
 /// <param name="context"></param>
 void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
 {
     info.AddValue("TermType", _term != null ? _term.GetType().FullName : null);
     if (_term != null)
     {
         info.AddValue("Term", _term);
     }
 }
Пример #2
0
        /// <summary>
        /// Recupera os dados da instância anteriormente serializada.
        /// </summary>
        /// <param name="info"></param>
        /// <param name="context"></param>
        protected override void GetObjectData(SerializationInfo info, StreamingContext context)
        {
            base.GetObjectData(info, context);
            info.AddValue("T", _call.GetType().FullName);
            info.AddValue("M", _call);
            info.AddValue("Options", (int)_options);
            var size = _parameters.IsNullOrEmpty() ? 0 : _parameters.Length;

            info.AddValue("S", size);
            for (var i = 0; i < size; ++i)
            {
                SetTerm(info, i, _parameters[i]);
            }
        }
Пример #3
0
        /// <summary>
        /// Recupera os dados
        /// </summary>
        /// <param name="info"></param>
        /// <param name="context"></param>
        protected override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
        {
            base.GetObjectData(info, context);
            string termType = null;

            if (_term != null)
            {
                termType = _term.GetType().FullName;
                info.AddValue("TermType", termType);
                info.AddValue("Term", _term);
            }
            else
            {
                info.AddValue("TermType", termType);
            }
        }
Пример #4
0
 /// <summary>
 /// Recupera os dados serializados da instancia.
 /// </summary>
 /// <param name="info"></param>
 /// <param name="context"></param>
 void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
 {
     info.AddValue("ExpressionType", _expression != null ? _expression.GetType().FullName : null);
     info.AddValue("Expression", _expression);
     info.AddValue("ResultExpressionType", _resultExpression != null ? _resultExpression.GetType().FullName : null);
     info.AddValue("ResultExpression", _resultExpression);
 }
Пример #5
0
 /// <summary>
 /// Recupera os dados do objeto para serialização.
 /// </summary>
 /// <param name="info"></param>
 /// <param name="context"></param>
 protected override void GetObjectData(SerializationInfo info, StreamingContext context)
 {
     base.GetObjectData(info, context);
     info.AddValue("LeftType", _left.GetType().FullName);
     info.AddValue("Left", _left);
     info.AddValue("Operator", _operator);
     info.AddValue("RightType", _right.GetType().FullName);
     info.AddValue("Right", _right);
 }
Пример #6
0
 /// <summary>
 /// Recupera os dados serializados da instancia.
 /// </summary>
 /// <param name="info"></param>
 /// <param name="context"></param>
 protected override void GetObjectData(SerializationInfo info, StreamingContext context)
 {
     base.GetObjectData(info, context);
     info.AddValue("InputExpressionType", _inputExpression != null ? _inputExpression.GetType().FullName : null);
     info.AddValue("InputExpression", _inputExpression);
     info.AddValue("ElseResultExpressionType", _elseResultExpression != null ? _elseResultExpression.GetType().FullName : null);
     info.AddValue("ElseResultExpression", _elseResultExpression);
     info.AddValue("WhenExpressionsCount", _whenExpressions.Count);
     for (var i = 0; i < _whenExpressions.Count; i++)
     {
         info.AddValue(string.Format("WhenExpression{0}", i), _whenExpressions[i]);
     }
 }
Пример #7
0
        /// <summary>
        /// Serializa um termo na posição <paramref name="index"/>.
        /// </summary>
        /// <param name="info"></param>
        /// <param name="index"></param>
        /// <param name="term"></param>
        private static void SetTerm(SerializationInfo info, int index, ConditionalTerm term)
        {
            var tName = String.Format("t{0}", index);
            var pName = String.Format("p{0}", index);

            if (term == null)
            {
                info.AddValue(tName, "NULL");
            }
            else
            {
                info.AddValue(tName, term.GetType().FullName);
                info.AddValue(pName, term);
            }
        }
Пример #8
0
 /// <summary>
 /// Insere o tip do termo condicional
 /// </summary>
 /// <param name="writer"></param>
 /// <param name="term"></param>
 protected void InsertConditionalTermType(Colosoft.Serialization.IO.CompactWriter writer, ConditionalTerm term)
 {
     writer.Write(term.GetType().Name);
 }