Amazon.Util.Internal.TypeFactory.TypeInfoWrapper.GetConstructor C# (CSharp) Метод

GetConstructor() публичный Метод

public GetConstructor ( ITypeInfo paramTypes ) : ConstructorInfo
paramTypes ITypeInfo
Результат System.Reflection.ConstructorInfo
            public override ConstructorInfo GetConstructor(ITypeInfo[] paramTypes)
            {
                foreach (var constructorInfo in this._typeInfo.DeclaredConstructors)
                {
                    var paramInfos = constructorInfo.GetParameters();
                    if (paramInfos.Length != paramTypes.Length)
                        continue;

                    bool match = true;
                    for (int i = 0; i < paramInfos.Length; i++)
                    {
                        if (paramInfos[i].ParameterType.FullName != paramTypes[i].FullName)
                        {
                            match = false;
                            break;
                        }
                    }

                    if (match)
                        return constructorInfo;
                }

                return null;
            }
        }