Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional ASP.NET Design Patterns
This is the forum to discuss the Wrox book Professional ASP.NET Design Patterns by Scott Millett; ISBN: 978-0-470-29278-5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET Design Patterns section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old October 27th, 2010, 10:53 AM
Authorized User
 
Join Date: Dec 2005
Location: , , .
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default pg.50 BootStapper.cs

This statement:
ForRequestedType<IProductRepository>()
.TheDefaultIsConcreteType<
ProductRegistry>();

gives the error:
Warning 1 'StructureMap.Configuration.DSL.Registry.ForReques tedType<PLUGINTYPE>()' is obsolete: 'Change to For<T>()' C:\books\WROX\ASPNetDesignPatterns\ASPPatterns.Cha p3.Layered\ASPPatterns.Chap3.Layered.WebUI\BootStr apper.cs 27 13 ASPPatterns.Chap3.Layered.WebUI

Anyone know the new syntax to fix this?
Very fustrating. I had two pages to go in this chapter and now I'm stopped cold.
Reply With Quote
  #2 (permalink)  
Old October 27th, 2010, 11:07 AM
Authorized User
 
Join Date: Dec 2005
Location: , , .
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default Never mind

The code is:

ForRequestedType<IProductRepository>()
.TheDefaultIsConcreteType<
ProductRepository>();

It was correct in the book.
Reply With Quote
  #3 (permalink)  
Old October 27th, 2010, 11:15 AM
elbandit's Avatar
Wrox Author
Points: 599, Level: 8
Points: 599, Level: 8 Points: 599, Level: 8 Points: 599, Level: 8
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2007
Location: Southsea, Portsmouth, Hampshire, United Kingdom.
Posts: 107
Thanks: 10
Thanked 17 Times in 15 Posts
Default

Hi SMiller,

Thanks for buying the book. The StructureMap code will still work, but here is the new syntax for you:

Old syntax:

ForRequestedType<IProductRepository().TheDefaultIs ConcreteType<ProductRepository();

New syntax:
For<IProductRepository>().Use<ProductRepository>() ;

Cheers
Scott

P.S. Would love to get your feedback on what you have read so far and when you finish the book.
Reply With Quote
  #4 (permalink)  
Old October 27th, 2010, 11:49 AM
Authorized User
 
Join Date: Dec 2005
Location: , , .
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default Sure thing

I will do that.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft Recruiting Chat: 50 openings jackchang C# 0 July 15th, 2008 08:14 PM
Chapter 5 "Try It Out", pgs. 149-50 pfloyd BOOK: Beginning XML, 4th Ed ISBN: 978-0-470-11487-2 0 December 21st, 2007 05:15 PM
Chap 3 , page 50 MacSr BOOK: Beginning VB.NET Databases 1 January 23rd, 2006 08:53 PM
grouping problem in explorer 5.50 jcarlier XSLT 2 April 25th, 2004 09:39 AM
how to select where rownum BETWEEN 50 and 100? MikoMax Oracle 1 December 1st, 2003 12:53 PM



All times are GMT -4. The time now is 08:15 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.