예제 #1
0
        public static Result <Cursor <T>, TResult> Execute <T, TResult, T1>(this Parser <T, TResult> parser, IReadOnlyList <T> elements, T1 payload1)
            where T1 : class
        {
            var cursor = new ListCursor <T>(elements);

            cursor.GetOrAddContext(() => payload1);

            return(parser.Parse(cursor));
        }
예제 #2
0
        public static Result <Cursor <T>, TResult> Execute <T, TResult>(this Parser <T, TResult> parser, IReadOnlyList <T> elements)
        {
            var cursor = new ListCursor <T>(elements);

            return(parser.Parse(cursor));
        }
예제 #3
0
        public static ListCursor <T> PositionBegin <T>(this List <T> List) where T : class
        {
            ListCursor <T> cursor = new ListCursor <T>(List, -1, RelativePosition.Begin);

            return(cursor);
        }