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 8978709
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:40:47+00:00 2026-06-15T19:40:47+00:00

The structure of application is that I have two Singletons. One for managing the

  • 0

The structure of application is that I have two Singletons. One for managing the work, one for managing the SQLite database.

The work manager loads plugins that wish to access the database. Is there anyway to give them access to the Singleton database manager? If I include the database manager class in the plugin dll – would that work?

I know the other way would be to have a field in the plugin interface and set that field on plugin load, I just wanted to know if there was a way to do it and keep my plugin architecture.

Thanks.

EDIT

Restrictions:

  • Can’t use external libraries.
  • The set of singleton classes that I wish to be accessible from plugins is, and always will be, fixed.
  • 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-06-15T19:40:48+00:00Added an answer on June 15, 2026 at 7:40 pm

    You should have a look at dependency injection containers like Castle Windows, Sprint.NET and Ninject. These will allow you to inject your dependencies automatically or allow your plugins access to your singletons by using the containers.
    I’ve used Castle Windsor a lot and can recommend it, but the others mentioned are also used by a lot of developers. Sorry but forget to mention the Microsoft Unity container

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

Sidebar

Related Questions

I am developing a database-like application that stores a a structure containing: struct Dictionary
I am writing an email application that interfaces with a MySQL database. I have
I read that it is bad to have such structure in an iOS application.
If I have a data structure in a multithreaded application that I want to
When you're writing an application that needs to read and work with two versions
I have a web application that loads some 50 tables from SQL Server into
I have a Qt application that launches two threads from the main thread at
I have a C++ application that includes a number of structures with manually controlled
Summary I have written a process monitor command-line application that takes as parameters: The
I have an ASP.NET MVC (using the release candidate) application that works with a

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.