private bool CanPromoteToRoot(XmlElement innerElement, WSTrustDec2005.DriverDec2005 trust13Driver, bool clientSideClaimTypeRequirementsSpecified)
 {
     SecurityKeyType type;
     int num;
     string str;
     Collection<XmlElement> requiredClaims = null;
     if (trust13Driver.TryParseRequiredClaimsElement(innerElement, out requiredClaims))
     {
         return !clientSideClaimTypeRequirementsSpecified;
     }
     return ((((!trust13Driver.TryParseKeyTypeElement(innerElement, out type) && !trust13Driver.TryParseKeySizeElement(innerElement, out num)) && (!trust13Driver.TryParseTokenTypeElement(innerElement, out str) && !trust13Driver.IsSignWithElement(innerElement, out str))) && !trust13Driver.IsEncryptWithElement(innerElement, out str)) && !trust13Driver.IsKeyWrapAlgorithmElement(innerElement, out str));
 }
        private bool CanPromoteToRoot(XmlElement innerElement, WSTrustDec2005.DriverDec2005 trust13Driver, bool clientSideClaimTypeRequirementsSpecified)
        {
            SecurityKeyType dummyOutParamForKeyType;
            int dummyOutParamForKeySize;
            string dummyStringOutParam;
            Collection<XmlElement> dummyOutParamForRequiredClaims = null;

            // check if SecondaryParameters has claim requirements specified
            if (trust13Driver.TryParseRequiredClaimsElement(innerElement, out dummyOutParamForRequiredClaims))
            {
                // if client has not specified any claim requirements, promote claim requirements 
                // in SecondaryParameters to root level (and subsequently fix up the trust namespace)
                return !clientSideClaimTypeRequirementsSpecified;
            }

            // KeySize, KeyType and TokenType were converted to top-level property values when the WSDL was
            // imported, so drop it here. We check for EncryptWith and SignWith as these are Client specific algorithm values and we
            // don't have to promote the service specified values. KeyWrapAlgorithm was never sent in the RST
            // in V1 and hence we are dropping it here as well.
            return (!trust13Driver.TryParseKeyTypeElement(innerElement, out dummyOutParamForKeyType) &&
                    !trust13Driver.TryParseKeySizeElement(innerElement, out dummyOutParamForKeySize) &&
                    !trust13Driver.TryParseTokenTypeElement(innerElement, out dummyStringOutParam) &&
                    !trust13Driver.IsSignWithElement(innerElement, out dummyStringOutParam) &&
                    !trust13Driver.IsEncryptWithElement(innerElement, out dummyStringOutParam) &&
                    !trust13Driver.IsKeyWrapAlgorithmElement(innerElement, out dummyStringOutParam));
        }