/// <summary> /// Moves over current type to the next type at the same level. If the current type is a /// container (or constructed type), the method skips entire container. /// </summary> /// <returns> /// <strong>True</strong> if the current type is not the last type at the current deepness level (or upper /// level), otherwise <strong>False</strong>. /// </returns> public Boolean MoveNextCurrentLevel() { if (NextCurrentLevelOffset == 0) { return(false); } currentPosition = _offsetMap[NextCurrentLevelOffset]; decode(null, NextCurrentLevelOffset); return(true); }
/// <summary> /// Moves from the current structure to the next structure. If current structure is container or constructed type (<strong>SEQUENCE</strong>, /// <strong>SEQUENCE OF</strong>, <strong>SET</strong>, <strong>SET OF</strong>, <strong>OCTET STRING</strong> or <strong>context-specific</strong>), /// <strong>MoveNext()</strong> method moves to the inner (wrapped) structure which starts at the container's payload position. /// <p>If the current structure is primitive type, <strong>MoveNext()</strong> method seeks over current type to the next structure.</p> /// </summary> /// <returns><strong>True</strong> if the current structure is not the last in the data contained in <strong>RawData</strong> property and there /// are no inner (wrapped) structures, otherwise <strong>False</strong></returns> public Boolean MoveNext() { if (NextOffset == 0) { return(false); } //projectedIterationSize = _offsetMap[NextOffset]; currentPosition = _offsetMap[NextOffset]; m_initialize(null, NextOffset); return(true); }
Asn1Reader(Byte[] rawData, Int32 offset) { if (rawData == null) { throw new ArgumentNullException(nameof(rawData)); } if (rawData.Length < 2) { throw new Win32Exception(Strings.InvalidDataException); } currentPosition = new AsnInternalMap(); _offsetMap.Add(0, currentPosition); decode(rawData, offset); }
public Boolean MoveToPoisition(Int32 newPosition) { if (_offsetMap == null) { throw new InvalidOperationException(); } if (!_offsetMap.ContainsKey(newPosition)) { return(false); } currentPosition = _offsetMap[newPosition]; decode(null, newPosition); return(true); }
/// <summary> /// Moves to the beginning of the file. /// </summary> public void Reset() { currentPosition = _offsetMap[0]; decode(null, 0); }
/// <summary> /// Moves to the beginning of the file. /// </summary> public void Reset() { currentPosition = _offsetMap[0]; m_initialize(null, 0); }