示例#1
0
        public override bool VisitPropertyAssignment([NotNull] sphereScript99Parser.PropertyAssignmentContext context)
        {
            var propertyName = context.propertyName().GetText();

            if (propertyName.Equals(lookingForName, StringComparison.OrdinalIgnoreCase))
            {
                foundValue = context.propertyValue()?.GetText();
                found      = true;
                return(true);
            }

            return(base.VisitPropertyAssignment(context));
        }
示例#2
0
        public override bool VisitPropertyAssignment([NotNull] sphereScript99Parser.PropertyAssignmentContext context)
        {
            var propertyName = context.propertyName().GetText();
            var value        = context.propertyValue()?.GetText().Trim('"');

            if (propertyName.StartsWith("tag.", StringComparison.OrdinalIgnoreCase))
            {
                var tagName = propertyName.Substring(4);
                tags.Add(tagName, value);
            }
            else
            {
                properties.Add(propertyName, value);
            }

            return(true);
        }
示例#3
0
        public override string VisitPropertyAssignment([NotNull] sphereScript99Parser.PropertyAssignmentContext context)
        {
            var name = context.propertyName().GetText();

            switch (name.ToLower())
            {
            case "email":
                currentAccount.Email = context.propertyValue().GetText();
                break;

            case "lastconnectdate":
                currentAccount.LastConnectDate = DateTime.Parse(context.propertyValue().GetText().Trim('"'));
                break;
            }

            return(base.VisitPropertyAssignment(context));
        }