internal override void WriteTimestampCanonicalForm(Stream stream, SecurityTimestamp timestamp, byte[] workBuffer) { TimestampCanonicalFormWriter.Instance.WriteCanonicalForm( stream, timestamp.Id, timestamp.GetCreationTimeChars(), timestamp.GetExpiryTimeChars(), workBuffer); }
internal override void WriteTimestamp(XmlDictionaryWriter writer, SecurityTimestamp timestamp) { writer.WriteStartElement(XD.UtilityDictionary.Prefix.Value, XD.UtilityDictionary.Timestamp, XD.UtilityDictionary.Namespace); writer.WriteAttributeString(XD.UtilityDictionary.IdAttribute, XD.UtilityDictionary.Namespace, timestamp.Id); writer.WriteStartElement(XD.UtilityDictionary.CreatedElement, XD.UtilityDictionary.Namespace); char[] creationTime = timestamp.GetCreationTimeChars(); writer.WriteChars(creationTime, 0, creationTime.Length); writer.WriteEndElement(); // wsu:Created writer.WriteStartElement(XD.UtilityDictionary.ExpiresElement, XD.UtilityDictionary.Namespace); char[] expiryTime = timestamp.GetExpiryTimeChars(); writer.WriteChars(expiryTime, 0, expiryTime.Length); writer.WriteEndElement(); // wsu:Expires writer.WriteEndElement(); }