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+ce90b2cf6b782b8d7b7fd47b3c546987c652c00f
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