Table of Contents

Class ModelStateFormatterLogger

Namespace
System.Web.Http.Validation
Assembly
System.Web.Http.dll

This System.Net.Http.Formatting.IFormatterLogger logs formatter errors to the provided ModelStateDictionary.

public class ModelStateFormatterLogger : IFormatterLogger
Inheritance
ModelStateFormatterLogger
Implements
IFormatterLogger
Inherited Members

Constructors

ModelStateFormatterLogger(ModelStateDictionary, string)

Initializes a new instance of the ModelStateFormatterLogger class.

public ModelStateFormatterLogger(ModelStateDictionary modelState, string prefix)

Parameters

modelState ModelStateDictionary

The model state.

prefix string

The prefix.

Methods

LogError(string, Exception)

Logs the specified model error.

public void LogError(string errorPath, Exception exception)

Parameters

errorPath string

The error path.

exception Exception

The error message.

LogError(string, string)

Logs the specified model error.

public void LogError(string errorPath, string errorMessage)

Parameters

errorPath string

The error path.

errorMessage string

The error message.