コード例 #1
0
        // Token: 0x06001768 RID: 5992 RVA: 0x000B6558 File Offset: 0x000B4758
        private void Process(RtfTokenId tokenId)
        {
            switch (tokenId)
            {
            case RtfTokenId.EndOfFile:
                this.ProcessEOF();
                break;

            case RtfTokenId.Begin:
                this.ProcessBeginGroup();
                return;

            case RtfTokenId.End:
                this.ProcessEndGroup();
                return;

            case RtfTokenId.Binary:
            case (RtfTokenId)6:
                break;

            case RtfTokenId.Keywords:
                this.ProcessKeywords(this.parser.Token);
                return;

            case RtfTokenId.Text:
                this.ProcessText(this.parser.Token);
                return;

            default:
                return;
            }
        }
コード例 #2
0
 public void Initialize(RtfTokenId tokenId, int queueTail, int offset, int length)
 {
     this.id           = tokenId;
     this.offset       = offset;
     this.length       = length;
     this.runQueueTail = queueTail;
     this.Rewind();
 }
コード例 #3
0
		public void Run()
		{
			if (this.endOfFile)
			{
				return;
			}
			RtfTokenId tokenId = this.parser.Parse();
			this.Process(tokenId);
		}
コード例 #4
0
 // Token: 0x06001766 RID: 5990 RVA: 0x000B6514 File Offset: 0x000B4714
 public void Run()
 {
     if (!this.endOfFile)
     {
         RtfTokenId rtfTokenId = this.parser.Parse();
         if (rtfTokenId != RtfTokenId.None)
         {
             this.Process(rtfTokenId);
         }
     }
 }
コード例 #5
0
        // Token: 0x06001736 RID: 5942 RVA: 0x000B4660 File Offset: 0x000B2860
        private void Process(RtfTokenId tokenId)
        {
            if (!this.started)
            {
                this.output.OpenDocument();
                if (this.injection != null && this.injection.HaveHead)
                {
                    this.injection.Inject(true, this.output);
                }
                this.started = true;
            }
            switch (tokenId)
            {
            case RtfTokenId.None:
            case (RtfTokenId)6:
                break;

            case RtfTokenId.EndOfFile:
                this.ProcessEOF();
                break;

            case RtfTokenId.Begin:
                this.ProcessBeginGroup();
                return;

            case RtfTokenId.End:
                this.ProcessEndGroup();
                return;

            case RtfTokenId.Binary:
                this.ProcessBinary(this.parser.Token);
                return;

            case RtfTokenId.Keywords:
                this.ProcessKeywords(this.parser.Token);
                return;

            case RtfTokenId.Text:
                this.ProcessText(this.parser.Token);
                return;

            default:
                return;
            }
        }
コード例 #6
0
        // Token: 0x0600198B RID: 6539 RVA: 0x000C9B08 File Offset: 0x000C7D08
        public override bool ReadMore(ref char[] buffer, ref int start, ref int current, ref int end)
        {
            if (this.parseBuffer.Length - this.parseEnd < 6 && !this.EnsureFreeSpace())
            {
                return(true);
            }
            int num = this.parseEnd;

            if (this.incompleteToken != null)
            {
                if (this.incompleteToken.Id == RtfTokenId.Keywords)
                {
                    this.ProcessKeywords(this.incompleteToken);
                }
                else
                {
                    this.ProcessText(this.incompleteToken);
                }
            }
            while (!this.endOfFile && this.parseBuffer.Length - this.parseEnd >= 6)
            {
                RtfTokenId rtfTokenId = this.parser.Parse();
                if (rtfTokenId == RtfTokenId.None)
                {
                    break;
                }
                this.Process(rtfTokenId);
            }
            buffer = this.parseBuffer;
            if (start != this.parseStart)
            {
                current = this.parseStart + (current - start);
                start   = this.parseStart;
            }
            end = this.parseEnd;
            return(end != num || this.endOfFile);
        }