Catel.IoC.TypeFactory.CountSpecialObjects C# (CSharp) Method

CountSpecialObjects() private static method

Gets the special objects count for the specific constructor.
private static CountSpecialObjects ( ConstructorInfo constructor ) : int
constructor System.Reflection.ConstructorInfo The constructor.
return int
        private static int CountSpecialObjects(ConstructorInfo constructor)
        {
            var parameters = constructor.GetParameters();

            int counter = 0;

            foreach (var parameter in parameters)
            {
                var parameterType = parameter.ParameterType;
                if (parameterType == typeof(Object))
                {
                    counter++;
                    continue;
                }

#if !XAMARIN
                if (parameterType == typeof(DynamicObject))
                {
                    counter++;
                    continue;
                }
#endif
            }

            return counter;
        }
    }