(DISTFILES): Comment out a few missing files.
[mono-project.git] / mcs / class / Microsoft.Web.Services / Microsoft.Web.Services.Timestamp / TimestampOutputFilter.cs
blobeaa4f1a9254ca58d5f24df5179f2aa58c3e7f856
1 //
2 // TimestampOutputFilter.cs: Timestamp SOAP Output Filter
3 //
4 // Author:
5 // Sebastien Pouliot (spouliot@motus.com)
6 //
7 // (C) 2002, 2003 Motus Technologies Inc. (http://www.motus.com)
8 //
9 // Licensed under MIT X11 (see LICENSE) with this specific addition:
11 // “This source code may incorporate intellectual property owned by Microsoft
12 // Corporation. Our provision of this source code does not include any licenses
13 // or any other rights to you under any Microsoft intellectual property. If you
14 // would like a license from Microsoft (e.g. rebrand, redistribute), you need
15 // to contact Microsoft directly.”
18 using System;
19 using System.Xml;
21 namespace Microsoft.Web.Services.Timestamp {
23 public class TimestampOutputFilter : SoapOutputFilter {
25 public TimestampOutputFilter () {}
27 public override void ProcessMessage (SoapEnvelope envelope)
29 if (envelope == null)
30 throw new ArgumentNullException ("envelope");
32 // internal method
33 envelope.Context.Timestamp.SetTimestamp (DateTime.UtcNow);
34 XmlElement xel = envelope.Context.Timestamp.GetXml (envelope);
35 if (envelope.Header == null) {
36 XmlElement header = envelope.CreateHeader ();
37 envelope.Envelope.PrependChild (xel);
39 envelope.Header.AppendChild (xel);