ModelFactoryGenerateLogForUserAction Method

Generates a log generated because a user performed an action.

Definition

Namespace: MobileTrack.Common.Extensions
Assembly: MobileTrack.Common (in MobileTrack.Common.dll) Version: 0.8+34f1bbd8dc6b32752cfce829cbed66e15113d7ba
public static LogDto GenerateLogForUserAction(
	AccountDto user,
	string ipAddress,
	EventId userEvent,
	IIdLabel impactedObject,
	Guid impactedObjectCompanyId,
	IIdLabel? snapShotResource
)

Parameters

user  AccountDto
User that performed the action
ipAddress  String
IP Address of the user
userEvent  EventId
Event the user enacted
impactedObject  IIdLabel
The object that was impacted because of the action.
impactedObjectCompanyId  Guid
The company the impactedObject belongs to
snapShotResource  IIdLabel
A snapshot of the alterations of the object.

Return Value

LogDto
Generated log

Remarks

The parameters impactedObject and impactedObjectCompanyId are separated because otherwise one couldn't generate a log for CompanyDto's.

Exceptions

NotImplementedExceptionThrown if snapShotResource is not a supported ResourceType.

See Also