System.Xml.Xsl.XmlQueryTypeFactory.Choice C# (CSharp) Method

Choice() public static method

Construct the union of several XmlQueryTypes
public static Choice ( ) : XmlQueryType
return XmlQueryType
        public static XmlQueryType Choice(params XmlQueryType[] types) {
            if (types.Length == 0)
                return None;
            else if (types.Length == 1)
                return types[0];

            // Union each type with next type
            List<XmlQueryType> list = new List<XmlQueryType>(types[0]);
            XmlQueryCardinality card = types[0].Cardinality;

            for (int i = 1; i < types.Length; i++) {
                PrimeChoice(list, types[i]);
                card |= types[i].Cardinality;
            }

            return SequenceType.Create(ChoiceType.Create(list), card);
        }

Same methods

XmlQueryTypeFactory::Choice ( XmlQueryType left, XmlQueryType right ) : XmlQueryType