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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T11:58:32+00:00 2026-05-30T11:58:32+00:00

In my application there can be multiple servers to connect to. Each server can

  • 0

In my application there can be multiple servers to connect to. Each server can have more repositories, that can be opened in the app. I have a few objects for wrapping the logic of calling webservices on the repository in a concrete server and they are singletons (this is unimportant).
The app will usually handle 0-5 servers which each will have 0-5 repos. The number of objects are 5.

I want to store these objects in a class, but the

Dictionary<string, Dictionary<string, Dictionary<type, IServiceProvider>>>

seems a bit weird… Am I only paranoid or is this really a bad idea?

  • 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-30T11:58:34+00:00Added an answer on May 30, 2026 at 11:58 am

    You can have aggregate keys as long as you define equality and hashcode appropriately (or for simplicity even use a struct instead):

    class ServiceProperties
    {
        public int ServerId {get;set;}
        public int RepositoryId {get;set;}
        public type ServiceType {get;set;}
    
        //define equality, hashcode
    }
    

    Now you can just use a Dictionary<ServiceProperties, IServiceProvider>

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

Sidebar

Related Questions

Is there something like a panel that I can use in a MFC application.
I'm building this iPhone application to connect to a secured TFS server (one that
We have Java Enterprise applications deployed on to multiple servers. There are replicated servers
I'm writing some client-server-application where I have to deal with multiple threads. I've got
Is there an application which can show me GPU usage history in the same
Is there an application , which can parse a given set of stored procedures
Is there anyway I can use to destroy my deployed application at specific date?.
Is there anyway I can look at the size of a file the application
In my application user can add there reminder for the specific day and reminder
Is there a way how modules can listen to parent application event? My current

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.