IronRuby.Builtins.RubyClass.AddMethodsOverwriteExisting C# (CSharp) Method

AddMethodsOverwriteExisting() private method

private AddMethodsOverwriteExisting ( Dictionary &methods, IEnumerable newOverloads, IronRuby.Runtime.Calls.RubyOverloadGroupInfo overloadOwners, bool specialNameOnly ) : bool
methods Dictionary
newOverloads IEnumerable
overloadOwners IronRuby.Runtime.Calls.RubyOverloadGroupInfo
specialNameOnly bool
return bool
        private bool AddMethodsOverwriteExisting(ref Dictionary<Key<string, ValueArray<Type>>, ClrOverloadInfo> methods,
            IEnumerable<OverloadInfo/*!*/>/*!*/ newOverloads, RubyOverloadGroupInfo/*!*/[] overloadOwners, bool specialNameOnly) {

            bool anyChange = false;
            int i = 0;
            foreach (var method in newOverloads) {
                if (IsVisible(method.Attributes, method.DeclaringType, specialNameOnly)) {
                    var paramTypes = Key.Create(method.Name, new ValueArray<Type>(ReflectionUtils.GetParameterTypes(method.Parameters)));
                    if (methods == null) {
                        methods = new Dictionary<Key<string, ValueArray<Type>>, ClrOverloadInfo>();
                    }

                    methods[paramTypes] = new ClrOverloadInfo {
                        Overload = method,
                        Owner = (overloadOwners != null) ? overloadOwners[i] : null
                    };

                    anyChange = true;
                }
                i++;
            }
            return anyChange;
        }