StructureMap and ASP.NET webforms generic handlers

67 views
Skip to first unread message

William Gant

unread,
Nov 10, 2017, 10:57:03 AM11/10/17
to structuremap-users
Greetings,
I'm trying to tease apart some very old webforms code and get IOC working within. I've configured a MediatR class for a request, and another MediatR class for the response and wired them up with structuremap per the examples I saw on Github.

However, I have to call this MediatR handler class from an ASP.NET webforms generic handler. I'm not having a lot of luck figuring out how to do this. I remember back in the day that I used to use the ObjectFactory class for this sort of thing, but that seems to be gone. How do I handle this?

Thanks,
Will

Stuart Grassie

unread,
Nov 10, 2017, 1:23:38 PM11/10/17
to structure...@googlegroups.com

Will,

ObjectFactory is no more, as you will have surmised. There is comprehensive documentation on http://structuremap.github.io/.

HTH

-Stu


--
You received this message because you are subscribed to the Google Groups "structuremap-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to structuremap-us...@googlegroups.com.
To post to this group, send email to structure...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/structuremap-users/a64c7e4d-00ea-432a-9118-bd5f0a8aa1e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

William Gant

unread,
Nov 10, 2017, 2:11:31 PM11/10/17
to structuremap-users
That helped. Now I've got the basic bits wired in. I'm having a little funkiness getting the object I want to show up out of the BuildUp method when I try to call it inside a handler, but the type is resolving, so it's probably something small I missed. Upon thinking about it, I do like that ObjectFactory is gone now.

Code's about to get a lot cleaner up in here. Thanks for the help.


On Friday, November 10, 2017 at 12:23:38 PM UTC-6, Stuart Grassie wrote:

Will,

ObjectFactory is no more, as you will have surmised. There is comprehensive documentation on http://structuremap.github.io/.

HTH

-Stu


On Fri, 10 Nov 2017, 15:57 William Gant, <willia...@gmail.com> wrote:
Greetings,
I'm trying to tease apart some very old webforms code and get IOC working within. I've configured a MediatR class for a request, and another MediatR class for the response and wired them up with structuremap per the examples I saw on Github.

However, I have to call this MediatR handler class from an ASP.NET webforms generic handler. I'm not having a lot of luck figuring out how to do this. I remember back in the day that I used to use the ObjectFactory class for this sort of thing, but that seems to be gone. How do I handle this?

Thanks,
Will

--
You received this message because you are subscribed to the Google Groups "structuremap-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to structuremap-users+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages