Inheritance: IJSONError
        protected static void AddError(IJSONValidationContext context, JSONParseItem item, string message)
        {
            if (item == null)
                return;

            var error = new JsonErrorTag
            {
                Flags = JSONErrorFlags.ErrorListError | JSONErrorFlags.UnderlineRed,
                Item = item,
                Start = item.Start,
                AfterEnd = item.AfterEnd,
                Length = item.Length,
                Text = message
            };

            context.AddError(error);
        }
Beispiel #2
0
        protected static void AddError(IJSONValidationContext context, JSONParseItem item, string message)
        {
            if (item == null)
            {
                return;
            }

            var error = new JsonErrorTag
            {
                Flags    = JSONErrorFlags.ErrorListError | JSONErrorFlags.UnderlineRed,
                Item     = item,
                Start    = item.Start,
                AfterEnd = item.AfterEnd,
                Length   = item.Length,
                Text     = message
            };

            context.AddError(error);
        }