/// <summary> /// BinaryFormatter会通过调用此方法来反序列化此块。 /// </summary> /// <param name="info"></param> /// <param name="context"></param> protected TableBlock(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { this.TableType = (Type)info.GetValue(strTableType, typeof(Type)); this.IndexBlockHeadPos = info.GetInt64(strIndexBlockHeadPos); this.NextPos = info.GetInt64(strNext); }
/// <summary> /// Constructs a new instance of the AmazonServiceException class with serialized data. /// </summary> /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param> /// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param> /// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is null. </exception> /// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult" /> is zero (0). </exception> protected StreamSizeMismatchException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { if (info != null) { this.ExpectedSize = info.GetInt64("ExpectedSize"); this.ActualSize = info.GetInt64("ActualSize"); } }
/// <summary> /// BinaryFormatter会通过调用此方法来反序列化此块。 /// </summary> /// <param name="info"></param> /// <param name="context"></param> protected SkipListNodeBlock(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { this.KeyPos = info.GetInt64(strKeyPos); this.ValuePos = info.GetInt64(strValuePos); this.RightPos = info.GetInt64(strRightPos); this.DownPos = info.GetInt64(strDownPos); }
/// <summary> /// BinaryFormatter会通过调用此方法来反序列化此块。 /// </summary> /// <param name="info"></param> /// <param name="context"></param> protected IndexBlock(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { this.SkipListHeadNodePos = info.GetInt64(strSkipListHeadNodePos); this.SkipListTailNodePos = info.GetInt64(strSkipListTailNodePos); this.CurrentLevel = info.GetInt32(strCurrentLevel); this.BindMember = info.GetString(strBindMember); this.NextPos = info.GetInt64(strNext); }
/// <summary> /// BinaryFormatter会通过调用此方法来反序列化此块。 /// </summary> /// <param name="info"></param> /// <param name="context"></param> protected DataBlock(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { this.ObjectLength = info.GetInt32(strObjectLength); this.Data = (byte[])info.GetValue(strData, typeof(byte[])); this.NextPos = info.GetInt64(strNextPos); }
/// <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; }
/// <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"); }
/// <summary> /// Constructs a new instance of the HttpWebRequestResponseData class with serialized data. /// </summary> /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data.</param> /// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param> /// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is null. </exception> /// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult" /> is zero (0). </exception> protected HttpWebRequestResponseData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { if (info != null) { this._headerNames = (string[])info.GetValue("_headerNames", typeof(string[])); this._headerNamesSet = (HashSet <string>)info.GetValue("_headerNamesSet", typeof(HashSet <string>)); this._headers = (Dictionary <string, string>)info.GetValue("_headers", typeof(Dictionary <string, string>)); this.StatusCode = (HttpStatusCode)info.GetValue("StatusCode", typeof(HttpStatusCode)); this.IsSuccessStatusCode = info.GetBoolean("IsSuccessStatusCode"); this.ContentType = info.GetString("ContentType"); this.ContentLength = info.GetInt64("ContentLength"); } }
/// <summary> /// BinaryFormatter会通过调用此方法来反序列化此块。 /// </summary> /// <param name="info"></param> /// <param name="context"></param> protected DBHeaderBlock(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { #if DEBUG this.blockCount = info.GetInt64(strBlockCount); #endif this.FirstTablePagePos = info.GetInt64(strFirstTablePagePos); this.FirstIndexPagePos = info.GetInt64(strFirstIndexPagePos); this.FirstSkipListNodePagePos = info.GetInt64(strFirstSkipListNodePagePos); this.FirstDataPagePos = info.GetInt64(strFirstDataPagePos); this.FirstEmptyPagePos = info.GetInt64(strFirstEmptyPagePos); this.MaxLevelOfSkipList = info.GetInt32(strMaxLevel); this.ProbabilityOfSkipList = info.GetDouble(strProbability); this.MaxSunkCountInMemory = info.GetInt64(strMaxSunkCountInMemory); this.LockTimeout = (TimeSpan)info.GetValue(strLockTimeout, typeof(TimeSpan)); //this.IsDirty = false; }