Akka.Configuration.Hocon.HoconValue.AppendValue C# (CSharp) Метод

AppendValue() публичный Метод

Adds the given element to the list of elements inside this HoconValue.
public AppendValue ( IHoconElement value ) : void
value IHoconElement The element to add to the list.
Результат void
        public void AppendValue(IHoconElement value)
        {
            Values.Add(value);
        }

Usage Example

Пример #1
0
        public void ParseValue(HoconValue owner)
        {
            if (reader.EoF)
            {
                throw new Exception("End of file reached while trying to read a value");
            }

            bool isObject = owner.IsObject();

            reader.PullWhitespaceAndComments();
            while (reader.IsValue())
            {
                Token t = reader.PullValue();

                switch (t.Type)
                {
                case TokenType.EoF:
                    break;

                case TokenType.LiteralValue:
                    if (isObject)
                    {
                        //needed to allow for override objects
                        isObject = false;
                        owner.Clear();
                    }
                    var lit = new HoconLiteral
                    {
                        Value = t.Value
                    };
                    owner.AppendValue(lit);

                    break;

                case TokenType.ObjectStart:
                    ParseObject(owner, true);
                    break;

                case TokenType.ArrayStart:
                    HoconArray arr = ParseArray();
                    owner.AppendValue(arr);
                    break;

                case TokenType.Substitute:
                    HoconSubstitution sub = ParseSubstitution(t.Value);
                    substitutions.Add(sub);
                    owner.AppendValue(sub);
                    break;
                }
                if (reader.IsSpaceOrTab())
                {
                    ParseTrailingWhitespace(owner);
                }
            }

            IgnoreComma();
        }
All Usage Examples Of Akka.Configuration.Hocon.HoconValue::AppendValue