static ITestParameter GetParameter(MethodInfo method)
        {
            var fullName = ReflectionHelper.GetMethodSignatureFullName(method);

            return(TestSerializer.GetStringParameter(fullName));
        }
        protected override IEnumerable <TestHost> CreateParameterHosts()
        {
            bool seenCtx   = false;
            bool seenToken = false;

            var fixedParameters = Method.GetCustomAttributes <FixedTestParameterAttribute> ();

            foreach (var fixedParameter in fixedParameters)
            {
                yield return(ReflectionHelper.CreateFixedParameterHost(Fixture.Type, fixedParameter));
            }

            var parameters = Method.GetParameters();

            for (int i = 0; i < parameters.Length; i++)
            {
                var paramType = parameters [i].ParameterType;
                var paramName = parameters [i].Name;

                var fork = parameters [i].GetCustomAttribute <ForkAttribute> ();
                if (fork != null)
                {
                    if (!paramType.Equals(typeof(IFork)))
                    {
                        throw new InternalErrorException();
                    }
                    yield return(new ForkedTestHost(paramName, fork));

                    continue;
                }

                if (paramType.Equals(typeof(CancellationToken)))
                {
                    if (seenToken)
                    {
                        throw new InternalErrorException();
                    }
                    seenToken = true;
                    continue;
                }
                else if (paramType.Equals(typeof(TestContext)))
                {
                    if (seenCtx)
                    {
                        throw new InternalErrorException();
                    }
                    seenCtx = true;
                    continue;
                }
                else if (paramType.Equals(typeof(IFork)))
                {
                    throw new InternalErrorException();
                }

                yield return(ReflectionHelper.ResolveParameter(this, parameters [i]));
            }

            if (Attribute.Repeat != 0)
            {
                yield return(ReflectionHelper.CreateRepeatHost(Attribute.Repeat));
            }
        }