Interface IGadgetFactory
Provides methods to create Gadget instances.
Namespace: EPiServer.Shell.Gadgets
Assembly: EPiServer.Shell.dll
Version: 9.12.2Syntax
public interface IGadgetFactory
Methods
Create(String)
Create a GadgetDefinition for a gadget name
Declaration
GadgetDefinition Create(string gadgetName)
Parameters
Type | Name | Description |
---|---|---|
System.String | gadgetName | Name of the gadget. |
Returns
Type | Description |
---|---|
GadgetDefinition |
CreateGadgetFromTemplate(Guid)
Creates the gadget from template.
Declaration
Gadget CreateGadgetFromTemplate(Guid gadgetTemplateId)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | gadgetTemplateId | The gadget template Id. |
Returns
Type | Description |
---|---|
Gadget |
GetGadgetTemplates()
Gets the available gadgets templates.
Declaration
IEnumerable<Gadget> GetGadgetTemplates()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Gadget> |
Events
CreatingGadgetDefinition
Occurs when IGadgetFactory.Create method called.
Declaration
event EventHandler<GadgetDefinitionEventArgs> CreatingGadgetDefinition
Event Type
Type | Description |
---|---|
System.EventHandler<GadgetDefinitionEventArgs> |
GettingGadgetTemplates
Occurs when IGadgetFactory.GetGadgetTemplates method called.
Declaration
event EventHandler<GadgetTemplatesEventArgs> GettingGadgetTemplates
Event Type
Type | Description |
---|---|
System.EventHandler<GadgetTemplatesEventArgs> |