Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Messages.Abstractions/OperationMessageExtensions.cs
/// <summary>
///     Add a new message into the message collection.
/// </summary>
/// <param name="messageAccessor">The collection of messages to be adding the new message.</param>
/// <param name="level">The level of the new message.</param>
/// <param name="title">The title of the new message.</param>
/// <param name="description">The detailed description of the new message.</param>
/// <returns>The newly added <see cref="OperationMessage" /> object.</returns>
/// <exception cref="ArgumentNullException"><paramref name="messageAccessor" /> is <c>null</c>.</exception>
Add a new message into the message collection.
Add a new message into the message collection .
public static OperationMessage Add([NotNull] this IOperationMessageAccessor messageAccessor,
			OperationMessageLevel level, [CanBeNull] [LocalizationRequired] string title,
			[CanBeNull] [LocalizationRequired] string description = null)
		{
			if (messageAccessor == null)
				throw new ArgumentNullException(nameof(messageAccessor));
			var item = new OperationMessage(level, title, description);
			messageAccessor.Messages.Add(item);
			return item;
		}
public static OperationMessage Add ( [ NotNull ] this IOperationMessageAccessor messageAccessor , OperationMessageLevel level , [ CanBeNull ] [ LocalizationRequired ] string title , [ CanBeNull ] [ LocalizationRequired ] string description = null ) { if ( messageAccessor == null ) throw new ArgumentNullException ( nameof ( messageAccessor ) ) ; var item = new OperationMessage ( level , title , description ) ; messageAccessor . Messages . Add ( item ) ; return item ; }
Add a new message into the message collection.
Add a new message into the message collection .
The newly added  object.
The newly added object .
None
this
[NotNull]
level
OperationMessageLevel
The level of the new message.
The level of the new message .
[LocalizationRequired]
[CanBeNull]
messageAccessor
The collection of messages to be adding the new message.
The collection of messages to be adding the new message .
title
The title of the new message.
The title of the new message .
description
The detailed description of the new message.
The detailed description of the new message .