View Source
Class MacroService
Represents the Macro Service, which is an easy access to operations involving IMacro
Inheritance
System.Object
Assembly: Umbraco.Core.dll
Syntax
public class MacroService : ScopeRepositoryService, IMacroService, IService
Constructors
View Source
MacroService(IScopeProvider, ILogger, IEventMessagesFactory, IMacroRepository, IAuditRepository)
Declaration
public MacroService(IScopeProvider provider, ILogger logger, IEventMessagesFactory eventMessagesFactory, IMacroRepository macroRepository, IAuditRepository auditRepository)
Parameters
Methods
View Source
Delete(IMacro, Int32)
Declaration
public void Delete(IMacro macro, int userId = -1)
Parameters
Type |
Name |
Description |
IMacro |
macro |
IMacro to delete
|
System.Int32 |
userId |
Optional id of the user deleting the macro
|
View Source
GetAll()
Declaration
public IEnumerable<IMacro> GetAll()
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<IMacro> |
|
View Source
GetAll(Guid[])
Declaration
public IEnumerable<IMacro> GetAll(params Guid[] ids)
Parameters
Type |
Name |
Description |
System.Guid[] |
ids |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<IMacro> |
|
View Source
GetAll(Int32[])
Declaration
public IEnumerable<IMacro> GetAll(params int[] ids)
Parameters
Type |
Name |
Description |
System.Int32[] |
ids |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<IMacro> |
|
View Source
GetByAlias(String)
Gets an IMacro object by its alias
Declaration
public IMacro GetByAlias(string alias)
Parameters
Type |
Name |
Description |
System.String |
alias |
Alias to retrieve an IMacro for
|
Returns
View Source
GetById(Guid)
Declaration
public IMacro GetById(Guid id)
Parameters
Type |
Name |
Description |
System.Guid |
id |
|
Returns
View Source
GetById(Int32)
Declaration
public IMacro GetById(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
View Source
Save(IMacro, Int32)
Declaration
public void Save(IMacro macro, int userId = -1)
Parameters
Type |
Name |
Description |
IMacro |
macro |
IMacro to save
|
System.Int32 |
userId |
Optional Id of the user deleting the macro
|
Events
View Source
Deleted
Declaration
public static event TypedEventHandler<IMacroService, DeleteEventArgs<IMacro>> Deleted
Event Type
View Source
Deleting
Declaration
public static event TypedEventHandler<IMacroService, DeleteEventArgs<IMacro>> Deleting
Event Type
View Source
Saved
Declaration
public static event TypedEventHandler<IMacroService, SaveEventArgs<IMacro>> Saved
Event Type
View Source
Saving
Declaration
public static event TypedEventHandler<IMacroService, SaveEventArgs<IMacro>> Saving
Event Type