public static Constructor Create(ConstructorInfo constructorInfo, TsType parent) { var constructor = new Constructor(parent); foreach (var parameterInfo in constructorInfo.GetParameters()) { constructor.Parameters.Add(MethodParameterFactory.Create(parameterInfo, constructor)); } return constructor; }
public bool Matches(Constructor constructor) { if (constructor.Parameters.Count != Parameters.Count) return false; for (int index = 0; index < Parameters.Count; index++) { var myParam = Parameters[index]; var theirParam = constructor.Parameters[index]; if (!myParam.Type.Matches(theirParam.Type)) return false; } return true; }