Note that there are some explanatory texts on larger screens.

plurals
  1. POInterface class in C#
    text
    copied!<p>In my desktop application, I am facing a problem in using the function in Interface class.</p> <p>I have a function like this for executing plugin</p> <pre><code>public static string ExecutePugin(string PluginName, string ConnectionString) { //ToDo: Get the plugin dll in the memory in a different appdomain. call RunAnalysis method of that //ToDo: shift the primary key checking method to inside the plugin and return the result back. //Loads the IMFDBAnalyserPlugin.exe to the current application domain. AppDomain.CurrentDomain.Load("IMFDBAnalyserPlugin"); // Load the plugin's assembly to the current application doamin. Assembly oAssembly = AppDomain.CurrentDomain.Load(PluginName); // This block of code will execute the plugin's assembly code. foreach (Type oType in oAssembly.GetTypes()) { if (oType.GetInterface("IMFDBAnalyserPlugin") != null) { object oPlugin = Activator.CreateInstance(oType, null, null); ((MFDBAnalyser.IMFDBAnalyserPlugin)oPlugin).ExecutePlugin(); } } return string.Empty; } </code></pre> <p>where IMFDBAnalyserPlugin class is an interface and contains code like this</p> <pre><code>using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace MFDBAnalyser { public class IMFDBAnalyserPlugin { void ExecutePlugin(); } } </code></pre> <p>but on building the project I am getting the error in MFDBAnalyser.IMFDBAnalyserPlugin as</p> <blockquote> <p>Error 1 The type name 'IMFDBAnalyserPlugin' does not exist in the type 'MFDBAnalyser.MFDBAnalyser' D:\Projects\Mindfire\GoalPlan\MFDBAnalyser\MFDBAnalyser\PluginManager.cs 57 107 MFDBAnalyser</p> </blockquote> <p>can anyone help me</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload