Ejemplo n.º 1
0
        /// <summary>
        ///     Get or create our collection
        /// </summary>
        /// <param name="context">context to find the collection in</param>
        /// <returns>collection</returns>
        public static ContextCollectionDTO GetCoderrCollection(this IErrorReporterContext2 context)
        {
            var collection = context.ContextCollections.FirstOrDefault(x => x.Name == "CoderrData");

            if (collection != null)
            {
                return(collection);
            }

            collection = new ContextCollectionDTO("CoderrData");
            context.ContextCollections.Add(collection);
            return(collection);
        }
 private void InvokeFilter(IErrorReporterContext2 context)
 {
     Err.Configuration.ExceptionPreProcessor?.Invoke(context);
 }
Ejemplo n.º 3
0
 public static void AddTag(this IErrorReporterContext2 context, string tagName)
 {
     AddTag(context.ContextCollections, tagName);
 }
Ejemplo n.º 4
0
 /// <summary>
 ///     Creates a new instance of <see cref="PartitionContext" />.
 /// </summary>
 /// <param name="contextCollection">context to add partitions to.</param>
 /// <param name="reporterContext">
 ///     Context used when collecting all other context data (before partition collection is
 ///     invoked)
 /// </param>
 public PartitionContext(ErrPartitionContextCollection contextCollection, IErrorReporterContext2 reporterContext)
 {
     _contextCollection = contextCollection ?? throw new ArgumentNullException(nameof(contextCollection));
     ReporterContext    = reporterContext;
 }