UmbracoUnitOfWork
A IDatabaseUnitOfWork
implementation using Umbraco Scopes
public class UmbracoUnitOfWork : IDatabaseUnitOfWork
Inheritance
- interface IDatabaseUnitOfWork
Namespace
Properties
Database
A IDatabase reference for use in the Unit of Work
public IDatabase Database { get; }
Methods
Complete
Marks the completion of a successful Unit of Work
public void Complete()
Dispose
Disposes of the Unit of Work
public void Dispose()
ScheduleAction
Schedules an Action to be performed once the Unit of Work is complete
public void ScheduleAction(Action action, string name)
Parameters
Parameter | Description |
---|---|
action
|
The Action to perform
|
name
|
A unique name for the action
|
ScheduleNotification
Schedules a Notification Event to be raised once the Unit of Work is complete
public void ScheduleNotification(INotificationEvent notificationEvent)
Parameters
Parameter | Description |
---|---|
notificationEvent
|
The Notification Event to raise
|
ScheduleNotifications (1 of 2)
Schedules a series of Notification Events to be raised once the Unit of Work is complete
public void ScheduleNotifications(params INotificationEvent[] notificationEvents)
Parameters
Parameter | Description |
---|---|
notificationEvents
|
The list of Notification Events to raise
|
ScheduleNotifications (2 of 2)
Schedules a series of Notification Events to be raised once the Unit of Work is complete
public void ScheduleNotifications(IEnumerable<INotificationEvent> notificationEvents)
Parameters
Parameter | Description |
---|---|
notificationEvents
|
The list of Notification Events to raise
|
Events
ActionHandler
A utility Action invocation handler for registering Actions on the Umbraco Scope
public static event EventHandler<ActionEventArgs> ActionHandler;
NotificationEventHandler
A utility Notification Event dispatch handler for registering Notification Events on the Umbraco Scope
public static event EventHandler<NotificationEventArgs> NotificationEventHandler;