Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6855201
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:43:40+00:00 2026-05-27T01:43:40+00:00

I have StructureMap set-up to pass in dependencies as interfaces for handling different email

  • 0

I have StructureMap set-up to pass in dependencies as interfaces for handling different email protocols. The implementations however inherit from ‘TcpClient’. If there is an error or disconnection, a re-connect cannot occur unless a new TcpClient has been created, therefore the dependency passed in needs to be refreshed with a new object.

How do I go about getting StructureMap to re-create the dependencies that have already been passed in?
Within the service constructor, 2 of these protocol interfaces need to be refreshed with new objects.
It would be nice if StructureMap can accomplish this without making any calls to ObjectFactory as the dependencies have already been wired up in the ServiceRegistry class.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T01:43:41+00:00Added an answer on May 27, 2026 at 1:43 am

    Sounds like a custom lifestyle might do the trick. This is done by implementing the ILifecycle interface.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have implemented a custom route (inherit from RouteBase) to have dynamic routes based
We have a framework that defines many interfaces and some basic default implementations. Let's
I'm attempting to write a StructureMap plugin scanner for Payment Gateway implementations. I have
I have a structuremap configuration that has me scratching my head. I have a
I have an asp.net mvc2 application that is using StructureMap 2.6 and NHibernate 3.x.
I'm trying to enable SqlCacheDependency through my StructureMap IoC, I'm using LinqToSql I have
I have a search form that can search in different provider. I started out
I'm using StructureMap for my DI. Imagine I have a class that takes 1
In the project I'm working on I have a StructureMap registry for the main
I am new to StructureMap. I have downloaded and am using version 2.6.1.0. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.