Click or drag to resize

NeonControllerBase Class

Enhances the ControllerBase class to simplify and enhance web service logging.
Inheritance Hierarchy
SystemObject
  ControllerBase
    Neon.WebNeonControllerBase

Namespace:  Neon.Web
Assembly:  Neon.Web (in Neon.Web.dll) Version: 2.2.0
Syntax
public abstract class NeonControllerBase : ControllerBase, 
	INeonLogger

The NeonControllerBase type exposes the following members.

Constructors
  NameDescription
Protected methodNeonControllerBase
Constructor.
Top
Properties
  NameDescription
Protected propertyActivityId
Returns the opaque globally unique activity ID for the current operation.
Public propertyContextId
Returns the logger's context ID or null.
Public propertyControllerContext
Gets or sets the ControllerContext.
(Inherited from ControllerBase.)
Public propertyHttpContext
Gets the HttpContext for the executing action.
(Inherited from ControllerBase.)
Protected propertyInternalActivityId
Internal use only: Return's the request's X-Request-ID header value or null. Application services should use ActivityId which guarantees that a valid activity ID will be returned.
Public propertyIsLogCriticalEnabled
Returns true if critical logging is enabled.
Public propertyIsLogDebugEnabled
Returns true if debug logging is enabled.
Public propertyIsLogErrorEnabled
Returns true if error logging is enabled.
Public propertyIsLogInfoEnabled
Returns true if info logging is enabled.
Public propertyIsLogSErrorEnabled
Returns true if serror logging is enabled.
Public propertyIsLogSInfoEnabled
Returns true if sinfo logging is enabled.
Public propertyIsLogTransientEnabled
Returns true if transient logging is enabled.
Public propertyIsLogWarnEnabled
Returns true if warn logging is enabled.
Public propertyMetadataProvider
Gets or sets the IModelMetadataProvider.
(Inherited from ControllerBase.)
Public propertyModelBinderFactory
Gets or sets the IModelBinderFactory.
(Inherited from ControllerBase.)
Public propertyModelState
Gets the ModelStateDictionary that contains the state of the model and of model-binding validation.
(Inherited from ControllerBase.)
Public propertyObjectValidator
Gets or sets the IObjectModelValidator.
(Inherited from ControllerBase.)
Public propertyRequest
Gets the HttpRequest for the executing action.
(Inherited from ControllerBase.)
Public propertyResponse
Gets the HttpResponse for the executing action.
(Inherited from ControllerBase.)
Public propertyRouteData
Gets the RouteData for the executing action.
(Inherited from ControllerBase.)
Public propertyUrl
Gets or sets the IUrlHelper.
(Inherited from ControllerBase.)
Public propertyUser
Gets the ClaimsPrincipal for user associated with the executing action.
(Inherited from ControllerBase.)
Top
Methods
  NameDescription
