添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
有胆有识的小狗  ·  🚨 ISIS vs OSPF vs ...·  11 月前    · 
重感情的红酒  ·  Ember Data @attr ...·  1 年前    · 

Because every feature (including optimizations) starts at minus 100 points . This is especially true if the semantics are different, which they are in this case .

The difference is subtle, but if you define Foo as:

Task Foo(string text)
  throw new NotImplementedException();

then the behavior of Proxy and ProxyAsync are different. Proxy would propagate the exception directly to the caller; ProxyAsync would capture that exception and place it on the Task returned from ProxyAsync.

I have a blog post that goes into more detail on thoughts to consider when eliding async and await.

  • Why does C# compiler not optimize simple async/await methods
  • Why does my async method not wait on "serialPort = await SerialDevice.FromIdAsync()"?
  • why does the compiler NOT complain about not all paths returning?
  • Async operation does not stop at await command
  • Practical example of async await does not meet expectations
  • Why does this async lambda function invocation not compile in C#?
  • Why does the compiler not infer the generic type
  • Async / await not working " string does not contain a defination fot GetAwaiter " and no extension
  • Why does not Serilog selflog work in this simple windows service?
  • Async await call does not return
  • Async File Save Await does not "Await"
  • How does compiler optimize virtual methods implemented by a sealed class
  • Why code after Await does not run on UI thread?
  • Why close xml does not support .xls formated excel file?
  • Why does resharper prefer to not hide a property from an abstract class inside another abstract class?
  • The simple regex expression [0-9]* does not work with {e|24} in C#
  • Why .net does not have method to copy an entire directory
  • Why are some properties and methods available in Powershell but not C#
  • Why does this not write the correct bytes to the file?
  • Why does this disassembled code not compile in C#?
  • Why does referncing earlier .net versions work on my local machine but not on another?
  • Why does C# compiler kick in the second time?
  • Why C# does not support multiple inheritance?
  • Why GetProperties() does not return properties when using typeof() but it does when using GetType()?
  • Why my program does not read subsuquent letters after index 0?
  • Why don't these C# async methods execute past Task.Delay()?
  • Async Await and ContinueWith not working as expected
  • Proper way to await something in a method that does not return void, Task, or Task<T>?
  • Why does my returned object not match my received object?
  • Simple and tested online regex containing regex delimiters does not work in C# code
  • More Query from same tag

  • How to exclude NULL blocks from XML using LINQ-to-XML?
  • Sendkey to background program
  • String.Split Method not working as intended
  • c# dataset cannot make this change because constraints are enforced on relation yyy, and changing this value will strand child rows
  • Proxy does not accept offered credentials. C# remoting
  • OracleDataClientBatchingBatcherFactory Throws Null Reference Exception
  • Error with testing xamarin app in iOS iPhone device
  • How do I extract the contents of a string within a ReSharper Pattern?
  • How can I animate MatrixTransform.Matrix at center?
  • AddScoped: How to call the right constructor function?
  • Deserializing Calculated Properties with Setters
  • Visio & C# Programming
  • How to store Font information in a database
  • Word Automation Multiple Paste Problem
  • Exposing TFS buildnumber via an endpoint of .NET Core WebAPI
  • C# 3.5 Merge 2 lists of 2 different types
  • 400 Bad Request for PUT calls Asp Net Web Api 2.2
  • Getting Error Assertion failure: movie player has wrong activation state (1) even though i use only one movie player
  • How to conditionally display HTML in MVC?
  • Active Reports Dynamic Data Source
  • How to read the stored procedure query from Sql Server 2005 in C#?
  • Call an Angular2 Function from Unity WebGL
  • Get all worksheets
  • Where to put authorization methods?
  • Ninject in non MVC app
  • How to compare two big XML files item by item efficiently?
  • Irregular characters added to beginning of file
  • implementing autocomplete on datagridviewtextboxcolumn and datagridviewcomboboxcoumn
  • VS2017 not showing suggestions & cannot navigate to the symbol under caret
  • Read C# Textblock Text Property filled using Inlines
  •