Balakin.VSOutputEnhancer.Parsers.NpmMessage.NpmMessageData.Fill C# (CSharp) Method

Fill() protected method

protected Fill ( Match match, Span originalSpan ) : void
match System.Text.RegularExpressions.Match
originalSpan Span
return void
        protected override void Fill(Match match, Span originalSpan)
        {
            base.Fill(match, originalSpan);

            var npmMessageTypeGroup = match.Groups["NpmMessageType"];
            if (npmMessageTypeGroup.Success) {
                var span = new Span(originalSpan.Start + npmMessageTypeGroup.Index, npmMessageTypeGroup.Length);
                switch (npmMessageTypeGroup.Value) {
                        case "WARN":
                        Type = new ParsedValue<MessageType>(MessageType.Warning, span);
                        break;
                    case "ERR!":
                        Type = new ParsedValue<MessageType>(MessageType.Error, span);
                        break;
                    default:
                        throw new ArgumentOutOfRangeException();
                }
            }
        }
NpmMessageData