Beispiel #1
0
 public CoordinatorFactory(
     int depth,
     int stateSlot,
     Expression hasData,
     Expression setKeys,
     Expression checkKeys,
     CoordinatorFactory[] nestedCoordinators,
     Expression element,
     Expression elementWithErrorHandling,
     Expression initializeCollection,
     RecordStateFactory[] recordStateFactories)
     : this(
         depth,
         stateSlot,
         CodeGenEmitter.BuildShaperLambda <bool>(hasData),
         CodeGenEmitter.BuildShaperLambda <bool>(setKeys),
         CodeGenEmitter.BuildShaperLambda <bool>(checkKeys),
         nestedCoordinators,
         typeof(IEntityWrapper).IsAssignableFrom(element.Type)
             ? null
             : CodeGenEmitter.BuildShaperLambda <TElement>(element),
         typeof(IEntityWrapper).IsAssignableFrom(element.Type)
             ? CodeGenEmitter.BuildShaperLambda <IEntityWrapper>(element)
             : null,
         CodeGenEmitter.BuildShaperLambda <TElement>(
             typeof(IEntityWrapper).IsAssignableFrom(element.Type)
                 ? CodeGenEmitter.Emit_UnwrapAndEnsureType(elementWithErrorHandling, typeof(TElement))
                 : elementWithErrorHandling),
         CodeGenEmitter.BuildShaperLambda <ICollection <TElement> >(initializeCollection),
         recordStateFactories)
 {
 }
Beispiel #2
0
 public RecordStateFactory(
     int stateSlotNumber, int columnCount, RecordStateFactory[] nestedRecordStateFactories, DataRecordInfo dataRecordInfo,
     Expression gatherData, string[] propertyNames, TypeUsage[] typeUsages)
     : this(stateSlotNumber, columnCount, nestedRecordStateFactories, dataRecordInfo,
            CodeGenEmitter.BuildShaperLambda <bool>(gatherData), propertyNames, typeUsages, isColumnNested : null)
 {
 }
 internal static Func<Shaper, TResult> Compile<TResult>(Expression body)
 {
     return CodeGenEmitter.BuildShaperLambda<TResult>(body).Compile();
 }