public ProcPage(IProjection model, IProjection result) { this.M = model?.Cast <TModel>() ?? throw new ArgumentNullException(nameof(model)); this.R = result?.Cast <TResult>() ?? throw new ArgumentNullException(nameof(result)); this.Context = model.Context; this.Model = (TModel)this.M.Attr().Field?.Invoke()?.Value; }
public ProcPage(IProjection model, IProjection result) { this.M = model?.Cast <TModel>() ?? throw new ArgumentNullException(nameof(model)); this.R = result?.Cast <TResult>() ?? throw new ArgumentNullException(nameof(result)); this.Context = model.Context; this.Model = (TModel)(this.M.Attr().Data?.Source.Snapshot ?? default); }
public static IEnumerable <IProjection> Vals(this IProjection projection, int batchIndex = -1) => projection.Cast <object>().Vals(batchIndex);