// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.AspNet.JsonPatch.Operations; using Microsoft.Framework.Internal; namespace Microsoft.AspNet.JsonPatch { /// /// Captures error message and the related entity and the operation that caused it. /// public class JsonPatchError where TModel : class { /// /// Initializes a new instance of . /// /// The object that is affected by the error. /// The that caused the error. /// The error message. public JsonPatchError( [NotNull] TModel affectedObject, [NotNull] Operation operation, [NotNull] string errorMessage) { AffectedObject = affectedObject; Operation = operation; ErrorMessage = errorMessage; } /// /// Gets the object that is affected by the error. /// public TModel AffectedObject { get; } /// /// Gets the that caused the error. /// public Operation Operation { get; } /// /// Gets the error message. /// public string ErrorMessage { get; } } }