Example #1
0
        /// <summary>
        /// </summary>
        /// <param name="method">
        /// </param>
        /// <param name="stackCall">
        /// </param>
        private void DiscoverRequiredTypesAndMethodsInMethod(IMethod method, Queue<IMethod> stackCall)
        {
            stackCall.Enqueue(method);

            // add all generic types in parameters
            foreach (var parameter in method.GetParameters())
            {
                this.AddGenericSpecializedType(parameter.ParameterType);
            }

            // add return type
            this.AddGenericSpecializedType(method.ReturnType);

            // disover it again in specialized method
            method.DiscoverRequiredTypesAndMethodsInMethodBody(this.usedGenericSpecialiazedTypes, this.usedGenericSpecialiazedMethods, null, stackCall);

            stackCall.Dequeue();
        }