Пример #1
0
 public Task <IEnumerable <TMapped> > MapToAsync <TMapped>(
     bool selectFromAvailableProperties  = true,
     CancellationToken cancellationToken = default(CancellationToken))
 {
     return(Task.Factory.StartNew(
                () =>
     {
         cancellationToken.ThrowIfCancellationRequested();
         using (_db.Lock())
         {
             cancellationToken.ThrowIfCancellationRequested();
             return _innerQuery.MapTo <TMapped>(selectFromAvailableProperties);
         }
     }, cancellationToken, _taskCreationOptions,
                _taskScheduler ?? TaskScheduler.Default));
 }