Class MacroService
Represents the Macro Service, which is an easy access to operations involving IMacro
Inheritance
System.Object
Namespace:System.Dynamic.ExpandoObject
Assembly:Umbraco.Core.dll
Syntax
public class MacroService : ScopeRepositoryService, IMacroService, IService
Constructors
MacroService(IDatabaseUnitOfWorkProvider, RepositoryFactory, ILogger, IEventMessagesFactory)
Declaration
public MacroService(IDatabaseUnitOfWorkProvider provider, RepositoryFactory repositoryFactory, ILogger logger, IEventMessagesFactory eventMessagesFactory)
Parameters
Methods
Delete(IMacro, Int32)
Declaration
public void Delete(IMacro macro, int userId = 0)
Parameters
Type |
Name |
Description |
IMacro |
macro |
IMacro to delete
|
System.Int32 |
userId |
Optional id of the user deleting the macro
|
GetAll()
Declaration
public IEnumerable<IMacro> GetAll()
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<IMacro> |
|
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> |
|
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> |
|
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
GetById(Guid)
Declaration
public IMacro GetById(Guid id)
Parameters
Type |
Name |
Description |
System.Guid |
id |
|
Returns
GetById(Int32)
Declaration
public IMacro GetById(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
Save(IMacro, Int32)
Declaration
public void Save(IMacro macro, int userId = 0)
Parameters
Type |
Name |
Description |
IMacro |
macro |
IMacro to save
|
System.Int32 |
userId |
Optional Id of the user deleting the macro
|
Events
Deleted
Declaration
public static event TypedEventHandler<IMacroService, DeleteEventArgs<IMacro>> Deleted
Event Type
Deleting
Declaration
public static event TypedEventHandler<IMacroService, DeleteEventArgs<IMacro>> Deleting
Event Type
Saved
Declaration
public static event TypedEventHandler<IMacroService, SaveEventArgs<IMacro>> Saved
Event Type
Saving
Declaration
public static event TypedEventHandler<IMacroService, SaveEventArgs<IMacro>> Saving
Event Type