Reset() private method

private Reset ( ) : void
return void
Beispiel #1
0
        private void ParseContents()
        {
            TokenizerStream stream = new TokenizerStream();

            this._t.GetTokens(stream, 2, false);
            stream.Reset();
            int format = this.DetermineFormat(stream);

            stream.GoToPosition(format);
            this._t.GetTokens(stream, -1, false);
            stream.Reset();
            int index = 0;

            this.GetRequiredSizes(stream, ref index);
            this._doc = new SecurityDocument(index);
            int position = 0;

            stream.Reset();
            for (short nextFullToken = stream.GetNextFullToken(); (int)nextFullToken != -1; nextFullToken = stream.GetNextFullToken())
            {
                if (((int)nextFullToken & 16384) == 16384)
                {
                    switch ((short)((int)nextFullToken & 65280))
                    {
                    case 17408:
                        this._doc.AddToken((byte)4, ref position);
                        continue;

                    case 20480:
                        stream.ThrowAwayNextString();
                        continue;

                    case 25344:
                        this._doc.AppendString(" ", ref position);
                        this._doc.AppendString(stream.GetNextString(), ref position);
                        continue;

                    case 16640:
                        this._doc.AddToken((byte)1, ref position);
                        this._doc.AddString(stream.GetNextString(), ref position);
                        continue;

                    case 16896:
                        this._doc.AddToken((byte)2, ref position);
                        this._doc.AddString(stream.GetNextString(), ref position);
                        this._doc.AddString(stream.GetNextString(), ref position);
                        continue;

                    case 17152:
                        this._doc.AddToken((byte)3, ref position);
                        this._doc.AddString(stream.GetNextString(), ref position);
                        continue;

                    default:
                        throw new XmlSyntaxException();
                    }
                }
            }
        }
