﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Pather.CSharp.PathElements
{
    public abstract class PathElementBase : IPathElement
    {
        public Selection Apply(Selection target)
        {
            var results = new List<object>();
            foreach (var entriy in target.Entries)
            {
                results.Add(Apply(entriy));
            }
            var result = new Selection(results);
            return result;
        }

        public abstract object Apply(object target);
    }
}

Add base class for path elements that has a good default implementation for Apply on Selection
Add base class for path elements that has a good default implementation for Apply on Selection
