/// <summary>
/// Creates a new instance of
/// <see cref="JsonPacket" /> for the specified
/// <paramref name="project" />.
/// </summary>
/// <param name="project">The project.</param>
/// <param name="message">The message to capture.</param>
/// <param name="level">The <see cref="ErrorLevel" /> of the captured <paramref name="message" />. Default <see cref="ErrorLevel.Info" />.</param>
/// <param name="tags">The tags to annotate the captured <paramref name="message" /> with.</param>
/// <param name="extra">The extra metadata to send with the captured <paramref name="message" />.</param>
/// <returns>
/// A new instance of <see cref="JsonPacket" /> for the specified <paramref name="project" />.
/// </returns>
public JsonPacket Create(string project,
SentryMessage message,
ErrorLevel level = ErrorLevel.Info,
IDictionary<string, string> tags = null,
object extra = null)
{
var json = new JsonPacket(project)
{
Message = message != null ? message.ToString() : null,
MessageObject = message,
Level = level,
Tags = tags,
Extra = extra
};
return OnCreate(json);
}