В .NET 4.5 многим стандарным классам были добавлены новые методы для поддержки async/await. В What’s New явно упомянут Asynchronous File I/O, но поиск выдает чуть больше новых методов.

Стандартные асинхронные методы появились так же в классах работы с сетью (dns/сокетами/почтой), базами данных и XML:

Namespace Type Methods
System.IO Stream и наследники FlushAsync
ReadAsync
WriteAsync
CopyToAsync
TextReader
StreamReader
StringReader
ReadAsync
ReadBlockAsync
ReadLineAsync
ReadToEndAsync
TextWriter
StringWriter
StreamWriter

WriteAsync
WriteLineAsync
FlushAsync

System.Threading SemaphoreSlim WaitAsync
System.Net Dns GetHostAddressesAsync
GetHostEntryAsync
HttpListener GetContextAsync
HttpListenerContext AcceptWebSocketAsync
HttpListenerRequest GetClientCertificateAsync
WebClient DownloadDataTaskAsync
DownloadFileTaskAsync
DownloadStringTaskAsync
OpenReadTaskAsync
OpenWriteTaskAsync
UploadDataTaskAsync
UploadFileTaskAsync
UploadStringTaskAsync
UploadValuesTaskAsync
System.Net.Mail SmtpClient SendMailAsync
System.Net.NetworkInformation IPGlobalProperties GetUnicastAddressesAsync
Ping SendPingAsync
System.Net.Security NegotiateStream
SslStream
AuthenticateAsClientAsync
AuthenticateAsServerAsync
System.Net.Sockets TcpClient ConnectAsync
TcpListener AcceptSocketAsync
AcceptTcpClientAsync
UdpClient ReceiveAsync
SendAsync
System.Net.WebSockets WebSocket
AspNetWebSocket
CloseAsync
CloseOutputAsync
ReceiveAsync
SendAsync
System.Data.Common DbCommand ExecuteNonQueryAsync
ExecuteReaderAsync
ExecuteScalarAsync
DbConnection OpenAsync
DbDataReader GetFieldValueAsync
IsDBNullAsync
NextResultAsync
ReadAsync
System.Data.SqlClient
(по сравнению с Common)
SqlBulkCopy WriteToServerAsync
SqlCommand ExecuteXmlReaderAsync
System.Net.Http HttpClient DeleteAsync
GetAsync
GetByteArrayAsync
GetStreamAsync
GetStringAsync
PostAsync
PutAsync
SendAsync
HttpContent CopyToAsync
LoadIntoBufferAsync
ReadAsByteArrayAsync
ReadAsStreamAsync
ReadAsStringAsync
System.ServiceModel.Description MetadataExchangeClient GetMetadataAsync
System.ServiceModel.Discovery AnnouncementClient AnnounceOfflineTaskAsync
AnnounceOnlineTaskAsync
System.Xml XmlReader GetValueAsync
MoveToContentAsync
ReadAsync
ReadContentAsAsync
ReadContentAsBase64Async
ReadContentAsBinHexAsync
ReadContentAsObjectAsync
ReadContentAsStringAsync
ReadElementContentAsAsync
ReadElementContentAsBase64Async
ReadElementContentAsBinHexAsync
ReadElementContentAsObjectAsync
ReadElementContentAsStringAsync
ReadInnerXmlAsync
ReadOuterXmlAsync
ReadValueChunkAsync
SkipAsync
XmlWriter FlushAsync
WriteAttributesAsync
WriteAttributeStringAsync
WriteBase64Async
WriteBinHexAsync
WriteCDataAsync
WriteCharEntityAsync
WriteCharsAsync
WriteCommentAsync
WriteDocTypeAsync
WriteElementStringAsync
WriteEndDocumentAsync
WriteEndElementAsync
WriteEntityRefAsync
WriteFullEndElementAsync
WriteNameAsync
WriteNmTokenAsync
WriteNodeAsync
WriteProcessingInstructionAsync
WriteQualifiedNameAsync
WriteRawAsync
WriteStartDocumentAsync
WriteStartElementAsync
WriteStringAsync
WriteSurrogateCharEntityAsync
WriteWhitespaceAsync
XmlDictionaryWriter WriteBase64Async
WriteValueAsync
XmlResolver и наследники GetEntityAsync

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>