Esempio n. 1
0
        /// <summary>
        /// BinaryFormatter会通过调用此方法来反序列化此块。
        /// </summary>
        /// <param name="info"></param>
        /// <param name="context"></param>
        protected PageHeaderBlock(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
            : base(info, context)
        {
            this.AvailableBytes = info.GetInt16(strAvailableBytes);
            this.OccupiedBytes  = info.GetInt16(strOccupiedBytes);
            this.NextPagePos    = info.GetInt64(strNextPagePos);

            //this.IsDirty = false;
        }
Esempio n. 2
0
 /// <summary>
 /// Construtor usado para deserializar os dados.
 /// </summary>
 /// <param name="info"></param>
 /// <param name="context"></param>
 protected CommandExecutionInfo(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
 {
     _commandText = info.GetString("CommandText");
     _commandType = (System.Data.CommandType)info.GetInt16("CommandType");
     _elapsedTime = new TimeSpan(info.GetInt64("ElapsedTime"));
     _timeout     = info.GetInt32("Timeout");
     _success     = info.GetBoolean("Success");
     _error       = (Exception)info.GetValue("Error", typeof(Exception));
     _rowsAffects = info.GetInt32("RowsAffects");
 }