mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-17 01:41:17 -10:00
* list: added WebEncoding.cs * System.Web/HttpApplication.cs: reenabled a few lines of code (ThreadPool already fixed). * System.Web/HttpRequest.cs: * System.Web/HttpResponse.cs: * System.Web/HttpUtility.cs: * System.Web/HttpValueCollection.cs: * System.Web/HttpWriter.cs: * System.Web.UI/LosFormatter.cs: Use WebEncoding.Encoding. * System.Web.Compilation/PageCompiler.cs: tracing. * System.Web.Compilation/TemplateFactory.cs: cache compiled types and tracing. * System.Web.Compilation/WebServiceCompiler.cs: new parameter in GetTypeFromsource, * System.Web.Configuration/HttpHandlersSectionHandler.cs: more null checks. * System.Web.UI/Control.cs: * System.Web.UI/Page.cs: * System.Web.Util/WebTrace.cs: fixed namespace. * System.Web.Util/WebEncoding.cs: new class that holds the default encoding for System.Web. svn path=/trunk/mcs/; revision=8599
46 lines
1.1 KiB
C#
46 lines
1.1 KiB
C#
//
|
|
// System.Web.Compilation.WebServiceCompiler
|
|
//
|
|
// Authors:
|
|
// Gonzalo Paniagua Javier ([email protected])
|
|
//
|
|
// (C) 2002 Ximian, Inc (http://www.ximian.com)
|
|
//
|
|
using System;
|
|
using System.IO;
|
|
using System.Web.UI;
|
|
|
|
namespace System.Web.Compilation
|
|
{
|
|
class WebServiceCompiler
|
|
{
|
|
private WebServiceCompiler ()
|
|
{
|
|
}
|
|
|
|
public static Type CompileIntoType (SimpleWebHandlerParser wService)
|
|
{
|
|
string sourceFile = GenerateSourceFile (wService);
|
|
Type type = TemplateFactory.GetTypeFromSource (wService.PhysicalPath, sourceFile);
|
|
if (type.FullName != wService.ClassName)
|
|
throw new ApplicationException (String.Format (
|
|
"Class={0}, but the class compiled is {1}",
|
|
wService.ClassName,
|
|
type.FullName));
|
|
|
|
return type;
|
|
}
|
|
|
|
private static string GenerateSourceFile (SimpleWebHandlerParser wService)
|
|
{
|
|
//FIXME: should get Tmp dir for this application
|
|
string csName = Path.GetTempFileName ();
|
|
StreamWriter output = new StreamWriter (File.OpenWrite (csName));
|
|
output.Write (wService.Program);
|
|
output.Close ();
|
|
return csName;
|
|
}
|
|
}
|
|
}
|
|
|