/// <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); } }
/// <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]); } }
/// <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); } }
/// <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); }
/// <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); }
/// <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]); } }
/// <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); } }
/// <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); }