zcz527 / autofac

Automatically exported from code.google.com/p/autofac
Other
0 stars 0 forks source link

RegisterCollection function not found 35 build on calculator example. #323

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Function in Calculator example not found 3.5 build
2. Found work around to register constuctor using IList<IOperation>
3. Instead of the unavailable function builder.RegisterCollection used the 
following NEW This does work on my testing:

What is the expected output? What do you see instead?

NEW:
IList<IOperation> operations = new List<IOperation>
      {
       new Operations.Add(),
       new Operations.Divide(new MessageBoxNotifier(), 4)
      };

builder.Register(opr => new 
Calculator(operations)).As<Calculator>().InstancePerDependency();

What version of Autofac are you using? On what version of .NET/Silverlight?

BUILD COMMAND:
msbuild Autofac.build /T:Release /P:Version=2.3.4.567 /P:BuildFramework=NET35
Please provide any additional information below.

Original issue reported on code.google.com by jagree...@gmail.com on 2 May 2011 at 2:27

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks very much for the report. The /examples folder has fallen quite a long 
way out of date, IEnumerable<IOperation> should now work out of the box, 
without any collection registration. ASAP we'll fix the example.

Original comment by nicholas...@gmail.com on 9 May 2011 at 8:49

GoogleCodeExporter commented 8 years ago
After examining the examples, they're obsolete and misleading now and no longer 
very useful. Other available code (e.g. the CodeProject article) fills this 
need well enough that I've removed them.

Original comment by nicholas...@gmail.com on 15 Jun 2011 at 11:54