Imported Upstream version 4.0.0~alpha1

Former-commit-id: 806294f5ded97629b74c85c09952f2a74fe182d9
This commit is contained in:
Jo Shields
2015-04-07 09:35:12 +01:00
parent 283343f570
commit 3c1f479b9d
22469 changed files with 2931443 additions and 869343 deletions

View File

@@ -1,6 +1,4 @@
#if NET_2_0
using System;
using System;
using System.Configuration;
namespace MonoTests.SystemWeb.Framework
@@ -57,5 +55,3 @@ namespace MonoTests.SystemWeb.Framework
}
}
}
#endif

View File

@@ -1,4 +1,3 @@
#if NET_2_0
using System;
using System.Web.Security;
@@ -232,4 +231,3 @@ namespace MonoTests.SystemWeb.Framework
}
}
#endif

View File

@@ -4,7 +4,6 @@ namespace MainsoftWebApp
{
public partial class Global : System.Web.HttpApplication
{
#if NET_2_0
protected void Application_Error (object sender, EventArgs e)
{
// Code that runs when an unhandled error occurs
@@ -17,6 +16,5 @@ namespace MainsoftWebApp
// Ensure the headers are sent
MonoTests.SystemWeb.Framework.WebTest.CurrentTest.SendHeaders ();
}
#endif
}
}

View File

@@ -21,7 +21,6 @@ namespace MonoTests.SystemWeb.Framework
[Serializable]
public struct PageDelegates
{
#if NET_2_0
/// <summary>
/// <see cref="Page.LoadComplete"/> event callback.
/// </summary>
@@ -46,7 +45,6 @@ namespace MonoTests.SystemWeb.Framework
/// <see cref="Page.SaveStateComplete"/> event callback.
/// </summary>
public PageDelegate SaveStateComplete;
#endif
/// <summary>
/// <see cref="TemplateControl.CommitTransaction"/> event callback.
/// </summary>

View File

@@ -39,7 +39,6 @@ namespace MonoTests.SystemWeb.Framework
set { _delegates = value; }
}
#if NET_2_0
/// <summary>
/// Create a new <see cref="PageInvoker"/> which Delegates contain the
/// given callback for PreInit event.
@@ -53,7 +52,6 @@ namespace MonoTests.SystemWeb.Framework
PageInvoker pi = new PageInvoker (pd);
return pi;
}
#endif
/// <summary>
/// Create a new <see cref="PageInvoker"/> which Delegates contain the
@@ -101,7 +99,6 @@ namespace MonoTests.SystemWeb.Framework
_page = (Page) parameters[0];
#if NET_2_0
OnPreInit (null, null);
_page.LoadComplete += OnLoadComplete;
@@ -109,7 +106,6 @@ namespace MonoTests.SystemWeb.Framework
_page.PreRenderComplete += OnPreRenderComplete;
_page.InitComplete += OnInitComplete;
_page.SaveStateComplete += OnSaveStateComplete;
#endif
_page.CommitTransaction += new EventHandler (OnCommitTransaction);
_page.AbortTransaction += new EventHandler (OnAbortTransaction);
_page.Error += new EventHandler (OnError);
@@ -123,7 +119,6 @@ namespace MonoTests.SystemWeb.Framework
#region Handlers
#if NET_2_0
/// <summary>
/// This must be made private as soon as Mono allows using private methods for delegates
/// </summary>
@@ -178,7 +173,6 @@ namespace MonoTests.SystemWeb.Framework
{
Invoke (Delegates.SaveStateComplete);
}
#endif
/// <summary>
/// This must be made private as soon as Mono allows using private methods for delegates
/// </summary>

View File

@@ -20,9 +20,7 @@ namespace MonoTests.SystemWeb.Framework
public string Body
{
get { return _body; }
#if NET_2_0
internal
#endif
set { _body = value; }
}
@@ -32,9 +30,7 @@ namespace MonoTests.SystemWeb.Framework
public HttpStatusCode StatusCode
{
get { return _statusCode; }
#if NET_2_0
internal
#endif
set { _statusCode = value; }
}
@@ -44,9 +40,7 @@ namespace MonoTests.SystemWeb.Framework
public string StatusDescription
{
get { return _statusDescription; }
#if NET_2_0
internal
#endif
set { _statusDescription = value; }
}
}

View File

@@ -1,4 +1,3 @@
#if NET_2_0
using System;
using System.Collections.Specialized;
@@ -80,4 +79,3 @@ namespace MonoTests.SystemWeb.Framework
}
}
}
#endif

View File

@@ -2,7 +2,6 @@ using System;
using System.Collections.Specialized;
using System.Web;
#if NET_2_0
namespace Tests {
public class TestSiteMapProvider : StaticSiteMapProvider {
object rootNodeLock = new object();
@@ -34,4 +33,3 @@ namespace Tests {
}
}
}
#endif

View File

@@ -7,7 +7,6 @@ namespace MonoTests.SystemWeb.Framework
static partial void CopyResourcesLocal ()
{
Type myself = typeof (WebTest);
#if NET_2_0
CopyPrefixedResources (myself, "App_GlobalResources/", "App_GlobalResources");
CopyPrefixedResources (myself, "App_Code/", "App_Code");
#if DOTNET
@@ -18,9 +17,6 @@ namespace MonoTests.SystemWeb.Framework
#else
CopyResource (myself, "Web.mono.config", "Web.config");
#endif
#endif
#else
CopyResource (myself, "Web.mono.config.1.1", "Web.config");
#endif
}
}

View File

@@ -79,17 +79,11 @@ namespace MonoTests.SystemWeb.Framework
throw new InvalidOperationException ("Method '" + methodName + "' cannot be found in type '" + type + "'.");
if (mi.IsAbstract ||
#if NET_2_0
mi.IsGenericMethodDefinition ||
#endif
mi.ReturnType != typeof (void) || mi.GetParameters ().Length > 0)
throw new InvalidOperationException ("Method '" + methodName + "' must return void and take no parameters.");
#if NET_2_0
ret = Delegate.CreateDelegate (typeof (SetupHandler), null, mi, false) as SetupHandler;
#else
ret = Delegate.CreateDelegate (typeof (SetupHandler), mi) as SetupHandler;
#endif
if (ret == null)
throw new InvalidOperationException ("Failed to create a delegate to method '" + methodName + "'.");