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

  • Home
  • SEARCH
  • 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 292877
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T06:13:14+00:00 2026-05-12T06:13:14+00:00

Brief Background: My team has decided to use Microsoft’s Managed Extensibility Framework ( MEF

  • 0

Brief Background:

My team has decided to use Microsoft’s Managed Extensibility Framework (MEF) in order to provide an extensible model for adding new “providers” into our system.

This allows for us to plug in new 3rd party providers with relative ease.

Note: I was impressed by how simple MEF was to use and get up and running with.

My Question:

Since these providers commonly have different properties associated with them, when loading these providers into the system at run-time we need to access the providers data streams and properties.

What approach should be taken in order to work with said provider plug-ins due to the differing properties? Noting they all do a similar job.

My Solution:

Create an interface which the providers must conform to, resulting in a “wrapper” being created around each of the 3rd party providers resulting in a consistent interface /
programming model for working with each provider.

Plug-in = 3rd party data source (provider) + Common interface implementation.

+ve:
No need for a more complex reflection based dynamic “plug” for said plug-ins.

-ve:
Have to write a wrapper for each provider. (We need to add the MEF Export tags regardless)

Further Note:

To me the interface / wrapper approach would be the simplest but I have been told to investigate a reflection based approach which may utilize reflection in order to discover the properties at run-time which can be exposed to the system.

I am not in favor of any one solution over another, but I would be interested in hearing the thoughts of the community (most of which are more experienced than I).

Thanks.

  • 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-12T06:13:14+00:00Added an answer on May 12, 2026 at 6:13 am

    It’s not very clear what “properties” and “data streams” are you talking about, but still.

    Yes, common interface is always a good thing. And since you have all these “properties” and such, I suggest the following:

    interface IProperty
    {
        string Name { get; }
        object Value { get; }
    }
    
    interface IDataStreamProvider
    {
        Stream OpenStream();
    }
    
    interface IPlugin
    {
        ReadOnlyCollection<IProperty> Properties { get; }
    
        ReadOnlyCollection<IDataStreamProvider> DataStreams { get; }
    }
    

    Speaking of “wrappers”: I do not understand the intent of those. All third-party plugins must implement IPlugin interface and must be decorated with either ExportAttribute or PluginAttribute as in this:

    class PluginAttribute : ExportAttribute
    {
        public PluginAttribute() :
            base(typeof(IPlugin))
        {
        }
    }
    

    Reflection should be avoided as much as possible because of maintainability concerns.

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

Sidebar

Ask A Question

Stats

  • Questions 205k
  • Answers 205k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer A common reason for this error seems to be a… May 12, 2026 at 9:01 pm
  • Editorial Team
    Editorial Team added an answer Everything in software design is a trade-off. It depends on… May 12, 2026 at 9:01 pm
  • Editorial Team
    Editorial Team added an answer Umbraco has a REST API called Base (http://umbraco.org/documentation/books/introduction-to-base) It also… May 12, 2026 at 9:01 pm

Related Questions

Brief Background: My team has decided to use Microsoft's Managed Extensibility Framework ( MEF
I'm working on a class library and have opted for a route with my
Is there a way of getting internet connection settings (proxy information) being used by
I'll try to be brief. What is the best practice for calling a routine
I'm trying to model my tests after the great work that the Thougtbot guys

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.