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

PrepareExtensionMethodsUpdate() private method

Invalidates - failure cache on RubyClass via incrementing extension version - groups - call sites via incrementing method version
private PrepareExtensionMethodsUpdate ( List extensions ) : void
extensions List
return void
        internal override void PrepareExtensionMethodsUpdate(List<ExtensionMethodInfo>/*!*/ extensions) {
            _extensionVersion++;

            // No groups cached, no overloads cached in call-sites.
            if (MethodInitializationNeeded) {
                return;
            }
            
            MethodsUpdated("ExtensionMethods");

            // Differences from preparing Ruby method for update:
            // - No override search. 
            //   - We need to invalidate groups regardless of whether the e.m. overrides a method or not (it needs to be added to all groups below).
            //   - We could optimize a bit if the definition overrides a method group thata hasn't been used in a call site.
            //     In that case we wouldn't need to invalidate any rules. This is rare and we would still need to invalidate groups. So we don't do that.
            // - No CLR singletons special casing - extension methods can't be added on singletons.
            foreach (var extension in extensions) {
                InvalidateGroupsInSubClasses(extension.Method.Name, Int32.MaxValue);
            }
        }