Esempio n. 1
0
 /// <summary>
 /// Constructs a new instance of <see cref="NodeV31"/>.
 /// </summary>
 /// <param name="dataSet">
 /// The data set the node is contained within.
 /// </param>
 /// <param name="offset">
 /// The offset in the data structure to the node.
 /// </param>
 /// <param name="reader">
 /// Reader connected to the source data structure and positioned to
 /// start reading.
 /// </param>
 internal NodeV31(
     IStreamDataSet dataSet,
     int offset,
     BinaryReader reader)
     : base(dataSet, offset, reader)
 {
     _rankedSignatureCount = reader.ReadInt32();
     _children             = NodeFactoryShared.ReadNodeIndexesV31(
         (FiftyOne.Foundation.Mobile.Detection.Entities.DataSet)dataSet,
         reader,
         (int)((long)offset + reader.BaseStream.Position - this._nodeStartStreamPosition),
         (int)_childrenCount);
     _position = reader.BaseStream.Position;
 }
 /// <summary>
 /// Constructs a new instance of <see cref="NodeV31"/>.
 /// </summary>
 /// <param name="dataSet">
 /// The data set the node is contained within.
 /// </param>
 /// <param name="offset">
 /// The offset in the data structure to the node.
 /// </param>
 /// <param name="reader">
 /// Reader connected to the source data structure and positioned to
 /// start reading.
 /// </param>
 internal NodeV31(
     DataSet dataSet,
     int offset,
     BinaryReader reader)
     : base(dataSet, offset, reader)
 {
     _rankedSignatureCount = reader.ReadInt32();
     _children             =
         NodeFactoryShared.ReadNodeIndexesV31(
             dataSet,
             reader,
             (int)((long)offset + reader.BaseStream.Position - _nodeStartStreamPosition),
             (int)_childrenCount);
     _numericChildren =
         ReadNodeNumericIndexes(dataSet, reader, NumericChildrenCount);
     _rankedSignatureIndexes =
         Utils.ReadIntegerArray(reader, RankedSignatureCount);
 }
Esempio n. 3
0
 /// <summary>
 /// Used by the constructor to read the variable length list of child
 /// node indexes associated with the node. Returns node indexes from V32
 /// data format.
 /// </summary>
 /// <param name="dataSet">
 /// The data set the node is contained within
 /// </param>
 /// <param name="reader">
 /// Reader connected to the source data structure and positioned to start reading
 /// </param>
 /// <param name="offset">
 /// The offset in the data structure to the node
 /// </param>
 /// <param name="count">
 /// The number of node indexes that need to be read.
 /// </param>
 /// <returns>An array of child node indexes for the node</returns>
 protected override NodeIndex[] ReadNodeIndexes(Entities.DataSet dataSet, BinaryReader reader, int offset, int count)
 {
     return(NodeFactoryShared.ReadNodeIndexesV31(dataSet, reader, offset, count));
 }