예제 #1
0
 /// <summary>
 ///    Maps a list of models to the corresponding snapshot arrays. If the list if null or empty, null will be returned
 /// </summary>
 public static Task <TSnapshot[]> MapToSnapshots <TModel, TSnapshot, TSnapshotContext, TModelContext>(this SnapshotMapperBase <TModel, TSnapshot, TSnapshotContext, TModelContext> mapper, IEnumerable <TModel> models, TModelContext modelContext)
     where TSnapshot : new()
     where TSnapshotContext : SnapshotContext
 {
     return(MapTo(models, m => mapper.MapToSnapshot(m, modelContext)));
 }
예제 #2
0
 /// <summary>
 ///    Maps a list of snapshot to the corresponding model arrays. If the list if null or empty, null will be returned
 /// </summary>
 public static Task <TModel[]> MapToModels <TModel, TSnapshot, TSnapshotContext>(this SnapshotMapperBase <TModel, TSnapshot, TSnapshotContext> mapper, IEnumerable <TSnapshot> snapshots, Func <TSnapshot, Task <TModel> > mapToModelFunc)
     where TSnapshot : new()
     where TSnapshotContext : SnapshotContext
 {
     return(MapTo(snapshots, mapToModelFunc));
 }
예제 #3
0
 /// <summary>
 ///    Maps a list of snapshot to the corresponding model arrays. If the list if null or empty, null will be returned
 /// </summary>
 public static Task <TModel[]> MapToModels <TModel, TSnapshot, TSnapshotContext>(this SnapshotMapperBase <TModel, TSnapshot, TSnapshotContext> mapper, IEnumerable <TSnapshot> snapshots, TSnapshotContext snapshotContext)
     where TSnapshot : new()
     where TSnapshotContext : SnapshotContext
 {
     return(MapToModels(mapper, snapshots, s => mapper.MapToModel(s, snapshotContext)));
 }
 /// <summary>
 ///    Maps a list of snapshot to the corresponding model arrays. If the list if null or empty, null will be returned
 /// </summary>
 public static Task <TModel[]> MapToModels <TModel, TSnapshot>(this SnapshotMapperBase <TModel, TSnapshot> mapper, IEnumerable <TSnapshot> snapshots) where TSnapshot : new()
 {
     return(MapToModels(mapper, snapshots, mapper.MapToModel));
 }
 /// <summary>
 ///    Maps a list of models to the corresponding snapshot arrays. If the list if null or empty, null will be returned
 /// </summary>
 public static Task <TSnapshot[]> MapToSnapshots <TModel, TSnapshot>(this SnapshotMapperBase <TModel, TSnapshot> mapper, IEnumerable <TModel> models, Func <TModel, Task <TSnapshot> > mapToSnapshotFunc) where TSnapshot : new()
 {
     return(MapTo(models, mapToSnapshotFunc));
 }
 /// <summary>
 ///    Maps a list of models to the corresponding snapshot arrays. If the list if null or empty, null will be returned
 /// </summary>
 public static Task <TSnapshot[]> MapToSnapshots <TModel, TSnapshot>(this SnapshotMapperBase <TModel, TSnapshot> mapper, IEnumerable <TModel> models) where TSnapshot : new()
 {
     return(MapToSnapshots(mapper, models, mapper.MapToSnapshot));
 }