fixed net-1.0 build error

This commit is contained in:
eeichinger
2009-03-04 21:56:11 +00:00
parent c1f76e12ee
commit 9145ea30b9
3 changed files with 26 additions and 13 deletions

View File

@@ -234,13 +234,15 @@ namespace Spring.Web.Support
get { return (Mode == ResultMode.Transfer); }
}
/// <summary>
/// Indicates, if <see cref="HttpServerUtility.Redirect(string,bool)"/> should be called with endResponse='true' | 'false'. Only relevant for ResultMode.RedirectXXXX modes.
/// </summary>
#if !NET_1_0
/// <summary>
/// Indicates, if <see cref="HttpServerUtility.Redirect(string,bool)"/> should be called with endResponse='true' | 'false'. Only relevant for ResultMode.RedirectXXXX modes.
/// </summary>
public bool EndResponse
{
get { return (Mode == ResultMode.Redirect); }
}
#endif
#endregion
@@ -257,7 +259,9 @@ namespace Spring.Web.Support
switch (Mode)
{
case ResultMode.Redirect:
#if !NET_1_0
case ResultMode.RedirectNoAbort:
#endif
DoRedirect( context );
break;
case ResultMode.Transfer:
@@ -321,7 +325,11 @@ namespace Spring.Web.Support
/// <seealso cref="System.Web.HttpResponse.Redirect(string)"/>
protected virtual void DoRedirect( object context )
{
#if !NET_1_0
HttpContext.Current.Response.Redirect( GetRedirectUri( context ), EndResponse );
#else
HttpContext.Current.Response.Redirect( GetRedirectUri( context ) );
#endif
}
/// <summary>

View File

@@ -70,17 +70,19 @@ namespace Spring.Web.Support
/// <seealso cref="System.Web.HttpServerUtility.Transfer(string,bool)"/>
TransferNoPreserve = 2,
/// <summary>
/// A redirect.
/// </summary>
/// <remarks>
/// <p>
/// Issues a redirect (to the user-agent - typically a browser) using
/// the <see cref="System.Web.HttpResponse.Redirect(string, bool)"/> method.
/// </p>
/// </remarks>
/// <seealso cref="System.Web.HttpResponse.Redirect(string, bool)"/>
#if !NET_1_0
/// <summary>
/// A redirect.
/// </summary>
/// <remarks>
/// <p>
/// Issues a redirect (to the user-agent - typically a browser) using
/// the <see cref="System.Web.HttpResponse.Redirect(string, bool)"/> method.
/// </p>
/// </remarks>
/// <seealso cref="System.Web.HttpResponse.Redirect(string, bool)"/>
RedirectNoAbort = 3
#endif
}
}

View File

@@ -148,6 +148,7 @@ namespace Spring.Web.Support
"from the result string passed into the ctor.");
}
#if !NET_1_0
[Test]
public void WithRedirectNoAbortResultMode()
{
@@ -162,6 +163,8 @@ namespace Spring.Web.Support
"from the result string passed into the ctor.");
}
#endif
[Test]
[ExpectedException(typeof(ArgumentOutOfRangeException))]
public void WithRubbishResultMode()