CreateIntellisensePart() public static méthode

public static CreateIntellisensePart ( string name, string desc ) : IDev2DataLanguageIntellisensePart
name string
desc string
Résultat IDev2DataLanguageIntellisensePart
        private void AddValidNodes(IList <IDev2DataLanguageIntellisensePart> result, XmlNodeList nl)
        {
            for (int i = 0; i < nl.Count; i++)
            {
                var tmpNode = nl[i];

                if (IsValidChildNode(tmpNode))
                {
                    var recordsetName = tmpNode.Name;
                    IList <IDev2DataLanguageIntellisensePart> children = new List <IDev2DataLanguageIntellisensePart>();
                    var childNl = tmpNode.ChildNodes;
                    for (int q = 0; q < childNl.Count; q++)
                    {
                        children.Add(DataListFactory.CreateIntellisensePart(childNl[q].Name, ExtractDescription(childNl[q])));
                    }
                    if (FilterTO.FilterType == enIntellisensePartType.None)
                    {
                        result.Add(DataListFactory.CreateIntellisensePart(recordsetName, ExtractDescription(tmpNode), children));
                    }
                    if (FilterTO.FilterType == enIntellisensePartType.RecordsetsOnly)
                    {
                        result.Add(DataListFactory.CreateIntellisensePart(string.Concat(recordsetName, "()"), ExtractDescription(tmpNode)));
                    }
                    if (FilterTO.FilterType == enIntellisensePartType.RecordsetFields)
                    {
                        result.Add(DataListFactory.CreateIntellisensePart(recordsetName, ExtractDescription(tmpNode), children));
                    }
                }
                else
                {
                    if (FilterTO.FilterType == enIntellisensePartType.None || FilterTO.FilterType == enIntellisensePartType.ScalarsOnly)
                    {
                        result.Add(DataListFactory.CreateIntellisensePart(tmpNode.Name, ExtractDescription(tmpNode)));
                    }
                }
            }
        }
        /// <summary>
        /// Generates this instance.
        /// </summary>
        /// <returns></returns>
        public IList <IDev2DataLanguageIntellisensePart> Generate()
        {
            IList <IDev2DataLanguageIntellisensePart> result = new List <IDev2DataLanguageIntellisensePart>();

            XmlDocument xDoc = new XmlDocument();
            // ReSharper disable TooWideLocalVariableScope
            string rawRecsetName;

            // ReSharper restore TooWideLocalVariableScope
            if (FilterTO == null)
            {
                FilterTO = new IntellisenseFilterOpsTO();
            }
            if (FilterTO.FilterCondition != null)
            {
                rawRecsetName = FilterTO.FilterCondition;
                if (rawRecsetName.Contains("[["))
                {
                    rawRecsetName = rawRecsetName.Replace("[[", "");
                }
                if (rawRecsetName.Contains("]]"))
                {
                    rawRecsetName = rawRecsetName.Replace("]]", "");
                }
                if (rawRecsetName.Contains("()"))
                {
                    // ReSharper disable RedundantAssignment
                    rawRecsetName = rawRecsetName.Replace("()", "");
                    // ReSharper restore RedundantAssignment
                }
            }


            if (!string.IsNullOrEmpty(DataList))
            {
                XmlNodeList tmpRootNl = null;

                try
                {
                    xDoc.LoadXml(DataList);
                    tmpRootNl = xDoc.ChildNodes;
                }
                catch (Exception ex)
                {
                    Dev2Logger.Log.Error(ex);
                }

                if (tmpRootNl != null)
                {
                    XmlNodeList nl = tmpRootNl[0].ChildNodes;
                    for (int i = 0; i < nl.Count; i++)
                    {
                        XmlNode tmpNode = nl[i];

                        if (IsValidChildNode(tmpNode))
                        {
                            // it is a record set, make it as such
                            string recordsetName = tmpNode.Name;
                            IList <IDev2DataLanguageIntellisensePart> children = new List <IDev2DataLanguageIntellisensePart>();
                            // now extract child node defs
                            XmlNodeList childNl = tmpNode.ChildNodes;
                            for (int q = 0; q < childNl.Count; q++)
                            {
                                children.Add(DataListFactory.CreateIntellisensePart(childNl[q].Name, ExtractDescription(childNl[q])));
                            }
                            if (FilterTO.FilterType == enIntellisensePartType.All)
                            {
                                result.Add(DataListFactory.CreateIntellisensePart(recordsetName, ExtractDescription(tmpNode), children));
                            }
                            if (FilterTO.FilterType == enIntellisensePartType.RecordsetsOnly)
                            {
                                result.Add(DataListFactory.CreateIntellisensePart(string.Concat(recordsetName, "()"), ExtractDescription(tmpNode)));
                            }
                            if (FilterTO.FilterType == enIntellisensePartType.RecordsetFields)
                            {
                                result.Add(DataListFactory.CreateIntellisensePart(recordsetName, ExtractDescription(tmpNode), children));
                            }
                        }
                        else
                        {
                            // scalar value, make it as such
                            if (FilterTO.FilterType == enIntellisensePartType.All || FilterTO.FilterType == enIntellisensePartType.ScalarsOnly)
                            {
                                result.Add(DataListFactory.CreateIntellisensePart(tmpNode.Name, ExtractDescription(tmpNode)));
                            }
                        }
                    }
                }
            }


            return(result);
        }