예제 #1
0
 public static IEnumerable <INode> GetFlattenedNodes(this NodeArrayNode arrayNode)
 {
     return(arrayNode
            .Nodes
            .SelectMany(t => (t is NodeArrayNode array) ?
                        array.GetFlattenedNodes() :
                        new[] { t }));
 }
예제 #2
0
        protected FunctionNode(SerializationInfo info, StreamingContext context)
        {
            if (info == null)
            {
                throw new ArgumentNullException(nameof(info));
            }

            Arguments    = (NodeArrayNode)info.GetValue(nameof(Arguments).ToCamelCase(), typeof(NodeArrayNode));
            FunctionName = info.GetString(nameof(FunctionName).ToCamelCase());
        }
예제 #3
0
 public FunctionNode(string functionName, IEnumerable <INode> arguments)
 {
     FunctionName = functionName;
     Arguments    = new NodeArrayNode(arguments);
 }