LoggerExtensionsLogPropertyMissing Method

Invoked when a property value is missing in a model. (Being for example , Empty or Empty). This method can also be invoked if keys are missing in a collection.

Definition

Namespace: MobileTrack.Common.Extensions
Assembly: MobileTrack.Common (in MobileTrack.Common.dll) Version: 0.8+34f1bbd8dc6b32752cfce829cbed66e15113d7ba
[LoggerMessageAttribute(1058, LogLevel.Critical, "Property {PropertyName} of type {ModelName} was empty!")]
public static void LogPropertyMissing(
	this ILogger logger,
	string modelName,
	string propertyName
)

Parameters

logger  ILogger
Logger
modelName  String
Name of the model
propertyName  String
Name of the property

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ILogger. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Remarks

This should only be invoked when we try to execute logic, not when we are validating the model.

See Also