System.Xml.Xsl.XsltOld.XsltCompileContext.FuncKey.AddToList C# (CSharp) Method

AddToList() static private method

static private AddToList ( ArrayList resultCollection, ArrayList newList ) : ArrayList
resultCollection System.Collections.ArrayList
newList System.Collections.ArrayList
return System.Collections.ArrayList
            static ArrayList AddToList(ArrayList resultCollection, ArrayList newList) {
                if (newList == null) {
                    return resultCollection;
                }
                if (resultCollection == null) {
                    return newList;
                }
                Debug.Assert(resultCollection.Count != 0);
                Debug.Assert(newList.Count != 0);
                if (! (resultCollection[0] is ArrayList)) {
                    // Transform resultCollection from ArrayList(XPathNavigator) to ArrayList(ArrayList(XPathNavigator))
                    Debug.Assert(resultCollection[0] is XPathNavigator);
                    ArrayList firstList = resultCollection;
                    resultCollection = new ArrayList();
                    resultCollection.Add(firstList);
                }
                resultCollection.Add(newList);
                return resultCollection;
            }
        }
XsltCompileContext.FuncKey