/// <summary>
        /// OnMethodBegin callback
        /// </summary>
        /// <typeparam name="TTarget">Type of the target</typeparam>
        /// <param name="instance">Instance value, aka `this` of the instrumented method.</param>
        /// <returns>Calltarget state value</returns>
        public static CallTargetState OnMethodBegin <TTarget>(TTarget instance)
        {
            if (!Tracer.Instance.Settings.IsIntegrationEnabled(IntegrationName))
            {
                return(CallTargetState.GetDefault());
            }

            TestRunnerStruct runnerInstance = instance.As <TestRunnerStruct>();

            // Skip test support
            if (runnerInstance.SkipReason != null)
            {
                XUnitIntegration.CreateScope(ref runnerInstance, instance.GetType());
            }

            return(CallTargetState.GetDefault());
        }
        /// <summary>
        /// OnMethodBegin callback
        /// </summary>
        /// <typeparam name="TTarget">Type of the target</typeparam>
        /// <param name="instance">Instance value, aka `this` of the instrumented method.</param>
        /// <returns>Calltarget state value</returns>
        public static CallTargetState OnMethodBegin <TTarget>(TTarget instance)
        {
            if (!Tracer.Instance.Settings.IsIntegrationEnabled(IntegrationName))
            {
                return(CallTargetState.GetDefault());
            }

            TestInvokerStruct invokerInstance = instance.As <TestInvokerStruct>();
            TestRunnerStruct  runnerInstance  = new TestRunnerStruct
            {
                Aggregator          = invokerInstance.Aggregator,
                TestCase            = invokerInstance.TestCase,
                TestClass           = invokerInstance.TestClass,
                TestMethod          = invokerInstance.TestMethod,
                TestMethodArguments = invokerInstance.TestMethodArguments
            };

            return(new CallTargetState(XUnitIntegration.CreateScope(ref runnerInstance, instance.GetType())));
        }