User: ken.egozi
Date: 2008/09/08 01:06 PM

Modified:
 /trunk/MonoRail/Castle.MonoRail.Framework/
  IRequest.cs
 /trunk/MonoRail/Castle.MonoRail.Framework/Adapters/
  RequestAdapter.cs
 /trunk/MonoRail/Castle.MonoRail.Framework/Test/
  IMockRequest.cs, StubRequest.cs

Log:
 Added access to the UserAgent on IRequest

File Changes:

Directory: /trunk/MonoRail/Castle.MonoRail.Framework/Adapters/
==============================================================

File [modified]: RequestAdapter.cs
Delta lines: +6 -0
===================================================================

--- trunk/MonoRail/Castle.MonoRail.Framework/IRequest.cs        2008-09-08 
19:59:18 UTC (rev 5308)
+++ trunk/MonoRail/Castle.MonoRail.Framework/IRequest.cs        2008-09-08 
20:06:53 UTC (rev 5309)
@@ -161,6 +161,12 @@
                String ReadCookie(String name);
 
                /// <summary>
+               /// Gets the user agent string of the client browser.
+               /// </summary>
+               /// <value>The agent string of the client browser.</value>
+               String UserAgent { get; }
+
+               /// <summary>
                /// Gets the user languages.
                /// </summary>

Directory: /trunk/MonoRail/Castle.MonoRail.Framework/
=====================================================

File [modified]: IRequest.cs
Delta lines: +6 -0
===================================================================

--- trunk/MonoRail/Castle.MonoRail.Framework/Test/IMockRequest.cs       
2008-09-08 19:59:18 UTC (rev 5308)
+++ trunk/MonoRail/Castle.MonoRail.Framework/Test/IMockRequest.cs       
2008-09-08 20:06:53 UTC (rev 5309)
@@ -86,6 +86,12 @@
                new string FilePath { set; }
 
                /// <summary>
+               /// Sets the user agent string.
+               /// </summary>
+               /// <value>The user agent string.</value>
+               new string UserAgent { set; }
+
+               /// <summary>
                /// Sets the user languages.
                /// </summary>

Directory: /trunk/MonoRail/Castle.MonoRail.Framework/Test/
==========================================================

File [modified]: IMockRequest.cs
Delta lines: +17 -6
===================================================================

--- trunk/MonoRail/Castle.MonoRail.Framework/Test/StubRequest.cs        
2008-09-08 19:59:18 UTC (rev 5308)
+++ trunk/MonoRail/Castle.MonoRail.Framework/Test/StubRequest.cs        
2008-09-08 20:06:53 UTC (rev 5309)
@@ -27,19 +27,20 @@
        /// </summary>
        public class StubRequest : IMockRequest
        {
-               private NameValueCollection form = new NameValueCollection();
-               private NameValueCollection headers = new NameValueCollection();
-               private NameValueCollection queryString = new 
NameValueCollection();
-               private NameValueCollection @params = new NameValueCollection();
+               private readonly NameValueCollection form = new 
NameValueCollection();
+               private readonly NameValueCollection headers = new 
NameValueCollection();
+               private readonly NameValueCollection queryString = new 
NameValueCollection();
+               private readonly NameValueCollection @params = new 
NameValueCollection();
+               private readonly IDictionary<string, HttpCookie> cookies;
+               private readonly IDictionary files = new Hashtable();
                private string urlReferrer;
-               private IDictionary<string, HttpCookie> cookies;
-               private IDictionary files = new Hashtable();
                private bool isLocal = true;
                private string httpMethod = "GET";
                private string[] userLanguages = new string[] {"en-ES", 
"pt-BR"};
                private string rawUrl = null;
                private string filePath = null;
                private Uri uri = null;
+               private string userAgent = "";
                private string userHostAddress = "127.0.0.1";
                private string pathInfo;
                private string contentType;
@@ -150,6 +151,16 @@
                }
 
                /// <summary>
+               /// Gets the user agent string of the client browser.
+               /// </summary>
+               /// <value>The agent string of the client browser.</value>
+               public string UserAgent
+               {
+                       get { return userAgent; }
+                       set { userAgent = value; }
+               }
+
+               /// <summary>
                /// Validates the input.
                /// </summary>

File [modified]: StubRequest.cs
Delta lines: +0 -0
===================================================================


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/castle-project-commits?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to