<commit_before>﻿using System;
using System.Reflection;

namespace Cauldron.Interception
{
    /// <summary>
    /// Represents a method interceptor
    /// </summary>
    /// <example>
    /// Sample implementation:
    /// <code>
    /// [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
    /// public class MyInterceptorAttribute : Attribute, IMethodInterceptor
    /// {
    ///     public void OnEnter(Type declaringType, object instance, MethodBase methodbase, object[] values)
    ///     {
    ///     }
    ///
    ///     public bool OnException(Exception e)
    ///     {
    ///         // Returning false will swallow the exception
    ///         return true;
    ///     }
    ///
    ///     public void OnExit()
    ///     {
    ///     }
    /// }
    /// </code>
    /// The interceptor is also capable of handling attributes with parameters.
    /// <para/>
    /// Your code:
    /// <code>
    /// public class SampleClass
    /// {
    ///     [MyInterceptor]
    ///     public void SampleMethod()
    ///     {<commit_msg>Sample implementation in XML comment updated<commit_after>﻿using System;
using System.Reflection;

namespace Cauldron.Interception
{
    /// <summary>
    /// Represents a method interceptor
    /// </summary>
    /// <example>
    /// Sample implementation:
    /// <code>
    /// [InterceptorOptions(AlwaysCreateNewInstance = true)]
    /// [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
    /// public class MyInterceptorAttribute : Attribute, IMethodInterceptor
    /// {
    ///     public void OnEnter(Type declaringType, object instance, MethodBase methodbase, object[] values)
    ///     {
    ///     }
    ///
    ///     public bool OnException(Exception e)
    ///     {
    ///         // Returning false will swallow the exception
    ///         return true;
    ///     }
    ///
    ///     public void OnExit()
    ///     {
    ///     }
    /// }
    /// </code>
    /// The interceptor is also capable of handling attributes with parameters.
    /// <para/>
    /// Your code:
    /// <code>
    /// public class SampleClass
    /// {
    ///     [MyInterceptor]
    ///     public void SampleMethod()
    ///     {
{'fraction_non_alphanumeric': 0.15159574468085107, 'fraction_numerical': 0.0, 'mean_word_length': 1.6032295271049597, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4377434', 'n_tokens_mistral': 606, 'n_tokens_neox': 600, 'n_words': 153}