コード例 #1
0
ファイル: Asn1Reader.cs プロジェクト: nhtha/Asn1DerParser.NET
 /// <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);
 }
コード例 #2
0
 /// <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);
 }
コード例 #3
0
ファイル: Asn1Reader.cs プロジェクト: nhtha/Asn1DerParser.NET
 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);
 }
コード例 #4
0
ファイル: Asn1Reader.cs プロジェクト: nhtha/Asn1DerParser.NET
 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);
 }
コード例 #5
0
ファイル: Asn1Reader.cs プロジェクト: nhtha/Asn1DerParser.NET
 /// <summary>
 /// Moves to the beginning of the file.
 /// </summary>
 public void Reset()
 {
     currentPosition = _offsetMap[0];
     decode(null, 0);
 }
コード例 #6
0
 /// <summary>
 /// Moves to the beginning of the file.
 /// </summary>
 public void Reset()
 {
     currentPosition = _offsetMap[0];
     m_initialize(null, 0);
 }