DecodeMoreData() private method

private DecodeMoreData ( ) : Future
return Future
示例#1
0
文件: IO.cs 项目: sq/Libraries
            void ProcessDecodedChars()
            {
                char value;

                while (Parent.GetCurrentCharacterAndAdvance(out value))
                {
                    Buffer.Append(value);
                }

                var decodeMoreChars = Parent.DecodeMoreData();

                decodeMoreChars.RegisterOnComplete(OnDecodeComplete);
            }
示例#2
0
文件: IO.cs 项目: sq/Libraries
            public void ProcessDecodedChars()
            {
                char value;

                while (Parent.GetCurrentCharacter(out value))
                {
                    if (Position >= (InitialPosition + Count))
                    {
                        Result.Complete(Count);
                        return;
                    }

                    Parent.ReadNextCharacter();

                    Buffer[Position] = value;
                    Position        += 1;
                }

                var decodeMoreChars = Parent.DecodeMoreData();

                decodeMoreChars.RegisterOnComplete(OnDecodeComplete);
            }
示例#3
0
文件: IO.cs 项目: sq/Libraries
            public void ProcessDecodedChars()
            {
                if (Parent.ReadDecodedCharactersUntilSentinel(Buffer, '\n'))
                {
                    if ((Buffer.Length > 0) && (Buffer[Buffer.Length - 1] == '\r'))
                    {
                        Buffer.Remove(Buffer.Length - 1, 1);
                    }

                    if (Parent.EndOfStream)
                    {
                        Parent._ExtraLine = true;
                    }

                    var resultString = Buffer.DisposeAndGetContents();

                    Result.Complete(resultString);
                }
                else
                {
                    var decodeMoreChars = Parent.DecodeMoreData();
                    decodeMoreChars.RegisterOnComplete(OnDecodeComplete);
                }
            }