AnantLabs / codesmith

Automatically exported from code.google.com/p/codesmith
1 stars 0 forks source link

Async Factory Methods Should Be Available to Full .NET Framework #490

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Generate a ReadOnlyList collection with "IncludeSilverlightSupport" set to 
true.
2. Note that the async factory methods are surrounded by "#if SILVERLIGHT"
preprocessor directive.  This directive should be removed because the async 
factory methods might need to be used from a full .NET app (eg. WPF).

What version of the product are you using?
CSLA v4.0.0, Templates v3.0.0.1878

Original issue reported on code.google.com by Brad...@wsdot.wa.gov on 16 Aug 2010 at 5:07

GoogleCodeExporter commented 9 years ago
Hello,

Do you have any information on others using this for WPF or the Web? Do you 
think we should always generate these async methods?

Thanks
-Blake Niemyjski

Original comment by bniemyjski on 17 Aug 2010 at 10:32

GoogleCodeExporter commented 9 years ago

Original comment by bniemyjski on 17 Aug 2010 at 10:33

GoogleCodeExporter commented 9 years ago
Probably not relevant for the web but this would likely be a useful feature for 
WPF developers who want an easy way to avoid locking the UI thread while 
retrieving data.  

I don't think there's much harm in always generating the async methods.  If 
you're worried about the code bloat you could add an 
"IncludeAsyncFactorySupport" option in the templates that would default/force a 
"true" value when "IncludeSilverlightSupport" is activated.

Original comment by Brad...@wsdot.wa.gov on 18 Aug 2010 at 2:05

GoogleCodeExporter commented 9 years ago
Hello,

This is a good idea, I'll discuss with rocky about turning this on by default 
in wpf.

Thanks
-Blake Niemyjski

Original comment by bniemyjski on 24 Aug 2010 at 5:55

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r2471.

Async Factory Methods Should Be Available to Full .NET Framework

Original comment by bniemyjski on 17 Feb 2012 at 6:56

GoogleCodeExporter commented 9 years ago
I've changed this behavior in v4 of the templates.

Original comment by bniemyjski on 17 Feb 2012 at 6:57