Reputation: 101
I am trying to get a plugin from a pluginassembly object using early bindings.
List<PluginAssembly> pluginList;
pluginList = xrmContext.PluginAssemblySet
.Where(Plugin => Plugin.SolutionId == solution.Id).ToList();
foreach (PluginAssembly tempPlugin in pluginList)
{...}
Now I want to retrieve the Plugins in the assembly but I can't seem to find a class named Plugin
or a clear defined collection in the PluginAssembly
object.
How do I retrieve the Plugin object?
Upvotes: 1
Views: 264
Reputation: 18895
Plugins have to implement IPlugin. I'm not sure what information PluginAssembly gives you, but I'm guessing you should be able to use reflection to get the classes in the assembly, and then determine if they implement IPlugin or not. See this answer for help with that.
Upvotes: 0