/// <summary> /// Override of the base class that Reads a specific child element inside the RSTR. /// </summary> /// <param name="reader">Reader pointing at an element to read inside the RSTR.</param> /// <param name="rstr">The RequestSecurityTokenResponse element that is being populated from the reader.</param> /// <param name="context">Current Serialization context.</param> /// <exception cref="ArgumentNullException">Either reader or rstr or context parameter is null.</exception> /// <exception cref="WSTrustSerializationException">Unable to deserialize the current parameter.</exception> public override void ReadXmlElement(XmlReader reader, RequestSecurityTokenResponse rstr, WSTrustSerializationContext context) { if (reader == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("reader"); } if (rstr == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("rstr"); } if (context == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("context"); } if (reader.IsStartElement(WSTrust13Constants.ElementNames.KeyWrapAlgorithm, WSTrust13Constants.NamespaceURI)) { rstr.KeyWrapAlgorithm = reader.ReadElementContentAsString(); return; } WSTrustSerializationHelper.ReadRSTRXml(reader, rstr, context, WSTrustConstantsAdapter.Trust13); }
/// <summary> /// Override of the base class that Reads a specific child element inside the RSTR. /// </summary> /// <param name="reader">Reader pointing at an element to read inside the RSTR.</param> /// <param name="rstr">The RequestSecurityTokenResponse element that is being populated from the reader.</param> /// <param name="context">Current Serialization context.</param> /// <exception cref="ArgumentNullException">Either reader or rstr or context parameter is null.</exception> /// <exception cref="WSTrustSerializationException">Unable to deserialize the current parameter.</exception> public override void ReadXmlElement(XmlReader reader, RequestSecurityTokenResponse rstr, WSTrustSerializationContext context) { if (reader == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("reader"); } if (rstr == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("rstr"); } if (context == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("context"); } WSTrustSerializationHelper.ReadRSTRXml(reader, rstr, context, WSTrustConstantsAdapter.TrustFeb2005); }