Skip to content

Instantly share code, notes, and snippets.

@jeremydmiller
Created February 18, 2014 01:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeremydmiller/9062788 to your computer and use it in GitHub Desktop.
Save jeremydmiller/9062788 to your computer and use it in GitHub Desktop.
Decorator blows up
StructureMap.Building.StructureMapBuildException : Error while building type StructureMap.Testing.Blogposts.Diagnostics.BadDecorator. See the inner exception for details
1.) new BadDecorator(The inner IDevice)
2.) Decorator of type StructureMap.Testing.Blogposts.Diagnostics.BadDecorator
3.) StructureMap.Testing.Blogposts.Diagnostics.ADevice
4.) Instance of StructureMap.Testing.Blogposts.Diagnostics.IDevice (StructureMap.Testing.Blogposts.Diagnostics.ADevice)
5.) new DeviceUser(*Default of IDevice*)
6.) StructureMap.Testing.Blogposts.Diagnostics.DeviceUser
7.) Instance of StructureMap.Testing.Blogposts.Diagnostics.DeviceUser
8.) new DeviceUserUser(*Default of DeviceUser*)
9.) StructureMap.Testing.Blogposts.Diagnostics.DeviceUserUser
10.) Instance of StructureMap.Testing.Blogposts.Diagnostics.DeviceUserUser
11.) Container.GetInstance(StructureMap.Testing.Blogposts.Diagnostics.DeviceUserUser)
----> System.DivideByZeroException : No can do!
at lambda_method(Closure , IBuildSession , IContext )
Building\BuildPlan.cs(151,0): at StructureMap.Building.BuildPlan.Build(IBuildSession session, IContext context)
BuildSession.cs(108,0): at StructureMap.BuildSession.BuildNewInSession(Type pluginType, Instance instance)
Pipeline\NulloTransientCache.cs(28,0): at StructureMap.Pipeline.NulloTransientCache.Get(Type pluginType, Instance instance, IBuildSession session)
BuildSession.cs(102,0): at StructureMap.BuildSession.ResolveFromLifecycle(Type pluginType, Instance instance)
SessionCache.cs(88,0): at StructureMap.SessionCache.GetObject(Type pluginType, Instance instance, ILifecycle lifecycle)
SessionCache.cs(68,0): at StructureMap.SessionCache.GetDefault(Type pluginType, IPipelineGraph pipelineGraph)
BuildSession.cs(59,0): at StructureMap.BuildSession.GetInstance(Type pluginType)
Container.cs(322,0): at StructureMap.Container.GetInstance(Type pluginType)
Container.cs(187,0): at StructureMap.Container.GetInstance[T]()
Blogposts\Diagnostics\BadConfiguration.cs(45,0): at StructureMap.Testing.Blogposts.Diagnostics.BadConfiguration.decorator_blows_up()
--DivideByZeroException
Blogposts\Diagnostics\Devices.cs(33,0): at StructureMap.Testing.Blogposts.Diagnostics.BadDecorator..ctor(IDevice inner)
at lambda_method(Closure , IBuildSession , IContext )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment