Esempio n. 1
0
        public bool Equals(PromptTag other)
        {
            if (ReferenceEquals(null, other)) return false;
            if (ReferenceEquals(this, other)) return true;

            return string.Equals(GameTime, other.GameTime) && string.Equals(Prompt, other.Prompt);
        }
Esempio n. 2
0
        public PromptChunkReader()
        {
            _reader = new ChunkReader<PromptTag>("<prompt", "</prompt", skipNewLineAfterTag: false);
            _reader.Append = (builder, result, tag) => {

                var skip = 0;

                if(_count == 0 && !tag.Equals(_lastPrompt)) {
                    builder.Append(tag.Prompt);
                }
                else {
                    skip = 1;
                }

                _lastPrompt = tag;
                result.AddTag(tag);
                _count++;
                return skip;
            };
        }