Beispiel #2
0
        private void ParseContents() 
        { 
            short i;
 
            TokenizerStream stream = new TokenizerStream();

            _t.GetTokens( stream, 2, false );
            stream.Reset(); 

            int gotoPosition = DetermineFormat( stream ); 
 
            stream.GoToPosition( gotoPosition );
            _t.GetTokens( stream, -1, false ); 
            stream.Reset();

            int neededIndex = 0;
 
            GetRequiredSizes( stream, ref neededIndex );
 
            _doc = new SecurityDocument( neededIndex ); 
            int position = 0;
 
            stream.Reset();

            for (i = stream.GetNextFullToken(); i != -1; i = stream.GetNextFullToken())
            { 
                if ((i & c_flag) != c_flag)
                    continue; 
                else 
                {
                    switch((short)(i & 0xFF00)) 
                    {
                    case c_elementtag:
                        _doc.AddToken( SecurityDocument.c_element, ref position );
                        _doc.AddString( stream.GetNextString(), ref position ); 
                        break;
 
                    case c_attributetag: 
                        _doc.AddToken( SecurityDocument.c_attribute, ref position );
                        _doc.AddString( stream.GetNextString(), ref position ); 
                        _doc.AddString( stream.GetNextString(), ref position );
                        break;

                    case c_texttag: 
                        _doc.AddToken( SecurityDocument.c_text, ref position );
                        _doc.AddString( stream.GetNextString(), ref position ); 
                        break; 

                    case c_additionaltexttag: 
                        _doc.AppendString( " ", ref position );
                        _doc.AppendString( stream.GetNextString(), ref position );
                        break;
 
                    case c_childrentag:
                        _doc.AddToken( SecurityDocument.c_children, ref position ); 
                        break; 

                    case c_wastedstringtag: 
                        stream.ThrowAwayNextString();
                        break;

                    default: 
                        throw new XmlSyntaxException();
                    } 
                } 
            }
        } 
        // Token: 0x06002B99 RID: 11161 RVA: 0x000A3874 File Offset: 0x000A1A74
        private void ParseContents()
        {
            TokenizerStream tokenizerStream = new TokenizerStream();

            this._t.GetTokens(tokenizerStream, 2, false);
            tokenizerStream.Reset();
            int position = this.DetermineFormat(tokenizerStream);

            tokenizerStream.GoToPosition(position);
            this._t.GetTokens(tokenizerStream, -1, false);
            tokenizerStream.Reset();
            int numData = 0;

            this.GetRequiredSizes(tokenizerStream, ref numData);
            this._doc = new SecurityDocument(numData);
            int num = 0;

            tokenizerStream.Reset();
            for (short nextFullToken = tokenizerStream.GetNextFullToken(); nextFullToken != -1; nextFullToken = tokenizerStream.GetNextFullToken())
            {
                if ((nextFullToken & 16384) == 16384)
                {
                    short num2 = (short)((int)nextFullToken & 65280);
                    if (num2 <= 17152)
                    {
                        if (num2 == 16640)
                        {
                            this._doc.AddToken(1, ref num);
                            this._doc.AddString(tokenizerStream.GetNextString(), ref num);
                            goto IL_19D;
                        }
                        if (num2 == 16896)
                        {
                            this._doc.AddToken(2, ref num);
                            this._doc.AddString(tokenizerStream.GetNextString(), ref num);
                            this._doc.AddString(tokenizerStream.GetNextString(), ref num);
                            goto IL_19D;
                        }
                        if (num2 == 17152)
                        {
                            this._doc.AddToken(3, ref num);
                            this._doc.AddString(tokenizerStream.GetNextString(), ref num);
                            goto IL_19D;
                        }
                    }
                    else
                    {
                        if (num2 == 17408)
                        {
                            this._doc.AddToken(4, ref num);
                            goto IL_19D;
                        }
                        if (num2 == 20480)
                        {
                            tokenizerStream.ThrowAwayNextString();
                            goto IL_19D;
                        }
                        if (num2 == 25344)
                        {
                            this._doc.AppendString(" ", ref num);
                            this._doc.AppendString(tokenizerStream.GetNextString(), ref num);
                            goto IL_19D;
                        }
                    }
                    throw new XmlSyntaxException();
                }
                IL_19D :;
            }
        }
        private void ParseContents()
        {
            TokenizerStream stream = new TokenizerStream();

            this._t.GetTokens(stream, 2, false);
            stream.Reset();
            int position = this.DetermineFormat(stream);

            stream.GoToPosition(position);
            this._t.GetTokens(stream, -1, false);
            stream.Reset();
            int index = 0;

            this.GetRequiredSizes(stream, ref index);
            this._doc = new SecurityDocument(index);
            int num4 = 0;

            stream.Reset();
            for (short i = stream.GetNextFullToken(); i != -1; i = stream.GetNextFullToken())
            {
                if ((i & 0x4000) == 0x4000)
                {
                    switch (((short)(i & 0xff00)))
                    {
                    case 0x4400:
                    {
                        this._doc.AddToken(4, ref num4);
                        continue;
                    }

                    case 0x5000:
                    {
                        stream.ThrowAwayNextString();
                        continue;
                    }

                    case 0x6300:
                    {
                        this._doc.AppendString(" ", ref num4);
                        this._doc.AppendString(stream.GetNextString(), ref num4);
                        continue;
                    }

                    case 0x4100:
                    {
                        this._doc.AddToken(1, ref num4);
                        this._doc.AddString(stream.GetNextString(), ref num4);
                        continue;
                    }

                    case 0x4200:
                    {
                        this._doc.AddToken(2, ref num4);
                        this._doc.AddString(stream.GetNextString(), ref num4);
                        this._doc.AddString(stream.GetNextString(), ref num4);
                        continue;
                    }

                    case 0x4300:
                    {
                        this._doc.AddToken(3, ref num4);
                        this._doc.AddString(stream.GetNextString(), ref num4);
                        continue;
                    }
                    }
                    throw new XmlSyntaxException();
                }
            }
        }
        private void ParseContents()
        {
            short i;

            TokenizerStream stream = new TokenizerStream();

            _t.GetTokens(stream, 2, false);
            stream.Reset();

            int gotoPosition = DetermineFormat(stream);

            stream.GoToPosition(gotoPosition);
            _t.GetTokens(stream, -1, false);
            stream.Reset();

            int neededIndex = 0;

            GetRequiredSizes(stream, ref neededIndex);

            _doc = new SecurityDocument(neededIndex);
            int position = 0;

            stream.Reset();

            for (i = stream.GetNextFullToken(); i != -1; i = stream.GetNextFullToken())
            {
                if ((i & c_flag) != c_flag)
                {
                    continue;
                }
                else
                {
                    switch ((short)(i & 0xFF00))
                    {
                    case c_elementtag:
                        _doc.AddToken(SecurityDocument.c_element, ref position);
                        _doc.AddString(stream.GetNextString(), ref position);
                        break;

                    case c_attributetag:
                        _doc.AddToken(SecurityDocument.c_attribute, ref position);
                        _doc.AddString(stream.GetNextString(), ref position);
                        _doc.AddString(stream.GetNextString(), ref position);
                        break;

                    case c_texttag:
                        _doc.AddToken(SecurityDocument.c_text, ref position);
                        _doc.AddString(stream.GetNextString(), ref position);
                        break;

                    case c_additionaltexttag:
                        _doc.AppendString(" ", ref position);
                        _doc.AppendString(stream.GetNextString(), ref position);
                        break;

                    case c_childrentag:
                        _doc.AddToken(SecurityDocument.c_children, ref position);
                        break;

                    case c_wastedstringtag:
                        stream.ThrowAwayNextString();
                        break;

                    default:
                        throw new XmlSyntaxException();
                    }
                }
            }
        }
 private void ParseContents()
 {
     TokenizerStream stream = new TokenizerStream();
     this._t.GetTokens(stream, 2, false);
     stream.Reset();
     int position = this.DetermineFormat(stream);
     stream.GoToPosition(position);
     this._t.GetTokens(stream, -1, false);
     stream.Reset();
     int index = 0;
     this.GetRequiredSizes(stream, ref index);
     this._doc = new SecurityDocument(index);
     int num4 = 0;
     stream.Reset();
     for (short i = stream.GetNextFullToken(); i != -1; i = stream.GetNextFullToken())
     {
         if ((i & 0x4000) == 0x4000)
         {
             switch (((short) (i & 0xff00)))
             {
                 case 0x4400:
                 {
                     this._doc.AddToken(4, ref num4);
                     continue;
                 }
                 case 0x5000:
                 {
                     stream.ThrowAwayNextString();
                     continue;
                 }
                 case 0x6300:
                 {
                     this._doc.AppendString(" ", ref num4);
                     this._doc.AppendString(stream.GetNextString(), ref num4);
                     continue;
                 }
                 case 0x4100:
                 {
                     this._doc.AddToken(1, ref num4);
                     this._doc.AddString(stream.GetNextString(), ref num4);
                     continue;
                 }
                 case 0x4200:
                 {
                     this._doc.AddToken(2, ref num4);
                     this._doc.AddString(stream.GetNextString(), ref num4);
                     this._doc.AddString(stream.GetNextString(), ref num4);
                     continue;
                 }
                 case 0x4300:
                 {
                     this._doc.AddToken(3, ref num4);
                     this._doc.AddString(stream.GetNextString(), ref num4);
                     continue;
                 }
             }
             throw new XmlSyntaxException();
         }
     }
 }