Ejemplo n.º 1
0
        public static ImmutableNodeReferer makeImmutableNodeRefererForArray(IList <Variant> values)
        {
            var resultChildren = new List <ImmutableNodeReferer>(new ImmutableNodeReferer[values.Count]);

            for (int i = 0; i < values.Count; i++)
            {
                resultChildren[i] = ImmutableNodeReferer.makeNonbranch(ValueNode.makeAtomic(values[i]));
            }

            return(ImmutableNodeReferer.makeBranch(resultChildren));
        }
Ejemplo n.º 2
0
        public static ImmutableNodeReferer makeString(string value)
        {
            ImmutableNodeReferer result = ImmutableNodeReferer.makeBranch();

            result.children = result.children.Add(ImmutableNodeReferer.makeNonbranch(ValueNode.makeDatatype("string")));
            for (int i = 0; i < value.Length; i++)
            {
                result.children = result.children.Add(ImmutableNodeReferer.makeNonbranch(ValueNode.makeAtomic(Variant.makeInt(value[i]))));
            }

            return(result);
        }