Esempio n. 1
0
        // This handles adding and removing things from the error list
        private void OnXamlDocParsed(object sender, RapidXamlParsingEventArgs e)
        {
            var visibleErrors = RapidXamlDocumentCache.ErrorListTags(this.file);

            var projectName = this.GetProjectName(this.file);

            var result = new FileErrorCollection {
                Project = projectName, FilePath = this.file
            };

            foreach (var viewTag in visibleErrors)
            {
                result.Errors.Add(viewTag.AsErrorRow());
            }

            ErrorListService.Process(result);

            // As the tags that are shown in the error list might have changed, trigger that to be updated too.
            if (e != null)
            {
                var span = new SnapshotSpan(e.Snapshot, 0, e.Snapshot.Length);
                this.TagsChanged?.Invoke(this, new SnapshotSpanEventArgs(span));
            }
        }
Esempio n. 2
0
        public void RaiseTagsChanged()
        {
            var args = new RapidXamlParsingEventArgs(null, this.file, this.buffer.CurrentSnapshot, ParsedAction.Update);

            this.OnXamlDocParsed(this, args);
        }