Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 27th, 2010, 09:53 AM
Authorized User
 
Join Date: Dec 2005
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.
 
Old October 27th, 2010, 10:07 AM
Authorized User
 
Join Date: Dec 2005
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.
 
Old October 27th, 2010, 10:15 AM
elbandit's Avatar
Wrox Author
 
Join Date: May 2007
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.
 
Old October 27th, 2010, 10:49 AM
Authorized User
 
Join Date: Dec 2005
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default Sure thing

I will do that.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft Recruiting Chat: 50 openings jackchang C# 0 July 15th, 2008 07: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 08:39 AM
how to select where rownum BETWEEN 50 and 100? MikoMax Oracle 1 December 1st, 2003 12:53 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.