Public methodAccepted (Inherited from ControllerBase.)
Public methodAccepted(Object) (Inherited from ControllerBase.)
Public methodAccepted(Uri) (Inherited from ControllerBase.)
Public methodAccepted(String) (Inherited from ControllerBase.)
Public methodAccepted(String, Object) (Inherited from ControllerBase.)
Public methodAccepted(Uri, Object) (Inherited from ControllerBase.)
Public methodAcceptedAtAction(String) (Inherited from ControllerBase.)
Public methodAcceptedAtAction(String, String) (Inherited from ControllerBase.)
Public methodAcceptedAtAction(String, Object) (Inherited from ControllerBase.)
Public methodAcceptedAtAction(String, String, Object) (Inherited from ControllerBase.)
Public methodAcceptedAtAction(String, Object, Object) (Inherited from ControllerBase.)
Public methodAcceptedAtAction(String, String, Object, Object) (Inherited from ControllerBase.)
Public methodAcceptedAtRoute(Object) (Inherited from ControllerBase.)
Public methodAcceptedAtRoute(String) (Inherited from ControllerBase.)
Public methodAcceptedAtRoute(String, Object) (Inherited from ControllerBase.)
Public methodAcceptedAtRoute(Object, Object) (Inherited from ControllerBase.)
Public methodAcceptedAtRoute(String, Object, Object) (Inherited from ControllerBase.)
Public methodBadRequest (Inherited from ControllerBase.)
Public methodBadRequest(Object) (Inherited from ControllerBase.)
Public methodBadRequest(ModelStateDictionary) (Inherited from ControllerBase.)
Public methodChallenge
Creates a ChallengeResult.
(Inherited from ControllerBase.)
Public methodChallenge(String)
Creates a ChallengeResult with the specified authentication schemes.
(Inherited from ControllerBase.)
Public methodChallenge(AuthenticationProperties)
Creates a ChallengeResult with the specified properties.
(Inherited from ControllerBase.)
Public methodChallenge(AuthenticationProperties, String)
Creates a ChallengeResult with the specified authentication schemes and properties.
(Inherited from ControllerBase.)
Public methodConflict (Inherited from ControllerBase.)
Public methodConflict(Object) (Inherited from ControllerBase.)
Public methodConflict(ModelStateDictionary) (Inherited from ControllerBase.)
Public methodContent(String) (Inherited from ControllerBase.)
Public methodContent(String, String)
Creates a ContentResult object with Status200OK by specifying a content string and a content type.
(Inherited from ControllerBase.)
Public methodContent(String, MediaTypeHeaderValue)
Creates a ContentResult object with Status200OK by specifying a content string and a contentType.
(Inherited from ControllerBase.)
Public methodContent(String, String, Encoding)
Creates a ContentResult object with Status200OK by specifying a content string, a contentType, and contentEncoding.
(Inherited from ControllerBase.)
Public methodCreated(String, Object) (Inherited from ControllerBase.)
Public methodCreated(Uri, Object) (Inherited from ControllerBase.)
Public methodCreatedAtAction(String, Object) (Inherited from ControllerBase.)
Public methodCreatedAtAction(String, Object, Object) (Inherited from ControllerBase.)
Public methodCreatedAtAction(String, String, Object, Object) (Inherited from ControllerBase.)
Public methodCreatedAtRoute(String, Object) (Inherited from ControllerBase.)
Public methodCreatedAtRoute(Object, Object) (Inherited from ControllerBase.)
Public methodCreatedAtRoute(String, Object, Object) (Inherited from ControllerBase.)
Public methodCritical(Object, String)
Logs a critical message.
Public methodCritical(Object, Exception, String)
Logs a critical message along with exception information.
Public methodDebug(Object, String)
Logs a debug message.
Public methodDebug(Object, Exception, String)
Logs a debug message along with exception information.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodError(Object, String)
Logs an error message.
Public methodError(Object, Exception, String)
Logs an error message along with exception information.
Public methodFile(Byte, String) (Inherited from ControllerBase.)
Public methodFile(Stream, String) (Inherited from ControllerBase.)
Public methodFile(String, String) (Inherited from ControllerBase.)
Public methodFile(Byte, String, Boolean) (Inherited from ControllerBase.)
Public methodFile(Byte, String, String)
Returns a file with the specified fileContents as content (Status200OK), the specified contentType as the Content-Type and the specified fileDownloadName as the suggested file name. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).
(Inherited from ControllerBase.)
Public methodFile(Stream, String, Boolean) (Inherited from ControllerBase.)
Public methodFile(Stream, String, String)
Returns a file in the specified fileStream (Status200OK) with the specified contentType as the Content-Type and the specified fileDownloadName as the suggested file name. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).
(Inherited from ControllerBase.)
Public methodFile(String, String, Boolean) (Inherited from ControllerBase.)
Public methodFile(String, String, String)
Returns the file specified by virtualPath (Status200OK) with the specified contentType as the Content-Type and the specified fileDownloadName as the suggested file name. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).
(Inherited from ControllerBase.)
Public methodFile(Byte, String, String, Boolean)
Returns a file with the specified fileContents as content (Status200OK), the specified contentType as the Content-Type and the specified fileDownloadName as the suggested file name. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).
(Inherited from ControllerBase.)
Public methodFile(Byte, String, NullableDateTimeOffset, EntityTagHeaderValue) (Inherited from ControllerBase.)
Public methodFile(Stream, String, String, Boolean)
Returns a file in the specified fileStream (Status200OK) with the specified contentType as the Content-Type and the specified fileDownloadName as the suggested file name. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).
(Inherited from ControllerBase.)
Public methodFile(Stream, String, NullableDateTimeOffset, EntityTagHeaderValue) (Inherited from ControllerBase.)
Public methodFile(String, String, String, Boolean)
Returns the file specified by virtualPath (Status200OK) with the specified contentType as the Content-Type and the specified fileDownloadName as the suggested file name. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).
(Inherited from ControllerBase.)
Public methodFile(String, String, NullableDateTimeOffset, EntityTagHeaderValue) (Inherited from ControllerBase.)
Public methodFile(Byte, String, NullableDateTimeOffset, EntityTagHeaderValue, Boolean) (Inherited from ControllerBase.)
Public methodFile(Byte, String, String, NullableDateTimeOffset, EntityTagHeaderValue)
Returns a file with the specified fileContents as content (Status200OK), the specified contentType as the Content-Type, and the specified fileDownloadName as the suggested file name. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).
(Inherited from ControllerBase.)
Public methodFile(Stream, String, NullableDateTimeOffset, EntityTagHeaderValue, Boolean) (Inherited from ControllerBase.)
Public methodFile(Stream, String, String, NullableDateTimeOffset, EntityTagHeaderValue)
Returns a file in the specified fileStream (Status200OK), the specified contentType as the Content-Type, and the specified fileDownloadName as the suggested file name. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).
(Inherited from ControllerBase.)
Public methodFile(String, String, NullableDateTimeOffset, EntityTagHeaderValue, Boolean) (Inherited from ControllerBase.)
Public methodFile(String, String, String, NullableDateTimeOffset, EntityTagHeaderValue)
Returns the file specified by virtualPath (Status200OK), the specified contentType as the Content-Type, and the specified fileDownloadName as the suggested file name. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).
(Inherited from ControllerBase.)
Public methodFile(Byte, String, String, NullableDateTimeOffset, EntityTagHeaderValue, Boolean)
Returns a file with the specified fileContents as content (Status200OK), the specified contentType as the Content-Type, and the specified fileDownloadName as the suggested file name. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).
(Inherited from ControllerBase.)
Public methodFile(Stream, String, String, NullableDateTimeOffset, EntityTagHeaderValue, Boolean)
Returns a file in the specified fileStream (Status200OK), the specified contentType as the Content-Type, and the specified fileDownloadName as the suggested file name. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).
(Inherited from ControllerBase.)
Public methodFile(String, String, String, NullableDateTimeOffset, EntityTagHeaderValue, Boolean)
Returns the file specified by virtualPath (Status200OK), the specified contentType as the Content-Type, and the specified fileDownloadName as the suggested file name. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).
(Inherited from ControllerBase.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodForbid (Inherited from ControllerBase.)
Public methodForbid(String) (Inherited from ControllerBase.)
Public methodForbid(AuthenticationProperties) (Inherited from ControllerBase.)
Public methodForbid(AuthenticationProperties, String)
Creates a ForbidResult (Status403Forbidden by default) with the specified authentication schemes and properties.
(Inherited from ControllerBase.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInfo(Object, String)
Logs an info message.
Public methodInfo(Object, Exception, String)
Logs an info message along with exception information.
Public methodIsLogLevelEnabled
Indicates whether logging is enabled for a specific log level.
Public methodLocalRedirect (Inherited from ControllerBase.)
Public methodLocalRedirectPermanent (Inherited from ControllerBase.)
Public methodLocalRedirectPermanentPreserveMethod (Inherited from ControllerBase.)
Public methodLocalRedirectPreserveMethod (Inherited from ControllerBase.)
Public methodLogCritical(Object, String)
Logs a critical message.
Public methodLogCritical(Object, Exception, String)
Logs a critical message along with exception information.
Public methodLogDebug(Object, String)
Logs a debug message.
Public methodLogDebug(Object, Exception, String)
Logs a debug message along with exception information.
Public methodLogError(Object, String)
Logs an error message.
Public methodLogError(Object, Exception, String)
Logs an error message along with exception information.
Public methodLogInfo(Object, String)
Logs an info message.
Public methodLogInfo(Object, Exception, String)
Logs an info message along with exception information.
Public methodLogSError(Object, String)
Logs an serror message.
Public methodLogSError(Object, Exception, String)
Logs an serror message along with exception information.
Public methodLogSInfo(Object, String)
Logs an sinfo message.
Public methodLogSInfo(Object, Exception, String)
Logs an sinfo message along with exception information.
Public methodLogTransient(Object, String)
Logs a transient message.
Public methodLogTransient(Object, Exception, String)
Logs a transient message along with exception information.
Public methodLogWarn(Object, String)
Logs a warn message.
Public methodLogWarn(Object, Exception, String)
Logs a warn message along with exception information.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodNoContent (Inherited from ControllerBase.)
Public methodNotFound (Inherited from ControllerBase.)
Public methodNotFound(Object) (Inherited from ControllerBase.)
Public methodOk (Inherited from ControllerBase.)
Public methodOk(Object) (Inherited from ControllerBase.)
Public methodPhysicalFile(String, String) (Inherited from ControllerBase.)
Public methodPhysicalFile(String, String, Boolean) (Inherited from ControllerBase.)
Public methodPhysicalFile(String, String, String)
Returns the file specified by physicalPath (Status200OK) with the specified contentType as the Content-Type and the specified fileDownloadName as the suggested file name. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).
(Inherited from ControllerBase.)
Public methodPhysicalFile(String, String, String, Boolean)
Returns the file specified by physicalPath (Status200OK) with the specified contentType as the Content-Type and the specified fileDownloadName as the suggested file name. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).
(Inherited from ControllerBase.)
Public methodPhysicalFile(String, String, NullableDateTimeOffset, EntityTagHeaderValue) (Inherited from ControllerBase.)
Public methodPhysicalFile(String, String, NullableDateTimeOffset, EntityTagHeaderValue, Boolean) (Inherited from ControllerBase.)
Public methodPhysicalFile(String, String, String, NullableDateTimeOffset, EntityTagHeaderValue)
Returns the file specified by physicalPath (Status200OK), the specified contentType as the Content-Type, and the specified fileDownloadName as the suggested file name. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).
(Inherited from ControllerBase.)
Public methodPhysicalFile(String, String, String, NullableDateTimeOffset, EntityTagHeaderValue, Boolean)
Returns the file specified by physicalPath (Status200OK), the specified contentType as the Content-Type, and the specified fileDownloadName as the suggested file name. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).
(Inherited from ControllerBase.)
Public methodRedirect (Inherited from ControllerBase.)
Public methodRedirectPermanent (Inherited from ControllerBase.)
Public methodRedirectPermanentPreserveMethod (Inherited from ControllerBase.)
Public methodRedirectPreserveMethod (Inherited from ControllerBase.)
Public methodCode exampleRedirectToAction
Redirects (Status302Found) to an action with the same name as current one. The 'controller' and 'action' names are retrieved from the ambient values of the current request.
(Inherited from ControllerBase.)
Public methodRedirectToAction(String)
Redirects (Status302Found) to the specified action using the actionName.
(Inherited from ControllerBase.)
Public methodRedirectToAction(String, Object)
Redirects (Status302Found) to the specified action using the actionName and routeValues.
(Inherited from ControllerBase.)
Public methodRedirectToAction(String, String)
Redirects (Status302Found) to the specified action using the actionName and the controllerName.
(Inherited from ControllerBase.)
Public methodRedirectToAction(String, String, Object)
Redirects (Status302Found) to the specified action using the specified actionName, controllerName, and routeValues.
(Inherited from ControllerBase.)
Public methodRedirectToAction(String, String, String)
Redirects (Status302Found) to the specified action using the specified actionName, controllerName, and fragment.
(Inherited from ControllerBase.)
Public methodRedirectToAction(String, String, Object, String)
Redirects (Status302Found) to the specified action using the specified actionName, controllerName, routeValues, and fragment.
(Inherited from ControllerBase.)
Public methodRedirectToActionPermanent(String) (Inherited from ControllerBase.)
Public methodRedirectToActionPermanent(String, Object) (Inherited from ControllerBase.)
Public methodRedirectToActionPermanent(String, String) (Inherited from ControllerBase.)
Public methodRedirectToActionPermanent(String, String, String) (Inherited from ControllerBase.)
Public methodRedirectToActionPermanent(String, String, Object) (Inherited from ControllerBase.)
Public methodRedirectToActionPermanent(String, String, Object, String)
Redirects (Status301MovedPermanently) to the specified action with Permanent set to true using the specified actionName, controllerName, routeValues, and fragment.
(Inherited from ControllerBase.)
Public methodRedirectToActionPermanentPreserveMethod (Inherited from ControllerBase.)
Public methodRedirectToActionPreserveMethod (Inherited from ControllerBase.)
Public methodRedirectToPage(String) (Inherited from ControllerBase.)
Public methodRedirectToPage(String, Object)
Redirects (Status302Found) to the specified pageName using the specified routeValues.
(Inherited from ControllerBase.)
Public methodRedirectToPage(String, String)
Redirects (Status302Found) to the specified pageName using the specified pageHandler.
(Inherited from ControllerBase.)
Public methodRedirectToPage(String, String, Object) (Inherited from ControllerBase.)
Public methodRedirectToPage(String, String, String)
Redirects (Status302Found) to the specified pageName using the specified fragment.
(Inherited from ControllerBase.)
Public methodRedirectToPage(String, String, Object, String)
Redirects (Status302Found) to the specified pageName using the specified routeValues and fragment.
(Inherited from ControllerBase.)
Public methodRedirectToPagePermanent(String) (Inherited from ControllerBase.)
Public methodRedirectToPagePermanent(String, Object)
Redirects (Status301MovedPermanently) to the specified pageName using the specified routeValues.
(Inherited from ControllerBase.)
Public methodRedirectToPagePermanent(String, String)
Redirects (Status301MovedPermanently) to the specified pageName using the specified pageHandler.
(Inherited from ControllerBase.)
Public methodRedirectToPagePermanent(String, String, String)
Redirects (Status301MovedPermanently) to the specified pageName using the specified fragment.
(Inherited from ControllerBase.)
Public methodRedirectToPagePermanent(String, String, Object, String)
Redirects (Status301MovedPermanently) to the specified pageName using the specified routeValues and fragment.
(Inherited from ControllerBase.)
Public methodRedirectToPagePermanentPreserveMethod (Inherited from ControllerBase.)
Public methodRedirectToPagePreserveMethod (Inherited from ControllerBase.)
Public methodRedirectToRoute(String)
Redirects (Status302Found) to the specified route using the specified routeName.
(Inherited from ControllerBase.)
Public methodRedirectToRoute(Object)
Redirects (Status302Found) to the specified route using the specified routeValues.
(Inherited from ControllerBase.)
Public methodRedirectToRoute(String, Object)
Redirects (Status302Found) to the specified route using the specified routeName and routeValues.
(Inherited from ControllerBase.)
Public methodRedirectToRoute(String, String)
Redirects (Status302Found) to the specified route using the specified routeName and fragment.
(Inherited from ControllerBase.)
Public methodRedirectToRoute(String, Object, String)
Redirects (Status302Found) to the specified route using the specified routeName, routeValues, and fragment.
(Inherited from ControllerBase.)
Public methodRedirectToRoutePermanent(String) (Inherited from ControllerBase.)
Public methodRedirectToRoutePermanent(Object) (Inherited from ControllerBase.)
Public methodRedirectToRoutePermanent(String, Object) (Inherited from ControllerBase.)
Public methodRedirectToRoutePermanent(String, String) (Inherited from ControllerBase.)
Public methodRedirectToRoutePermanent(String, Object, String) (Inherited from ControllerBase.)
Public methodRedirectToRoutePermanentPreserveMethod (Inherited from ControllerBase.)
Public methodRedirectToRoutePreserveMethod (Inherited from ControllerBase.)
Public methodSError(Object, String)
Logs a serror message.
Public methodSError(Object, Exception, String)
Logs a serror message along with exception information.
Public methodSignIn(ClaimsPrincipal, String)
Creates a SignInResult with the specified authentication scheme.
(Inherited from ControllerBase.)
Public methodSignIn(ClaimsPrincipal, AuthenticationProperties, String)
Creates a SignInResult with the specified authentication scheme and properties.
(Inherited from ControllerBase.)
Public methodSignOut(String)
Creates a SignOutResult with the specified authentication schemes.
(Inherited from ControllerBase.)
Public methodSignOut(AuthenticationProperties, String)
Creates a SignOutResult with the specified authentication schemes and properties.
(Inherited from ControllerBase.)
Public methodSInfo(Object, String)
Logs a sinfo message.
Public methodSInfo(Object, Exception, String)
Logs a sinfo message along with exception information.
Public methodStatusCode(Int32)
Creates a StatusCodeResult object by specifying a statusCode.
(Inherited from ControllerBase.)
Public methodStatusCode(Int32, Object)
Creates a ObjectResult object by specifying a statusCode and value
(Inherited from ControllerBase.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodTransient(Object, String)
Logs a transient message.
Public methodTransient(Object, Exception, String)
Logs a transient message along with exception information.
Public methodTryUpdateModelAsync(Object, Type, String)
Updates the specified model instance using values from the controller's current IValueProvider and a prefix.
(Inherited from ControllerBase.)
Public methodTryUpdateModelAsync(Object, Type, String, IValueProvider, FuncModelMetadata, Boolean)
Updates the specified model instance using the valueProvider and a prefix.
(Inherited from ControllerBase.)
Public methodTryUpdateModelAsync``1(UMP)
Updates the specified model instance using values from the controller's current IValueProvider.
(Inherited from ControllerBase.)
Public methodTryUpdateModelAsync``1(UMP, String)
Updates the specified model instance using values from the controller's current IValueProvider and a prefix.
(Inherited from ControllerBase.)
Public methodTryUpdateModelAsync``1(UMP, String, IValueProvider)
Updates the specified model instance using the valueProvider and a prefix.
(Inherited from ControllerBase.)
Public methodTryUpdateModelAsync``1(UMP, String, ExpressionFuncUMP, Object)
Updates the specified model instance using values from the controller's current IValueProvider and a prefix.
(Inherited from ControllerBase.)
Public methodTryUpdateModelAsync``1(UMP, String, FuncModelMetadata, Boolean)
Updates the specified model instance using values from the controller's current IValueProvider and a prefix.
(Inherited from ControllerBase.)
Public methodTryUpdateModelAsync``1(UMP, String, IValueProvider, ExpressionFuncUMP, Object)
Updates the specified model instance using the valueProvider and a prefix.
(Inherited from ControllerBase.)
Public methodTryUpdateModelAsync``1(UMP, String, IValueProvider, FuncModelMetadata, Boolean)
Updates the specified model instance using the valueProvider and a prefix.
(Inherited from ControllerBase.)
Public methodTryValidateModel(Object)
Validates the specified model instance.
(Inherited from ControllerBase.)
Public methodTryValidateModel(Object, String)
Validates the specified model instance.
(Inherited from ControllerBase.)
Public methodUnauthorized (Inherited from ControllerBase.)
Public methodUnauthorized(Object) (Inherited from ControllerBase.)
Public methodUnprocessableEntity (Inherited from ControllerBase.)
Public methodUnprocessableEntity(Object) (Inherited from ControllerBase.)
Public methodUnprocessableEntity(ModelStateDictionary) (Inherited from ControllerBase.)
Public methodValidationProblem (Inherited from ControllerBase.)
Public methodValidationProblem(ValidationProblemDetails) (Inherited from ControllerBase.)
Public methodValidationProblem(ModelStateDictionary) (Inherited from ControllerBase.)
Public methodWarn(Object, String)
Logs a warn message.
Public methodWarn(Object, Exception, String)
Logs a warn message along with exception information.
Top
Extension Methods
  NameDescription
Public Extension MethodLogCritical(FuncObject)Overloaded.
Logs a critical message retrieved via a message function.
(Defined by LogExtensions.)
Public Extension MethodLogCritical(Exception)Overloaded.
Logs a critical exception.
(Defined by LogExtensions.)
Public Extension MethodLogDebug(FuncObject)Overloaded.
Logs a debug message retrieved via a message function.
(Defined by LogExtensions.)
Public Extension MethodLogDebug(Exception)Overloaded.
Logs a debug exception.
(Defined by LogExtensions.)
Public Extension MethodLogError(FuncObject)Overloaded.
Logs an error message retrieved via a message function.
(Defined by LogExtensions.)
Public Extension MethodLogError(Exception)Overloaded.
Logs an error exception.
(Defined by LogExtensions.)
Public Extension MethodLogInfo(FuncObject)Overloaded.
Logs an informational message retrieved via a message function.
(Defined by LogExtensions.)
Public Extension MethodLogInfo(Exception)Overloaded.
Logs an info exception.
(Defined by LogExtensions.)
Public Extension MethodLogTransient(FuncObject)Overloaded.
Logs a transient message retrieved via a message function.
(Defined by LogExtensions.)
Public Extension MethodLogTransient(Exception)Overloaded.
Logs a transient exception.
(Defined by LogExtensions.)
Public Extension MethodLogWarn(FuncObject)Overloaded.
Logs a warning message retrieved via a message function.
(Defined by LogExtensions.)
Public Extension MethodLogWarn(Exception)Overloaded.
Logs a warning exception.
(Defined by LogExtensions.)
Top
Remarks

This class provides two logging related enhancements. First, NeonController implements INeonLogger so that all of the standard logging methods are directly available in the context of the derived controller. Events will be logged with the module set to "Web-" prefixing the name of the controller.

The ActivityId property can also be used to easily correlate operations that span multiple systems and services. An activity is a globally unique string that can be used to corelate a parent operation with any decendent operations. For example, a parent operation such as get-weather may need to call several other web services to get-current-weather, get-forecast, get-weather-alerts,... and these child services may need to call other services. The essential idea here is to generate an activity ID for the parent operation, recursively pass this to any child operations and then include the activity ID in any logged errors or warnings.

This can be very useful operationally for diagnosing problems. A typical scanario is: a parent operation fails and an error is logged and the operator can then review the logs with the activity across all systems and services to disgnose exactly what happened.

The Neon framework and cluster have built-in mechanisms to make this easy. INeonLogger logging methods include activityId as first class parameters and the cluster pipeline implicitly process and persist activity-id fields from event streams.

The neon-proxy-public and neon-proxy-private services are also aware of activity IDs and will include these in the HTTP traffic logs and also generate new activity IDs for inbound requests that don't already have them. This value will be available as the ActivityId property.

To enable cross system/service activity correlation, you'll need to include the ActivityId as the X-Request-ID header in requests made to those systems. The JsonClient includes built-in methods that make this easy.

See Also