private static void ProcessFunctions(TypeInfo parentTypeInfo, TreeNode parentTreeNode) { using (TypeAttr attr = parentTypeInfo.GetTypeAttr()) { // // Walk through all the function/propput/propget/propref properties // for (int i = ConvCommon2.GetIndexOfFirstMethod(parentTypeInfo, attr); i < attr.cFuncs; ++i) { FunctionInfoMatchTarget functionInfo = new FunctionInfoMatchTarget(parentTypeInfo, (short) i); TreeNode funcTreeNode = new TreeNode(); if (functionInfo.FuncDesc.IsPropertyGet) { funcTreeNode.Text = functionInfo.Name + " (getter)" + ": " + functionInfo.Type; } else if (functionInfo.FuncDesc.IsPropertyPut || functionInfo.FuncDesc.IsPropertyPutRef) { funcTreeNode.Text = functionInfo.Name + " (setter)" + ": " + functionInfo.Type; } else { funcTreeNode.Text = functionInfo.Name + ": " + functionInfo.Type; } funcTreeNode.Tag = functionInfo; SetTlbTreeNodeImage(funcTreeNode); parentTreeNode.Nodes.Add(funcTreeNode); ProcessFuncParams(parentTypeInfo, functionInfo.Index, funcTreeNode); } } }
private static bool IsPreserveSigOverride(InterfaceInfo interfaceInfo, int index) { // Check rule engine if (interfaceInfo.ConverterInfo.Settings.m_ruleSet != null) { ICategory functionCategory = FunctionCategory.GetInstance(); FunctionInfoMatchTarget target = new FunctionInfoMatchTarget(interfaceInfo.RefTypeInfo, index); AbstractActionManager actionManager = RuleEngine.GetActionManager(); List<Rule> preserveSigRules = interfaceInfo.ConverterInfo.Settings.m_ruleSet.GetRule( functionCategory, PreserveSigActionDef.GetInstance(), target); if (preserveSigRules.Count != 0) return true; } return false; }