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.7+1dadc87dcf0a0f837e19a3ce2deb7c1cd85375d1
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