Class GeneralLogRepository
- Namespace
- Dynamicweb.Data
- Assembly
- Dynamicweb.Core.dll
public sealed class GeneralLogRepository : ILogEventRepository
- Inheritance
-
GeneralLogRepository
- Implements
- Inherited Members
Methods
DeleteEvent(int)
Deletes the logevent, if present.
public bool DeleteEvent(int id)
Parameters
idintIdentifier of logevent
Returns
- bool
wasDeleted
DeleteEvents(LogEventQuery)
Deletes logevents based upon query.
public int DeleteEvents(LogEventQuery query)
Parameters
queryLogEventQueryQuery defining which logevents to delete
Returns
- int
deletedLogEvents
GetEvents(LogEventQuery)
Gets logevents based upon query.
public IList<LogEvent> GetEvents(LogEventQuery query)
Parameters
queryLogEventQueryQuery defining which logevents to fetch
Returns
Priority()
Sets the priority among all implementations of the repositories.
public int Priority()
Returns
- int
priority
ReadEvent(int)
Reads the event from repository.
public LogEvent? ReadEvent(int id)
Parameters
idintIdentifier of logevent
Returns
- LogEvent
logEvent
SaveEvent(LogEvent)
Persists a LogEvent to the data store.
public int SaveEvent(LogEvent logEvent)
Parameters
Returns
- int
The identifier of the saved log event. If the event already had an identifier (> 0), the same value is returned after updating; otherwise, the newly generated identifier is returned.
Remarks
- Throws ArgumentNullException if
logEventis null. - If
logEventhas a positiveId, the event is updated via UpdateEvent(LogEvent). - If
logEventhas noId(0 or less), a new record is created via InsertEvent(LogEvent), and the generatedIdis assigned back to the provided instance.