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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:03:04+00:00 2026-05-28T15:03:04+00:00

I have a fairly simple console app that monitors an exchange mailbox, picks particular

  • 0

I have a fairly simple console app that monitors an exchange mailbox, picks particular emails out, and updates a couple of databases based on the contents.

I would like to implement a couple of similar systems. While it would be very simple to duplicate this system, I am looking at a more sophisticated solution – mainly an intellectual exercise, a learning exercise.

I would like to build a core application that pulls template information periodically from a DB; this information would tell the app that is has to monitor a given mailbox for emails with given characteristics at a particular interval.

I envision creating a master template (assembly) with some virtual functions (pre-processing, process items, archive items, send notifications etc). In turn, I’d create any number of templates that implement the interfaces in the master template, but the functionality could differ wildly in each case, one may update a database, while the next might store something in a file system.

My first question is whether this is a sensible implementation?

My second question is how to dynamically reference each template, and how would I call the methods of these templates at the appropriate time?

If I were to extend my Templates project, adding a new class for each new template required, I’d overcome the problem of dynamically referencing the templates. But if I wanted to keep them in separate assemblies.. Is there a way to just drop them into the project? Don’t forget, the templates will be listed in a DB, so the app will be aware of them, but how to make use of them…

UPDATE:
I’ve figured how I can dynamically reference each template class; it requires me to supply the Assembly-Qualified Name to GetType:
I’ve tried to dynamically generate the template in the main app:

string aqn= "MasterTemplates.TestTemplate, TestTemplate, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null";
MasterTemplate mt = (MasterTemplate)Activator.CreateInstance(Type.GetType(aqn));

So if I keep updating my MasterTemplates project, adding in new classes as necessary, I can achieve what I am aiming for. However, how can I handle different template assemblies?

In the meantime, I’m shortly going to look at DBM’s suggestion of the Managed Extensibility Framework.

Conclusion:
I don’t have the time to fully investigate MEF; though it’s overkill for my current needs, it looks extremely promising. And I haven’t figured how to easily develop and use different assemblies for different templates – instead I am keeping all templates in one assembly, which I will have to recompile and up-date each time I require a new template. Not quite as sophisticated as the MEF alternative, but simpler and suited to my current needs.

  • 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-28T15:03:05+00:00Added an answer on May 28, 2026 at 3:03 pm

    When using activator with a string, use the Activator.CreateInstance(String,String) overload.

    Alternatively you can create an instance of the type and use it like that:

    Activator.CreateInstance(Type.GetType(templateName));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a fairly simple iPhone app that downloads a set of UITableView results
I have a fairly simple const struct in some C code that simply holds
I have a fairly simple python loop that calls a few functions, and writes
We have a fairly simple program that's used for creating backups. I'm attempting to
I have a fairly simple MS Access Database that contains some metadata about a
I have a fairly simple database that I inherited. For the purposes of this
I have a basic C# console application that executes a fairly long running process
I have a fairly simple HTML page with a link on it that calls
I have a fairly simple web app built with Delphi (2009) Web Broker. I
I have a simple console app written in C#. I want to be able

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.