2009-09-04 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Fri, 4 Sep 2009 10:43:30 +0000 (10:43 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Fri, 4 Sep 2009 10:43:30 +0000 (10:43 -0000)
* OutgoingWebResponseContext.cs : add missing methods.

svn path=/trunk/mcs/; revision=141317

mcs/class/System.ServiceModel.Web/System.ServiceModel.Web/ChangeLog
mcs/class/System.ServiceModel.Web/System.ServiceModel.Web/OutgoingWebResponseContext.cs

index 12eb0bf71fbb6abc4bbb5103c6ed0d196d263c29..fbb7ce26b37bbe51b092ea9b9a2f96fe088fbbf3 100644 (file)
@@ -1,3 +1,7 @@
+2009-09-04  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * OutgoingWebResponseContext.cs : add missing methods.
+
 2009-09-01  Atsushi Enomoto  <atsushi@ximian.com>
 
        * WebOperationContext.cs : Current is automatically created (even
index 032fcee68cb11e7e514a7ffcd75e3231fb1d0906..de3dc934c44eef9056d31fe3bb32c74cfadf1b2e 100644 (file)
@@ -113,5 +113,22 @@ namespace System.ServiceModel.Web
                        get { return suppress_body; }
                        set { suppress_body = value; }
                }
+
+               public void SetStatusAsCreated (Uri locationUri)
+               {
+                       StatusCode = HttpStatusCode.Created;
+                       Location = locationUri.AbsoluteUri;
+               }
+
+               public void SetStatusAsNotFound ()
+               {
+                       StatusCode = HttpStatusCode.NotFound;
+               }
+
+               public void SetStatusAsNotFound (string description)
+               {
+                       StatusCode = HttpStatusCode.NotFound;
+                       StatusDescription = description;
+               }
        }
 }