protected override IEnumerable <XObject> GetXContent() { if (ForceAuthn.HasValue) { yield return(new XAttribute(Saml2Constants.Message.ForceAuthn, ForceAuthn)); } if (IsPassive.HasValue) { yield return(new XAttribute(Saml2Constants.Message.IsPassive, IsPassive)); } if (AssertionConsumerServiceUrl != null) { yield return(new XAttribute(Saml2Constants.Message.AssertionConsumerServiceURL, AssertionConsumerServiceUrl)); } if (NameIdPolicy != null) { yield return(NameIdPolicy.ToXElement()); } if (RequestedAuthnContext != null) { yield return(RequestedAuthnContext.ToXElement()); } }