ModelFactoryGenerateLogForBackgroundProcess(Guid, EventId, CompanyDto, NullableGeoLocation, IIdLabel) Method

Generates a log for an event 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(
	Guid processId,
	EventId automaticEvent,
	CompanyDto impactedCompany,
	GeoLocation? location,
	IIdLabel? snapShotResource
)

Parameters

processId  Guid
The ID of the lifecycle of the process executing this task.
automaticEvent  EventId
Invoked event
impactedCompany  CompanyDto
Company 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.

Return Value

LogDto
Generated log.

Remarks

This override exists to support logging events for CompanyDto's.

Exceptions

ArgumentExceptionThrown if automaticEvent is 0.
ArgumentNullExceptionThrown if impactedCompany is
NotImplementedExceptionThrown if snapShotResource is not a supported ResourceType

See Also