Exemple #1
0
        public IFieldMapper Parse(JobParser parser, ParseState state)
        {
            var splitter = parser.ParseSplitter(state.Select("Splitter") ?? state);

            return(new SplittingFieldMapper(splitter, postfix =>
                                            state.Postfix(postfix).SelectMany("Fields").Select(parser.ParseFieldMapper).ToArray()
                                            ));
        }
Exemple #2
0
        IDataFilter IParseFactory <IDataFilter> .Parse(JobParser parser, ParseState state)
        {
            var splitter = parser.ParseSplitter(state.Select("Splitter") ?? state);
            var filter   = splitter as IDataFilter;

            if (filter == null)
            {
                throw new Exception(filter.GetType().Name + " does not implement IDataFilter");
            }

            return(filter);
        }
Exemple #3
0
        ITableMapper IParseFactory <ITableMapper> .Parse(JobParser parser, ParseState state)
        {
            var splitter = parser.ParseSplitter(state.Select("Splitter") ?? state);

            return(new SplittingTableMapper(splitter, name => parser.ParseTableMapper(state.Postfix(name).Select("Table", true))));
        }