private InitializeAndSend ( |
||
exception | ||
tags | CKTrait | |
text | string | |
return | IDisposableGroup |
/// <summary> /// Sends a formatted text with an exception and associated tags. /// </summary> /// <param name="this">This <see cref="IActivityMonitorGroupSender"/> object.</param> /// <param name="ex">The exception. Must not be null.</param> /// <param name="tags">Tags for the log.</param> /// <param name="format">The text format of the log with 5 placeholders.</param> /// <param name="arguments">Multiple parameters to format.</param> static public IDisposableGroup Send(this IActivityMonitorGroupSender @this, Exception ex, CKTrait tags, string format, params object[] arguments) { ActivityMonitorGroupSender s = (ActivityMonitorGroupSender)@this; if (s.IsRejected) { return(s.Monitor.UnfilteredOpenGroup(s)); } return(s.InitializeAndSend(ex, tags, format == null ? null : String.Format(format, arguments))); }
/// <summary> /// Sends a formatted text. /// </summary> /// <param name="this">This <see cref="IActivityMonitorGroupSender"/> object.</param> /// <param name="format">The text format of the log with 2 placeholders.</param> /// <param name="arg0">Parameter to format (placeholder {0}).</param> /// <param name="arg1">Parameter to format (placeholder {1}).</param> static public IDisposableGroup Send(this IActivityMonitorGroupSender @this, string format, object arg0, object arg1) { ActivityMonitorGroupSender s = (ActivityMonitorGroupSender)@this; if (s.IsRejected) { return(s.Monitor.UnfilteredOpenGroup(s)); } return(s.InitializeAndSend(null, ActivityMonitor.Tags.Empty, format == null ? null : String.Format(format, arg0, arg1))); }
/// <summary> /// Sends a text. /// </summary> /// <param name="this">This <see cref="IActivityMonitorGroupSender"/> object.</param> /// <param name="text">The text of the log.</param> static public IDisposableGroup Send(this IActivityMonitorGroupSender @this, string text) { ActivityMonitorGroupSender s = (ActivityMonitorGroupSender)@this; if (s.IsRejected) { return(s.Monitor.UnfilteredOpenGroup(s)); } return(s.InitializeAndSend(null, ActivityMonitor.Tags.Empty, text)); }
/// <summary> /// Sends a text with an exception and associated tags. /// </summary> /// <param name="this">This <see cref="IActivityMonitorGroupSender"/> object.</param> /// <param name="ex">The exception. Must not be null.</param> /// <param name="tags">Tags for the log.</param> /// <param name="text">The text of the log.</param> static public IDisposableGroup Send(this IActivityMonitorGroupSender @this, Exception ex, CKTrait tags, string text) { ActivityMonitorGroupSender s = (ActivityMonitorGroupSender)@this; if (s.IsRejected) { return(s.Monitor.UnfilteredOpenGroup(s)); } return(s.InitializeAndSend(ex, tags, text)); }
/// <summary> /// Sends a log with an exception. /// </summary> /// <param name="this">This <see cref="IActivityMonitorGroupSender"/> object.</param> /// <param name="ex">The exception. Must not be null.</param> static public IDisposableGroup Send(this IActivityMonitorGroupSender @this, Exception ex) { ActivityMonitorGroupSender s = (ActivityMonitorGroupSender)@this; if (s.IsRejected) { return(s.Monitor.UnfilteredOpenGroup(s)); } return(s.InitializeAndSend(ex, ActivityMonitor.Tags.Empty, null)); }
/// <summary> /// Sends a formatted text. /// </summary> /// <param name="this">This <see cref="IActivityMonitorGroupSender"/> object.</param> /// <param name="format">The text format of the log with 1 placeholders.</param> /// <param name="arg0">Parameter to format (placeholder {0}).</param> static public IDisposableGroup Send(this IActivityMonitorGroupSender @this, string format, object arg0) { ActivityMonitorGroupSender s = (ActivityMonitorGroupSender)@this; if (s.IsRejected) { return(s.Monitor.UnfilteredOpenGroup(s)); } if (arg0 is Exception) { throw new ArgumentException(Impl.ActivityMonitorResources.PossibleWrongOverloadUseWithException, "arg0"); } return(s.InitializeAndSend(null, ActivityMonitor.Tags.Empty, format == null ? null : String.Format(format, arg0))); }
/// <summary> /// Sends a log with a text obtained through a parameterized delegate with an exception and associated tags. /// The delegate will be called only if the log is not filtered. /// </summary> /// <typeparam name="T1">Type of the first parameter that <paramref name="text"/> accepts.</typeparam> /// <typeparam name="T2">Type of the second parameter that <paramref name="text"/> accepts.</typeparam> /// <typeparam name="T3">Type of the third parameter that <paramref name="text"/> accepts.</typeparam> /// <param name="this">This <see cref="IActivityMonitorGroupSender"/> object.</param> /// <param name="ex">The exception. Must not be null.</param> /// <param name="tags">Tags for the log.</param> /// <param name="text">Function that returns a string. Must not be null.</param> /// <param name="param1">First parameter for the <paramref name="text"/> delegate.</param> /// <param name="param2">Second parameter for the <paramref name="text"/> delegate.</param> /// <param name="param3">Third parameter for the <paramref name="text"/> delegate.</param> public static IDisposableGroup Send <T1, T2, T3>(this IActivityMonitorGroupSender @this, Exception ex, CKTrait tags, Func <T1, T2, T3, string> text, T1 param1, T2 param2, T3 param3) { ActivityMonitorGroupSender s = (ActivityMonitorGroupSender)@this; return(s.IsRejected ? s.Monitor.UnfilteredOpenGroup(s) : s.InitializeAndSend(ex, tags, text == null ? null : text(param1, param2, param3))); }
/// <summary> /// Sends a text obtained through a delegate with an exception and associated tags. /// The delegate will be called only if the log is not filtered. /// </summary> /// <param name="this">This <see cref="IActivityMonitorGroupSender"/> object.</param> /// <param name="ex">The exception. Must not be null.</param> /// <param name="tags">Tags for the log.</param> /// <param name="text">Function that returns a string. Must not be null.</param> public static IDisposableGroup Send(this IActivityMonitorGroupSender @this, Exception ex, CKTrait tags, Func <string> text) { ActivityMonitorGroupSender s = (ActivityMonitorGroupSender)@this; return(s.IsRejected ? s.Monitor.UnfilteredOpenGroup(s) : s.InitializeAndSend(ex, tags, text == null ? null : text())); }
/// <summary> /// Sends a text obtained through a parameterized delegate with an exception. /// The delegate will be called only if the log is not filtered. /// </summary> /// <typeparam name="T">Type of the parameter that <paramref name="text"/> accepts.</typeparam> /// <param name="this">This <see cref="IActivityMonitorGroupSender"/> object.</param> /// <param name="ex">The exception. Must not be null.</param> /// <param name="text">Function that returns a string. Must not be null.</param> /// <param name="param">Parameter of the <paramref name="text"/> delegate.</param> public static IDisposableGroup Send <T>(this IActivityMonitorGroupSender @this, Exception ex, Func <T, string> text, T param) { ActivityMonitorGroupSender s = (ActivityMonitorGroupSender)@this; return(s.IsRejected ? s.Monitor.UnfilteredOpenGroup(s) : s.InitializeAndSend(ex, ActivityMonitor.Tags.Empty, text == null ? null : text(param))); }
/// <summary> /// Sends a text obtained through a parameterized delegate with associated tags. /// The delegate will be called only if the log is not filtered. /// </summary> /// <typeparam name="T">Type of the parameter that <paramref name="text"/> accepts.</typeparam> /// <param name="this">This <see cref="IActivityMonitorGroupSender"/> object.</param> /// <param name="tags">Tags for the log.</param> /// <param name="text">Function that returns a string. Must not be null.</param> /// <param name="param">Parameter of the <paramref name="text"/> delegate.</param> public static IDisposableGroup Send <T>(this IActivityMonitorGroupSender @this, CKTrait tags, Func <T, string> text, T param) { ActivityMonitorGroupSender s = (ActivityMonitorGroupSender)@this; return(s.IsRejected ? s.Monitor.UnfilteredOpenGroup(s) : s.InitializeAndSend(null, tags, text == null ? null : text(param))); }
/// <summary> /// Sends a text obtained through a parameterized delegate. /// The delegate will be called only if the log is not filtered. /// </summary> /// <typeparam name="T1">Type of the first parameter that <paramref name="text"/> accepts.</typeparam> /// <typeparam name="T2">Type of the second parameter that <paramref name="text"/> accepts.</typeparam> /// <param name="this">This <see cref="IActivityMonitorGroupSender"/> object.</param> /// <param name="text">Function that returns a string. Must not be null.</param> /// <param name="param1">First parameter for the <paramref name="text"/> delegate.</param> /// <param name="param2">Second parameter for the <paramref name="text"/> delegate.</param> public static IDisposableGroup Send <T1, T2>(this IActivityMonitorGroupSender @this, Func <T1, T2, string> text, T1 param1, T2 param2) { ActivityMonitorGroupSender s = (ActivityMonitorGroupSender)@this; return(s.IsRejected ? s.Monitor.UnfilteredOpenGroup(s) : s.InitializeAndSend(null, ActivityMonitor.Tags.Empty, text == null ? null : text(param1, param2))); }