private ReturnBuilder MakeReturnBuilder(BitArray specialParameters) { ReturnBuilder returnBuilder = (_returnArgs != null) ? new ByRefReturnBuilder(_returnArgs) : new ReturnBuilder(_overload.ReturnType); if (_argNames.Count > 0 && _resolver.AllowMemberInitialization(_overload)) { List <string> unusedNames = GetUnusedArgNames(specialParameters); List <MemberInfo> bindableMembers = GetBindableMembers(returnBuilder.ReturnType, unusedNames); if (unusedNames.Count == bindableMembers.Count) { List <int> nameIndices = new List <int>(); foreach (MemberInfo mi in bindableMembers) { var type = (mi.MemberType == MemberTypes.Property) ? ((PropertyInfo)mi).PropertyType : ((FieldInfo)mi).FieldType; _parameters.Add(new ParameterWrapper(null, type, mi.Name, ParameterBindingFlags.None)); nameIndices.Add(_argNames.IndexOf(mi.Name)); } return(new KeywordConstructorReturnBuilder( returnBuilder, _argNames.Count, nameIndices.ToArray(), bindableMembers.ToArray(), _resolver.Binder.PrivateBinding )); } } return(returnBuilder); }