Files
Umbraco-CMS/src/Umbraco.Core/Notifications/ModelBindingErrorNotification.cs

38 lines
1.1 KiB
C#
Raw Normal View History

using System;
2021-02-01 15:37:41 +11:00
using System.Text;
namespace Umbraco.Cms.Core.Notifications
2021-02-01 15:37:41 +11:00
{
/// <summary>
/// Contains event data for the <see cref="ModelBindingException"/> event.
/// </summary>
public class ModelBindingErrorNotification : INotification
2021-02-01 15:37:41 +11:00
{
/// <summary>
/// Initializes a new instance of the <see cref="ModelBindingErrorNotification"/> class.
2021-02-01 15:37:41 +11:00
/// </summary>
public ModelBindingErrorNotification(Type sourceType, Type modelType, StringBuilder message)
2021-02-01 15:37:41 +11:00
{
SourceType = sourceType;
ModelType = modelType;
Message = message;
}
/// <summary>
/// Gets the type of the source object.
/// </summary>
public Type SourceType { get; }
2021-02-01 15:37:41 +11:00
/// <summary>
/// Gets the type of the view model.
/// </summary>
public Type ModelType { get; }
2021-02-01 15:37:41 +11:00
/// <summary>
/// Gets the message string builder.
/// </summary>
/// <remarks>Handlers of the event can append text to the message.</remarks>
public StringBuilder Message { get; }
}
}