/// <summary> /// Append additional operation /// </summary> /// <param name="futureLogger"></param> /// <param name="additionalOptHandle"></param> /// <returns></returns> public static IFutureLogger AppendAdditionalOperation(this IFutureLogger futureLogger, Func <EventBuilder, EventBuilder> additionalOptHandle) { var opt = new LogSinkAdditionalOperation(typeof(ExceptionlessPayloadClient), additionalOptHandle); futureLogger.AppendAdditionalOperation(opt); return(futureLogger); }
/// <summary> /// Additional operation for exceptionless /// </summary> /// <param name="context"></param> /// <param name="additionalOptHandle"></param> /// <returns></returns> /// <exception cref="ArgumentNullException"></exception> public static LogEventContext ForExceptionless(this LogEventContext context, Func <EventBuilder, EventBuilder> additionalOptHandle) { if (context == null) { throw new ArgumentNullException(nameof(context)); } if (additionalOptHandle == null) { return(context); } var opt = new LogSinkAdditionalOperation(typeof(ExceptionlessPayloadClient), additionalOptHandle); context.ImportOpt(opt); return(context); }