private void ProcessCodeFunctions(CodeClass codeClass, BindingSourceType bindingSourceType, IdeBindingSourceProcessor bindingSourceProcessor)
 {
     foreach (var codeFunction in codeClass.Children.OfType<CodeFunction>())
     {
         var bindingSourceMethod = CreateBindingSourceMethod(codeFunction, bindingSourceType, bindingSourceProcessor);
         if (bindingSourceMethod != null)
             bindingSourceProcessor.ProcessMethod(bindingSourceMethod);
     }
 }
        private void ProcessCodeClass(CodeClass codeClass, IdeBindingSourceProcessor bindingSourceProcessor)
        {
            var filteredAttributes = codeClass.Attributes.Cast<CodeAttribute2>().Where(attr => bindingSourceProcessor.CanProcessTypeAttribute(attr.FullName)).ToArray();
            if (!bindingSourceProcessor.PreFilterType(filteredAttributes.Select(attr => attr.FullName)))
                return;

            var bindingSourceType = bindingReflectionFactory.CreateBindingSourceType(codeClass, filteredAttributes);

            if (!bindingSourceProcessor.ProcessType(bindingSourceType))
                return;

            foreach (var codeFunction in codeClass.Children.OfType<CodeFunction>())
            {
                bindingSourceProcessor.ProcessMethod(CreateBindingSourceMethod(codeFunction, bindingSourceType, bindingSourceProcessor));
            }

            bindingSourceProcessor.ProcessTypeDone();
        }