fixed net-1.0 build error
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user