ModelFactoryGenerateLogForBackgroundProcessT(Guid, EventId, T, NullableGeoLocation, IIdLabel) Method

Generates a log for events inside background processes, e.g. the Event Handler or Device Receiver. (not the portal or API!).

Definition

Namespace: MobileTrack.Common.Extensions
Assembly: MobileTrack.Common (in MobileTrack.Common.dll) Version: 0.7+ce90b2cf6b782b8d7b7fd47b3c546987c652c00f
public static LogDto GenerateLogForBackgroundProcess<T>(
	Guid processId,
	EventId automaticEvent,
	T impactedObject,
	GeoLocation? location,
	IIdLabel? snapShotResource
)
where T : IIdLabel, IHasCompany

Parameters

processId  Guid
The ID of the lifecycle of the process executing this task.
automaticEvent  EventId
Invoked event
impactedObject  T
Object being impacted
location  NullableGeoLocation
The location on the map where the event took place (only relevant for the device receiver)
snapShotResource  IIdLabel
A snapshot of the resource.

Type Parameters

T
Business object we're working with (must be composed of at least IIdLabel and IHasCompany)

Return Value

LogDto
Generated log.

Exceptions

ArgumentExceptionThrown if processId is Empty.
ArgumentExceptionThrown if automaticEvent is 0.
ArgumentNullExceptionThrown if impactedObject is
NotImplementedExceptionThrown if snapShotResource is not a supported ResourceType

See Also