Re: Async Await.
Some call APIs but the vast majority are just mapping calls. Changing one object into another. Davy On Tue, 26 Mar 2019, 21:51 Greg Keogh, wrote: > > This is pretty typical for the entire project. >> var legalEntity = await CreateLegalEntityObjectAsync(...); >> var billingAccount = await CreateBillingAccountObjectAsync(...); >> > > But what's inside all the awaited methods? Are they actually doing > anything asynchronously (web service calls, overlapped file IO)? Got the > source code or look in ILSpy? --* GK* > >>
Re: Async Await.
> This is pretty typical for the entire project. > var legalEntity = await CreateLegalEntityObjectAsync(...); > var billingAccount = await CreateBillingAccountObjectAsync(...); > But what's inside all the awaited methods? Are they actually doing anything asynchronously (web service calls, overlapped file IO)? Got the source code or look in ILSpy? --* GK* >
Re: Async Await.
Yes David, there are whole chains of method calls, all awaiting for something to complete, the only part that is not async is the database call! *... .. / --- -.-. / .-.. . --. . .-. . / ... -.-. .. ... / -. .. -- .. ..- -- / . .-. ..- -.. .. - .. --- -. .. ... / .- -... . ... .-.-.-* On Tue, Mar 26, 2019 at 2:34 PM David Gardiner wrote: > Presumably inside these methods are other calls to additional async > methods? > > This sounds like an example of how "viral" the async/await stuff can be, > in that once you call an async method at the lowest level, everything > further up ends up needing to become "async/awaited" too. > > David > > On Tue, 26 Mar 2019 at 06:45, David Rhys Jones > wrote: > >> Hi Greg, >> >> This is pretty typical for the entire project. >> var legalEntity = await CreateLegalEntityObjectAsync(...); >> >> var billingAccount = await CreateBillingAccountObjectAsync(...); >> var billingAccountUid = billingAccount.UserName; >> var billingAccountTaxServiceAddressPcode = >> billingAccount.InternalView.TaxServiceAddressPcode; >> >> var primaryGroup = await CreatePrimaryGroupObjectAsync(); >> >> >> Davy >> >> *... .. / --- -.-. / .-.. . --. . .-. . / ... -.-. .. ... / -. .. -- >> .. ..- -- / . .-. ..- -.. .. - .. --- -. .. ... / .- -... . ... .-.-.-* >> >> >> >> On Tue, Mar 26, 2019 at 11:10 AM Preet Sangha >> wrote: >> >>> *forking* hell! >>> >>> regards, >>> Preet, in Auckland NZ >>> >>> >>> >>> On Tue, 26 Mar 2019 at 22:52, Greg Keogh wrote: >>> >>>> >>>> I've started a new post, and one of the applications here uses Async >>>>> Await for nearly every method call, even for simple calls that just create >>>>> an object and return it. >>>>> >>>> >>>> How on earth is that sort of thing coded? How are intrinsically >>>> synchronous methods forcibly turned into async ones? Is it like this?... >>>> (I'm just guessing) >>>> >>>> var foo = await Task.Run(() => return new Foo()); >>>> >>>> *Greg K* >>>> >>>>>
Re: Async Await.
Presumably inside these methods are other calls to additional async methods? This sounds like an example of how "viral" the async/await stuff can be, in that once you call an async method at the lowest level, everything further up ends up needing to become "async/awaited" too. David On Tue, 26 Mar 2019 at 06:45, David Rhys Jones wrote: > Hi Greg, > > This is pretty typical for the entire project. > var legalEntity = await CreateLegalEntityObjectAsync(...); > > var billingAccount = await CreateBillingAccountObjectAsync(...); > var billingAccountUid = billingAccount.UserName; > var billingAccountTaxServiceAddressPcode = > billingAccount.InternalView.TaxServiceAddressPcode; > > var primaryGroup = await CreatePrimaryGroupObjectAsync(); > > > Davy > > *... .. / --- -.-. / .-.. . --. . .-. . / ... -.-. .. ... / -. .. -- > .. ..- -- / . .-. ..- -.. .. - .. --- -. .. ... / .- -... . ... .-.-.-* > > > > On Tue, Mar 26, 2019 at 11:10 AM Preet Sangha > wrote: > >> *forking* hell! >> >> regards, >> Preet, in Auckland NZ >> >> >> >> On Tue, 26 Mar 2019 at 22:52, Greg Keogh wrote: >> >>> >>> I've started a new post, and one of the applications here uses Async >>>> Await for nearly every method call, even for simple calls that just create >>>> an object and return it. >>>> >>> >>> How on earth is that sort of thing coded? How are intrinsically >>> synchronous methods forcibly turned into async ones? Is it like this?... >>> (I'm just guessing) >>> >>> var foo = await Task.Run(() => return new Foo()); >>> >>> *Greg K* >>> >>>>
Re: Async Await.
Hi Greg, This is pretty typical for the entire project. var legalEntity = await CreateLegalEntityObjectAsync(...); var billingAccount = await CreateBillingAccountObjectAsync(...); var billingAccountUid = billingAccount.UserName; var billingAccountTaxServiceAddressPcode = billingAccount.InternalView.TaxServiceAddressPcode; var primaryGroup = await CreatePrimaryGroupObjectAsync(); Davy *... .. / --- -.-. / .-.. . --. . .-. . / ... -.-. .. ... / -. .. -- .. ..- -- / . .-. ..- -.. .. - .. --- -. .. ... / .- -... . ... .-.-.-* On Tue, Mar 26, 2019 at 11:10 AM Preet Sangha wrote: > *forking* hell! > > regards, > Preet, in Auckland NZ > > > > On Tue, 26 Mar 2019 at 22:52, Greg Keogh wrote: > >> >> I've started a new post, and one of the applications here uses Async >>> Await for nearly every method call, even for simple calls that just create >>> an object and return it. >>> >> >> How on earth is that sort of thing coded? How are intrinsically >> synchronous methods forcibly turned into async ones? Is it like this?... >> (I'm just guessing) >> >> var foo = await Task.Run(() => return new Foo()); >> >> *Greg K* >> >>>
Re: Async Await.
*forking* hell! regards, Preet, in Auckland NZ On Tue, 26 Mar 2019 at 22:52, Greg Keogh wrote: > > I've started a new post, and one of the applications here uses Async Await >> for nearly every method call, even for simple calls that just create an >> object and return it. >> > > How on earth is that sort of thing coded? How are intrinsically > synchronous methods forcibly turned into async ones? Is it like this?... > (I'm just guessing) > > var foo = await Task.Run(() => return new Foo()); > > *Greg K* > >>
Re: Async Await.
> I've started a new post, and one of the applications here uses Async Await > for nearly every method call, even for simple calls that just create an > object and return it. > How on earth is that sort of thing coded? How are intrinsically synchronous methods forcibly turned into async ones? Is it like this?... (I'm just guessing) var foo = await Task.Run(() => return new Foo()); *Greg K* >
Async Await.
Hello all, I've started a new post, and one of the applications here uses Async Await for nearly every method call, even for simple calls that just create an object and return it. Are there any pitfalls for using this many await methods in an application? Davy. *... .. / --- -.-. / .-.. . --. . .-. . / ... -.-. .. ... / -. .. -- .. ..- -- / . .-. ..- -.. .. - .. --- -. .. ... / .- -... . ... .-.-.-*
Re: Using async/await without .NET Framework 4.5
*Fist pump* I'd been hanging out for this one for ages. Glad it was finally released. On 24 October 2012 18:06, Preet Sangha preetsan...@gmail.com wrote: David, This is good news. The idea that good ideas can/have to be implemented in the BCL and not just the language is great for those of us who are abstraction wonks. Thanks. On Wed, Oct 24, 2012 at 12:25 PM, David Kean david.k...@microsoft.comwrote: We just released an updated async package that enables async/await on .NET Framework 4, Silverlight 4 5, Phone 7.5 and portable library combinations: http://blogs.msdn.com/b/bclteam/archive/2012/10/22/using-async-await-without-net-framework-4-5.aspx ** ** Tell me what you think. -- regards, Preet, Overlooking the Ocean, Auckland
Re: Using async/await without .NET Framework 4.5
David, This is good news. The idea that good ideas can/have to be implemented in the BCL and not just the language is great for those of us who are abstraction wonks. Thanks. On Wed, Oct 24, 2012 at 12:25 PM, David Kean david.k...@microsoft.comwrote: We just released an updated async package that enables async/await on .NET Framework 4, Silverlight 4 5, Phone 7.5 and portable library combinations: http://blogs.msdn.com/b/bclteam/archive/2012/10/22/using-async-await-without-net-framework-4-5.aspx ** ** Tell me what you think. -- regards, Preet, Overlooking the Ocean, Auckland
Using async/await without .NET Framework 4.5
We just released an updated async package that enables async/await on .NET Framework 4, Silverlight 4 5, Phone 7.5 and portable library combinations: http://blogs.msdn.com/b/bclteam/archive/2012/10/22/using-async-await-without-net-framework-4-5.aspx Tell me what you think.