A recent async / await template recommends specifying method names with the name "Async", such as " GetAsync () ".
Now let's say that I am using the old asynchronous template , i.e. one that has a pair of Begin / End and IAsyncResult. And I have a method that completes the call to this method, for example:
IAsyncResult
public void SendAsync(byte[] data) { this.stream.BeginWrite(...); }
Also suppose that the method EndWritepassed in BeginWriteis the same for all data, i.e. it will be a method in the same class.
EndWrite
BeginWrite
In this case, is it wrong to specify this method SendAsync(), since it could be confused with the new async template?
SendAsync()
// // .
- , ; , , ( , ).
POV , .
, , , .
( , ): http://msdn.microsoft.com/en-us/library/xzf533w0 (v = vs .71).aspx
APM ( ) BeginXXX EndXXX.
, , , IAsyncResult, void, .
APM: http://msdn.microsoft.com/en-us/library/ms228963 (v = vs .110).aspx
Source: https://habr.com/ru/post/1538029/More articles:Can a Windows GUI program written in Lazarus create a console and write it at run time? - freepascalError in System.Windows.Control.RichTextBox - c #window.open () is blocked by the browser when called with a promise - javascriptUnit test code that interacts with the database without creating data in the database - c #iOS Dropbox API - Reauthentication (Error 401) - iosiOS Dropbox SDK - unable to download or retrieve metadata - authenticationHandle ajax errors with struts2-jquery-plugin - jqueryIndexOutOfBoundsException when added to ArrayList by index - javamake python @property handle + =, - = etc - pythonGoogle Glass: выберите "Отменить" или "ОК" в диалоговом окне - androidAll Articles