示例#1
0
        public bool ProcessType(Type type, ScriptAccess defaultAccess)
        {
            Debug.Assert(type.IsSpecific());
            if (!table.ContainsKey(type) && type.HasExtensionMethods())
            {
                const BindingFlags bindFlags = BindingFlags.Public | BindingFlags.Static;
                table[type] = type.GetMethods(bindFlags).Where(method => IsScriptableExtensionMethod(method, defaultAccess)).ToArray();
                summary     = new ExtensionMethodSummary(table);
                return(true);
            }

            return(false);
        }
示例#2
0
 public void RebuildSummary()
 {
     summary = new ExtensionMethodSummary(table);
 }
        public bool ProcessType(Type type, ScriptAccess defaultAccess)
        {
            Debug.Assert(type.IsSpecific());
            if (!table.ContainsKey(type) && type.HasExtensionMethods())
            {
                const BindingFlags bindFlags = BindingFlags.Public | BindingFlags.Static;
                table[type] = type.GetMethods(bindFlags).Where(method => IsScriptableExtensionMethod(method, defaultAccess)).ToArray();
                summary = new ExtensionMethodSummary(table);
                return true;
            }

            return false;
        }