Interface IModuleService
Service to retrieve and store modules (Module)
public interface IModuleService
Methods
AddModuleAsync(Module)
Adds a new module
Task<Module> AddModuleAsync(Module module)
Parameters
moduleModule
Returns
- Task<Module>
DeleteModuleAsync(int)
Deletes a module
Task DeleteModuleAsync(int moduleId)
Parameters
moduleIdint
Returns
- Task
ExportModuleAsync(int, int)
Exports a given module
Task<string> ExportModuleAsync(int moduleId, int pageId)
Parameters
moduleIdintpageIdint
Returns
- Task<string>
module content in JSON format
ExportModuleAsync(int, int, int, string)
Exports a given module
Task<int> ExportModuleAsync(int moduleId, int pageId, int folderId, string filename)
Parameters
moduleIdintpageIdintfolderIdintfilenamestring
Returns
- Task<int>
file id
GetModuleAsync(int)
Returns a specific module
Task<Module> GetModuleAsync(int moduleId)
Parameters
moduleIdint
Returns
- Task<Module>
GetModulesAsync(int)
Returns a list of modules for the given site
Task<List<Module>> GetModulesAsync(int siteId)
Parameters
siteIdint
Returns
- Task<List<Module>>
ImportModuleAsync(int, int, string)
Imports a module
Task<bool> ImportModuleAsync(int moduleId, int pageId, string content)
Parameters
moduleIdintpageIdintcontentstringmodule in JSON format
Returns
- Task<bool>
UpdateModuleAsync(Module)
Updates an existing module
Task<Module> UpdateModuleAsync(Module module)
Parameters
moduleModule
Returns
- Task<Module>