What are you actually trying to achieve? Do you really need to implement your own package action or are you trying to use the current package actions? Also as Chris Koiak pointed out, have a look at the Package Action Contrib which also has some additional useful package actions.
Alias is a unique name for a package action, as it's used to identify package actions by the packager.
SampleXml simply returns a 'sample xml' snippet as to how the package action should be included when creating the action (through the packager interface). It serves as primary documentation for a package action
Execute is the package action method that gets executed when installing a package. So if you've included an additional package action (through the packager interface), then the packager will pick up that action and call its Execute method (Packager uses reflection to find all classes that implement IPackageAction). Execute() method takes a xml fragment, which is the xml code snippet you'd add when creating a package
For example: Assume you've created your own http handler and would like to add automate the installation. In that case, you'd need to add some xml code snippet to the packager interface
I don't think that would make sense (attho it might be possible). A package action is supposed to execute a single task, and thus requires a single Action node. SampleXml is for documentation purposes only as well.
Example code to be found on Codeplex (see Chris' reference)
IPackageAction?
hi folks.,
Any detailed example as how to use IPackageAction?
Thank you
Have a look at
http://our.umbraco.org/wiki/reference/packaging/package-actions
and the codeplex page also has some good documentation
http://packageactioncontrib.codeplex.com/
Do i have to create a class file and implement IpackageAction or just add <Action></Action> in the umbraco's
Developer->Packages->Create Package( package Actions tab)?
Sam,
you need to create a class that implements the IPackageAction interface.
Cheers,
/Dirk
Sam,
What are you actually trying to achieve? Do you really need to implement your own package action or are you trying to use the current package actions? Also as Chris Koiak pointed out, have a look at the Package Action Contrib which also has some additional useful package actions.
Cheers,
Chris
Thanks for replying folks.,
i would like to have clear idea as how to use Alias(),SampleXml(),Execute(string packageName, System.Xml.XmlNode xmlData) methods in ipackageActions
Sam,
Alias is a unique name for a package action, as it's used to identify package actions by the packager.
SampleXml simply returns a 'sample xml' snippet as to how the package action should be included when creating the action (through the packager interface). It serves as primary documentation for a package action
Execute is the package action method that gets executed when installing a package. So if you've included an additional package action (through the packager interface), then the packager will pick up that action and call its Execute method (Packager uses reflection to find all classes that implement IPackageAction). Execute() method takes a xml fragment, which is the xml code snippet you'd add when creating a package
For example: Assume you've created your own http handler and would like to add automate the installation. In that case, you'd need to add some xml code snippet to the packager interface
For more info on action attributes, see this wiki page.
Each action may add additional xml elements (either as attribute or child elements), the packager will pass that xml fragment to the Execute() method
Hope this helps.
Regards,
/Dirk
thank you Dirk.,
Is it possible to give many <Action runat="install"> in public System.Xml.XmlNode SampleXml()..
any example code ?
Sam,
I don't think that would make sense (attho it might be possible). A package action is supposed to execute a single task, and thus requires a single Action node. SampleXml is for documentation purposes only as well.
Example code to be found on Codeplex (see Chris' reference)
Hope this helps.
Regards,
/Dirk
thank you..
what is custom installer (.ascx based) ?
how to use it?
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.