Support

Kom i kontakt med vår kundtjänst, lär dig allt via vår SDK eller ladda ner den senaste uppdateringen.

Definition of plugin hooks

2011-05-24 22:31:26 Fredrik Heidgert

Hi,

I have created a plugin hook for the OnContentInsert "event" which works well, as described on the Plugins documentation page (http://www.lemoon.se/plugins).

I then wanted to do something similar but with the OnContentPublished hook. I get a "Parameter count mismatch" error while doing this. I understand that the contacts doesn't match but I can't seem to find any information about which parameters this hook sends to the method.

Any hints?

All replies

  • 2011-05-25 13:51:17 Linus Birgerstam

    The plugin method should match the signature void OnContentPublished(Content original, Content published). The easiest way to se which parameters a hook expects is to use visual studio intellisense, e.g. if you write Mindroute.Core.Plugins.Hook.OnContentPublished in visual studio you can then mouseover OnContenPublished to see the description of the hook and which parameters it expects.

  • 2011-05-25 22:18:31 Fredrik Heidgert

    Thanks, that does it.

    It would be more swift with an interface though. :-)

  • 2011-06-13 12:54:59 Linus Birgerstam

    Yes, we are aware of that and will probably use interfaces for plugins in future releases.