Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the class <see cref="ExceptionManagerImpl"/> with a set of policies.
        /// </summary>
        /// <param name="exceptionPolicies">The complete set of exception policies.</param>
        /// <param name="instrumentationProvider">Instrumentation provider used to report errors.</param>
        public ExceptionManagerImpl(IDictionary <string, ExceptionPolicyImpl> exceptionPolicies, IDefaultExceptionHandlingInstrumentationProvider instrumentationProvider)
        {
            if (exceptionPolicies == null)
            {
                throw new ArgumentNullException("exceptionPolicies");
            }
            if (instrumentationProvider == null)
            {
                throw new ArgumentNullException("instrumentationProvider");
            }

            this.exceptionPolicies       = exceptionPolicies;
            this.instrumentationProvider = instrumentationProvider;
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ExceptionManagerImpl"/> class with a set
 /// of exception policies.
 /// </summary>
 /// <param name="exceptionPolicies">The complete set of exception policies.</param>
 /// <param name="instrumentationProvider">Instrumentation provider used to report errors.</param>
 public ExceptionManagerImpl(IEnumerable <ExceptionPolicyImpl> exceptionPolicies,
                             IDefaultExceptionHandlingInstrumentationProvider instrumentationProvider)
     : this(exceptionPolicies.ToDictionary(e => e.PolicyName), instrumentationProvider)
 {
 }