public override void WriteContent(XmlDictionaryWriter writer, SecurityKeyIdentifierClause clause) { SecurityContextKeyIdentifierClause sctClause = clause as SecurityContextKeyIdentifierClause; writer.WriteStartElement(XD.SecurityJan2004Dictionary.Prefix.Value, XD.SecurityJan2004Dictionary.Reference, XD.SecurityJan2004Dictionary.Namespace); XmlHelper.WriteAttributeStringAsUniqueId(writer, null, XD.SecurityJan2004Dictionary.URI, null, sctClause.ContextId); WriteGeneration(writer, sctClause); writer.WriteAttributeString(XD.SecurityJan2004Dictionary.ValueType, null, parent.SerializerDictionary.SecurityContextTokenReferenceValueType.Value); writer.WriteEndElement(); }
protected override void WriteGeneration(XmlDictionaryWriter writer, SecurityContextKeyIdentifierClause clause) { // serialize the generation if (clause.Generation != null) { XmlHelper.WriteAttributeStringAsUniqueId( writer, this.Parent.SecurityTokenSerializer.DictionaryManager.SecureConversationDec2005Dictionary.Prefix.Value, this.Parent.SecurityTokenSerializer.DictionaryManager.SecureConversationDec2005Dictionary.Instance, this.Parent.SecurityTokenSerializer.DictionaryManager.SecureConversationDec2005Dictionary.Namespace, clause.Generation); } }
public override bool Matches(SecurityKeyIdentifierClause keyIdentifierClause) { SecurityContextKeyIdentifierClause that = keyIdentifierClause as SecurityContextKeyIdentifierClause; return(ReferenceEquals(this, that) || (that != null && that.Matches(this.ContextId, this.generation))); }
protected abstract void WriteGeneration(XmlDictionaryWriter writer, SecurityContextKeyIdentifierClause clause);