51 references to FromResult
mscorlib (11)
system\io\bufferedstream.cs (1)
659
t = Task.
FromResult
<Int32>(val);
system\io\memorystream.cs (1)
397
return (t != null && t.Result == n) ? t : (_lastReadTask = Task.
FromResult
<int>(n));
system\io\stringreader.cs (4)
153
return Task.
FromResult
(ReadLine());
159
return Task.
FromResult
(ReadToEnd());
174
return Task.
FromResult
(ReadBlock(buffer, index, count));
188
return Task.
FromResult
(Read(buffer, index, count));
system\io\textreader.cs (4)
381
return Task.
FromResult
(ReadLine());
388
return Task.
FromResult
(ReadToEnd());
404
return Task.
FromResult
(ReadBlock(buffer, index, count));
419
return Task.
FromResult
(Read(buffer, index, count));
system\io\unmanagedmemorystream.cs (1)
466
return (t != null && t.Result == n) ? t : (_lastReadTask = Task.
FromResult
<Int32>(n));
System (3)
net\System\Net\mail\BufferedReadStream.cs (1)
90
return Task.
FromResult
<int>(read);
net\System\Net\WebSockets\WebSocketConnectionStream.cs (2)
792
return Task.
FromResult
<int>(0);
796
return Task.
FromResult
<int>(m_ReadEventArgs.BytesTransferred);
System.Data (12)
fx\src\data\System\Data\Common\AdapterUtil.cs (2)
82
_trueTask = Task.
FromResult
<bool>(true);
92
_falseTask = Task.
FromResult
<bool>(false);
fx\src\data\System\Data\Common\DBCommand.cs (3)
219
return Task.
FromResult
<int>(ExecuteNonQuery());
255
return Task.
FromResult
<DbDataReader>(ExecuteReader(behavior));
279
return Task.
FromResult
<object>(ExecuteScalar());
fx\src\data\System\Data\Common\DbDataReader.cs (1)
208
return Task.
FromResult
<T>(GetFieldValue<T>(ordinal));
fx\src\data\System\Data\SqlClient\SqlDataReader.cs (5)
4067
return Task.
FromResult
<int>(totalBytesRead);
4157
return Task.
FromResult
<int>(totalBytesRead);
4436
return Task.
FromResult
<T>(GetFieldValueFromSqlBufferInternal<T>(data[i], metaData[i]));
4467
return Task.
FromResult
(GetFieldValueInternal<T>(i));
4515
return Task.
FromResult
<T>(GetFieldValueFromSqlBufferInternal<T>(_data[i], _metaData[i]));
fx\src\data\System\Data\SqlClient\TdsParser.cs (1)
38
completedTask = Task.
FromResult
<object>(null);
System.ServiceModel.Internals (1)
System\Runtime\TaskExtensions.cs (1)
194
Task.
FromResult
((TBase)task.Result) :
System.Web (6)
Hosting\ApplicationManager.cs (1)
627
private static Task<ApplicationResumeStateContainer> _dummyCompletedSuspendTask = Task.
FromResult
<ApplicationResumeStateContainer>(null);
Hosting\HostingEnvironment.cs (1)
143
private static readonly Task<object> _completedTask = Task.
FromResult
<object>(null);
TaskAsyncHelper.cs (1)
19
private static readonly Task s_completedTask = Task.
FromResult
<object>(null);
Util\SynchronizationHelper.cs (1)
68
return Task.
FromResult
<object>(null);
Util\WithinCancellableCallbackTaskAwaitable.cs (1)
18
internal static readonly WithinCancellableCallbackTaskAwaitable Completed = new WithinCancellableCallbackTaskAwaitable(null, ((Task)Task.
FromResult
((object)null)).GetAwaiter());
WebSockets\AspNetWebSocket.cs (1)
75
private static readonly Task _completedTask = Task.
FromResult
<object>(null);
System.Xml (18)
System\Xml\AsyncHelper.cs (4)
9
public static readonly Task DoneTask = Task.
FromResult
(true);
11
public static readonly Task<bool> DoneTaskTrue = Task.
FromResult
(true);
13
public static readonly Task<bool> DoneTaskFalse = Task.
FromResult
(false);
15
public static readonly Task<int> DoneTaskZero = Task.
FromResult
(0);
System\Xml\Core\XmlSubtreeReaderAsync.cs (4)
17
return Task.
FromResult
(curNode.value);
443
return Task.
FromResult
(0);
458
return Task.
FromResult
(copyCount);
479
return Task.
FromResult
(0);
System\Xml\Core\XmlTextReaderImplAsync.cs (5)
42
return Task.
FromResult
(curNode.StringValue);
228
return Task.
FromResult
( ParseFragmentAttribute() );
2955
private Task<Tuple<int, int, int, bool>> parseText_dummyTask = Task.
FromResult
(new Tuple<int, int, int, bool>(0,0,0,false));
3269
return Task.
FromResult
(new Tuple<int, int, int, bool>(pos, pos, outOrChars, true));
3281
return Task.
FromResult
(new Tuple<int, int, int, bool>(startPos, endPos, outOrChars, c == '<'));
System\Xml\Core\XsdCachingReaderAsync.cs (2)
20
return Task.
FromResult
(cachedNode.OriginalStringValue);
23
return Task.
FromResult
(cachedNode.RawValue);
System\Xml\Core\XsdValidatingReaderAsync.cs (1)
22
return Task.
FromResult
(cachedNode.RawValue);
System\Xml\Resolvers\XmlPreloadedResolverAsync.cs (2)
38
return Task.
FromResult
<Object>(data.AsStream());
41
return Task.
FromResult
<Object>(data.AsTextReader());