예제 #1
0
        public IMapCompilerSettings For <T>(Action <IMapCompilerSettings <T> > setup)
        {
            var builder = new MapCompilerSettings <T>(_types);

            setup?.Invoke(builder);
            return(this);
        }
예제 #2
0
        private Func <IDataRecord, T> CreateMapInternal <T>(Action <IMapCompilerSettings> setup)
        {
            var settings        = new CompilationSettings();
            var compilerBuilder = new MapCompilerSettings(settings);

            setup?.Invoke(compilerBuilder);
            var operation = new MapContext(Provider, typeof(T), settings);
            var map       = Context.MapCompiler.Compile <T>(operation, Reader.Reader);

            return(map);
        }