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

@@ -73,13 +73,6 @@ namespace System.Web.Handlers
IHttpHandler currentHandler = context.CurrentHandler;
if (currentHandler == null)
return;
#if TARGET_J2EE
if (!(currentHandler is Page) && currentHandler is IServiceProvider) {
pageType = (Type) ((IServiceProvider) currentHandler).GetService (typeof (Type));
if (pageType == null)
return;
}
#endif
Type pageType = currentHandler.GetType ();
if (typeof (Page).IsAssignableFrom (pageType) && !String.IsNullOrEmpty (contentType) && contentType.StartsWith ("application/json", StringComparison.OrdinalIgnoreCase)) {
IHttpHandler h = RestHandler.GetHandler (context, pageType, request.FilePath);
@@ -94,10 +87,6 @@ namespace System.Web.Handlers
HttpContext context = app.Context;
if (context.Request.Headers ["X-MicrosoftAjax"] == "Delta=true") {
Page p = context.CurrentHandler as Page;
#if TARGET_J2EE
if (p == null && context.CurrentHandler is IServiceProvider)
p = (Page) ((IServiceProvider) context.CurrentHandler).GetService (typeof (Page));
#endif
ScriptManager sm = ScriptManager.GetCurrentInternal (p);
if (context.Response.StatusCode == 302) {
context.Response.StatusCode = 200;

View File

@@ -62,7 +62,6 @@ namespace System.Web.Handlers
}
#endregion
#if NET_3_5
void AppendResourceScriptContents (StringWriter sw, CompositeEntry entry)
{
if (entry.Assembly == null || entry.Attribute == null || String.IsNullOrEmpty (entry.NameOrPath))
@@ -179,7 +178,6 @@ namespace System.Web.Handlers
if (notifyScriptLoaded)
OutputScriptLoadedNotification (response.Output);
}
#endif
void OutputScriptLoadedNotification (TextWriter writer)
{
writer.WriteLine ();
@@ -190,13 +188,11 @@ namespace System.Web.Handlers
{
HttpRequest request = context.Request;
bool notifyScriptLoaded = request.QueryString ["n"] == "t";
#if NET_3_5
List <CompositeEntry> compositeEntries = CompositeScriptReference.GetCompositeScriptEntries (request.RawUrl);
if (compositeEntries != null) {
SendCompositeScript (context, request, notifyScriptLoaded, compositeEntries);
return;
}
#endif
EmbeddedResource res;
Assembly assembly;
SendEmbeddedResource (context, out res, out assembly);
@@ -247,7 +243,6 @@ namespace System.Web.Handlers
if (notifyScriptLoaded)
OutputScriptLoadedNotification (writer);
}
#if NET_3_5
static void CheckIfResourceIsCompositeScript (string resourceName, ref bool includeTimeStamp)
{
bool isCompositeScript = resourceName.StartsWith (CompositeScriptReference.COMPOSITE_SCRIPT_REFERENCE_PREFIX, StringComparison.Ordinal);
@@ -261,7 +256,6 @@ namespace System.Web.Handlers
{
return false;
}
#endif
// TODO: add value cache?
static string GetScriptStringLiteral (string value)
{