Commit Graph
47 Commits
Author SHA1 Message Date
Marek Habersack d0135f374d 2008-12-10 Marek Habersack <[email protected]>
* MasterPageParser.cs: do not compile anything while
	parsing. MasterType virtual path is not compiled, but stored for
	later. It is compiled when the MasterType property is requested
	from within MasterPageCompiler.

	* PageParser.cs: do not compile anything while
	parsing. MasterPageFile, MasterType and PreviousPageType virtual
	paths aren't compiled but checked for existence and stored for
	later. Actual compilation happens when the MasterType and
	PreviousPageType are requested from within PageCompiler.

	* BaseParser.cs: added a new helper method, ThrowParseFileNotFound.

2008-12-10  Marek Habersack  <[email protected]>

	* ParseException.cs: made serializable.

	* PageCompiler.cs: CreateStronglyTypedProperty calls
	AddReferencedAssembly to add type's assembly to the unit's
	references after the typed property has been created.

	* BaseCompiler.cs: added a new helper method,
	AddReferencedAssembly to be used whenever an assembly location
	needs to be added to the compilation unit's list after the parsing
	is done (e.g. when processing PreviousPageType or MasterPageType
	properties in PageParser)

2008-12-10  Marek Habersack  <[email protected]>

	* Makefile (TEST_RESOURCE_FILES): added
	Test/mainsoft/NunitWebResources/MissingMasterFile.aspx

	* System.Web_test.dll.sources: added System.Web.UI/PageParserTest.cs

2008-12-10  Marek Habersack  <[email protected]>

	* NunitWebResources/MissingMasterFile.aspx: added

2008-12-10  Marek Habersack  <[email protected]>

	* PageParserTest.cs: added



svn path=/trunk/mcs/; revision=121181
2008-12-10 02:03:35 +00:00
Marek Habersack ef9c9e51ce Do not abuse the 'private' keyword
svn path=/trunk/mcs/; revision=116539
2008-10-20 17:37:54 +00:00
Marek Habersack 001579d033 2008-05-06 Marek Habersack <[email protected]>
* Calendar.cs: do not create dateInfo in the constructor - culture
	might be not set yet at this point. Fixes bug #323566
	Added a private property, DateInfo, which creates the dateInfo
	when requested.

2008-05-06  Marek Habersack  <[email protected]>

	* TemplateControlCompiler.cs: compatibility - added the
	__stringResource static field to the generated class and a call to
	SetStringResourcePointer to the FrameworkInitialize method.

	* PageCompiler.cs: __fileDependencies should also be defined in
	the 1.x profile.
	Page properties assigned in the page directive should be set
	inside BuildControlTree in the 2.0 profile.


svn path=/trunk/mcs/; revision=102573
2008-05-05 23:38:47 +00:00
Marek Habersack e71f514f40 2008-01-24 Marek Habersack <[email protected]>
* WebHandlerBuildProvider.cs: derive from the new
	SimpleBuildProvider class.

	* BuildManager.cs: full implementation of the batch compilation
	for the 2.0 profile. The implementation is most probably different
	to MS.NET's but the effects are the same (or nearly the same -
	there are some minor differences). There are missing bits and
	pieces, but minor ones - to be added later.

	* SimpleBuildProvider.cs: new build provider abstract class
	deriving from the GenericBuildProvider that implements common code
	for building web handlers and web services.

	* GenericBuildProvider.cs: new generic abstract class used to
	implement base builder code for all the build provider types and
	maximize code reuse.

	* PageBuildProvider.cs: derive from the new TemplateBuildProvider
	class and implement all the necessary abstract members. 
	Handle "fake" virtual paths, to properly support generating of the
	WSDL helper code.

	* BuildProvider.cs: SetVirtualPath now converts the passed path to
	absolute URL.
	Added internal virtual method GenerateCode, used by derived
	classes.
	SetCommonParameters no longer sets the referenced assemblies, this
	is done in BuildManager now.
	Added an internal virtual property CodeUnit which returns the
	build provider's compilation unit.

	* PageCompiler.cs: fix assignment of base types for asynchronous
	pages, to match MS.NET.
	For asynchronous pages, add the necessary methods generation.

	* BaseCompiler.cs: default namespace is now set using a constant.
	Renamed the Init method into ConstructType, to better reflect its
	purpose and made the method internal - it is used by the build
	providers.
	Added several CreateProvider overloads for easier and more unified
	compilation provider creation.
	Added an internal MainClassType property to enable class type name
	retrieval from other parts of the class hierarchy.

	* ApplicationFileBuildProvider.cs: new build provider deriving
	from the TemplateBuildProvider class to compile the global.asax
	file.

	* AspGenerator.cs: properly handle parsers which have no input
	file path given, but use TextReader instead.
	Dependencies are virtual paths now, convert them to physical ones
	before creating cache dependency.

	* CachingCompiler.cs: parser dependencies are virtual paths now,
	convert them to physical ones before creating cache dependency.

	* AssemblyBuilder.cs: full implementation of the documented
	functionality as well as a lot of internal build code
	added. Produces assemblies using the same style what MS.NET for
	temporary and target file naming. Handles partial type squashing
	if the same partial type is used by several code compile units
	added to the same builder instance.

	* MasterPageBuildProvider.cs: use the new TemplateBuildProvider
	base class and add implementation of all the abstract methods
	required by it.

	* ThemeDirectoryBuildProvider.cs: new build provider to compile
	theme directories. Replaces the old ThemeDirectoryCompiler class.

	* UserControlBuildProvider.cs: use the new TemplateBuildProvider
	base class and add implementation of all the abstract methods
	required by it.

	* TemplateBuildProvider.cs: new internal abstract class which
	implements the common tasks for all the template control build
	providers.

	* WebServiceBuildProvider.cs: use the new SimpleBuildProvider base
	type to implement building.

2008-01-24  Marek Habersack  <[email protected]>

	* PageThemeFileParser.cs: the DefaultBaseType property removed.

	* ApplicationFileParser.cs: added constructor which takes a
	TextReader.
	Removed the DefaultBaseType property.
	Added the Reader property.

	* MasterPage.cs: use BuildManager to create page instance.

	* WebHandlerParser.cs: added a compatibility constructor.

	* TemplateControl.cs: GetTypeFromControlPath uses
	BuildManager.GetCompiledType for the 2.0+ profile.

	* WebServiceParser.cs: added a compatibility internal
	constructor.

	* SimpleWebHandlerParser.cs: properly treat context and
	physicalPath parameters to the constructor, especially for the
	2.0+ profile where they are obsolete.
	Dependencies are added using virtual paths.

	* PageThemeParser.cs: DefaultBaseType property removed.

	* Page.cs: Style sheets and themes are compiled using
	BuildManager.
	Previous page instance is compiled using BuildManager for the 2.0+
	profile.

	* MasterPageParser.cs: Use BuildManager to create instance and
	compile types.
	Dependencies are added using virtual paths.

	* SimpleHandlerFactory.cs: Use
	BuildManager.CreateInstanceFromVirtualPath for the 2.0+ profile.

	* UserControlParser.cs: if the parser is created using a
	TextReader, take the input file path from the virtual path.
	Added a new internal constructor which takes both a TextReader and
	an inputFile parameters.
	Set base type to the default in the constructors.
	Use virtual path when setting master page dependency.
	DefaultBaseTypename doesn't use a literal string in the 2.0+
	profile, it gets the base type from the application
	configuration.

	* TemplateControlParser.cs: Dependency on a control/page mentioned
	in the Reference directive is registered using the virtual path.
	TextReader property is an override now.

	* TemplateParser.cs: RegisterCustomControl adds a dependency on
	the virtual path, not the physical path. The custom control is
	compiled using BuildManager.GetCompiledType for the 2.0+ profile.
	RegisterNamespace does not add a dependency on the assembly.
	LoadType does not add a dependency on the assembly.
	Legacy Src attribute is handled properly now.
	Dependency on code-behind (Src and CodeFile directive attributes)
	is added using the code-behind file's virtual path.
	GetAssemblyFromSource adds a dependency using the virtual path.
	DefaultBaseType implemented here, using DefaultBaseTypeName which
	is implemented in the descendant classes.
	Added internal CodeBehindSource property, used by build
	providers.
	ClassName property works correctly if inputFile is missing
	(e.g. when the parser has been created using a TextReader)
	Added a virtual internal property TextReader to return the readed
	which has been used to create the parser instance.

	* PageHandlerFactory.cs: GetHandler uses
	BuildManager.CreateInstanceFromVirtualPath for the 2.0+ profile.

	* PageParser.cs: set the default base type in the constructors.
	If the input file is not passed to a constructor, take the input
	file path from the virtual path.
	GetCompiledPageInstance uses BuildManager.CreateInstanceFromVirtualPath
	for the 2.0+ profile.
	MasterPage dependency is set using the virtual path of the master
	page.
	MasterPage is compiled into a type using BuildManager.GetCompiledType.
	GetCompiledPageType uses BuildManager.GetCompiledType for the 2.0
	profile.
	DefaultBaseType override removed, it is implemented in the
	TemplateParser class.
	DefaultBaseTypename doesn't use a literal string in the 2.0+
	profile, it gets the base type from the application
	configuration.

2008-01-24  Marek Habersack  <[email protected]>

	* HttpApplicationFactory.cs: use BuildManager.GetCompiledType to
	build the application (global.asax) file.

svn path=/trunk/mcs/; revision=93848
2008-01-24 21:55:44 +00:00
Marek Habersack 5c99286487 2008-01-02 Marek Habersack <[email protected]>
* TemplateParser.cs: added a wrapper class for server-side script
	snippets, to keep track of locations.
	Store main directive location for later use in DirectiveLocation
	internal property.
2008-01-02  Marek Habersack  <[email protected]>

	* TemplateControlCompiler.cs: add line pragma wherever necessary.

	* PageCompiler.cs: reorder the statements to match MS.NET output.
	Output line pragma information for directive attributes.

	* BaseCompiler.cs: add a set of AddLinePragma methods for various
	CodeDOM elements. 
	Output line pragmas when adding server-side scripts to the CodeDOM
	tree.

	* AspGenerator.cs: use ServerSideScript to store script location
	in the original file.

	* UserControlCompiler.cs: output line pragmas for the init
	method.

svn path=/trunk/mcs/; revision=92125
2008-01-02 20:52:10 +00:00
Marek Habersack fef3144e26 2007-12-28 Marek Habersack <[email protected]>
* PageCompiler.cs: MS.NET compatibility: added the
	__fileDependencies object to the generated class.
	Refactored the output to match MS.NET more closely.
	IHttpHandler or IHttpAsyncHandler are now added to the generated
	class list of implemented interfaces.
	
	* BaseCompiler.cs: Main class field references are prefixed with
	'global::' now. 
	Refactored the output to match MS.NET more closely.

svn path=/trunk/mcs/; revision=91973
2007-12-28 00:51:57 +00:00
Marek Habersack ee22092f22 2007-11-22 Marek Habersack <[email protected]>
* OutputCacheParameters.cs: added the VaryByContentEncoding
	property.

	* Page.cs: added new InitCache overload.

	* TemplateParser.cs: added support for the VaryByContentEncodings
	attribute of the OutputCache directive.
2007-11-22  Marek Habersack  <[email protected]>

	* PageCompiler.cs: use
	pageParser.OutputCacheVaryByContentEncodings when initializing the
	output cache in the 2.0 profile.


svn path=/trunk/mcs/; revision=90185
2007-11-22 19:13:29 +00:00
Marek Habersack 96c7b2864d 2007-10-17 Marek Habersack <[email protected]>
* TemplateParser.cs: removed code that ignored the Async and
	AsyncTimeout attributes.

	* PageParser.cs: handle the Async and AsyncTimeout attributes
	here. Fixes bug #325450
2007-10-17  Marek Habersack  <[email protected]>

	* PageCompiler.cs: added code to set the AsyncMode and
	AsyncTimeout Page properties.

svn path=/trunk/mcs/; revision=87714
2007-10-17 21:17:41 +00:00
Marek Habersack 324a2ea444 2007-05-24 Marek Habersack <[email protected]>
* PageParser.cs: added support for the PreviousPageType
	directive.

2007-05-24  Marek Habersack  <[email protected]>

	* PageCompiler.cs: added support for the PreviousPageType directive.

	* Directive.cs: as above.


svn path=/trunk/mcs/; revision=77907
2007-05-24 12:55:14 +00:00
Marek Habersack 76fb5fbaf4 2007-04-26 Marek Habersack <[email protected]>
* PageCompiler.cs: the Master property must be in the partial
	class if present. Fixes bug #81442


svn path=/trunk/mcs/; revision=76301
2007-04-26 09:28:04 +00:00
Marek Habersack fba0cc826e 2007-03-13 Marek Habersack <[email protected]>
* TemplateParser.cs: name generated classes the same way MS.NET
	does - include the app-relative path to the control/page in the
	class name.
	* PageCompiler.cs: interfaces are to be implemented by the parent
	partial class, not the generated one.
	* TemplateControlCompiler.cs:
	Put field declarations for controls in the partial class.
	* BaseCompiler.cs:
	Change the generated code model for pages/controls to comply with
	the way MS.NET does (partial class contains only two properties
	plus declarations of all the controls, the actual control/page
	class inherits from the partial class). Fixes bug #81001.


svn path=/trunk/mcs/; revision=74167
2007-03-13 13:11:04 +00:00
Marek Habersack dee3ab3311 * PageCompiler.cs, BaseCompiler.cs: refactoring: moved the
CreateProfileProperty and InternalCreatePageProperty to
	BaseCompiler from PageCompiler.

	* GlobalAsaxCompiler.cs: generate the Profile property for the
	Global_asax class.

svn path=/trunk/mcs/; revision=74036
2007-03-09 23:44:19 +00:00
Marek Habersack fb27421ce2 Support a few more Page directive attributes
svn path=/trunk/mcs/; revision=73660
2007-03-03 15:26:40 +00:00
Miguel de Icaza 6b4c7232fd * SiteMapNode.cs (GetExplicitResourceString): implement.
* HttpContext.cs (GetGlobalResourceObject): remove unused variable.

        * StaticFileHandler.cs (ProcessRequest): remove unused variable.

        * HttpApplication.cs (ProcessError): Remove unused variable.

2007-01-20  Miguel de Icaza  <[email protected]>

        * ClientBuildManager.cs: Remove unused variable (this could be a
        real problem, we never use the appPhysicalTargetDir)

        * AssemblyBuilder.cs: Remove unused field.

        * AppResourceFilesCollection.cs: Remove unused field.

        * TemplateControlCompiler.cs (GetExpressionFromString): Remove
        unused variable.

        * AppResourcesCompiler.cs: Remove unused variable.

        * AppSettingsExpressionBuilder.cs (GetAppSetting): remove unused
        parameter.

        * PageCompiler.cs: Put InternalCreatePageProperty inside the
        NET_2_0 block to eliminate warnings.

2007-01-20  Miguel de Icaza  <[email protected]>

        * HandlerFactoryConfiguration.cs (LoadType): remove unused
        variable.
        (ctor): do not assign parent, we do not use it, keep the code for
        reference.

2007-01-20  Miguel de Icaza  <[email protected]>

        * ApplicationManager.cs: Remove unused variable.
        (ShutdownAll) remove unused variables.

        * ApplicationHost.cs: Protect create_dir lock

2007-01-20  Miguel de Icaza  <[email protected]>

        * SqlRoleProvider.cs: comment out unused code.

        * SqlMembershipProvider.cs: Removed unused variables.
        Remove unused variable.

        * AnonymousIdentificationModule.cs (ClearAnonymousIdentifier):
        remove unused variable.   This might be a real bug.

2007-01-20  Miguel de Icaza  <[email protected]>

        * SessionStateModule.cs: Removed unused variables.

2007-01-20  Miguel de Icaza  <[email protected]>

        * SessionDictionary.cs: Removed unused variable (dirty).

2007-01-20  Miguel de Icaza  <[email protected]>

        * XhtmlTextWriter.cs: comment out unused code.

        * ThemeProvider.cs: comment out unused code.

        * DataSourceView.cs: Comment unused variable.

        * ClientScriptManager.cs: Put the expandoAttributes inside the 2.0
        code

        * Control.cs: Put _templateControl inside the NET_2_0 ifdef

2007-01-20  Miguel de Icaza  <[email protected]>

        * HtmlHead.cs: comment out unused code, in particular metadata is
        commented out because nothing could have triggered its creation.

        * HtmlButton.cs: Move declaration of `csm' inside the 1.1 case.

2007-01-20  Miguel de Icaza  <[email protected]>

        * DataControlFieldCollection.cs (RemoveAt): remove unused
        variable.

        * RoleGroupCollection.cs (OnValidate): Flag as protected, as it
        should not show up.

        * RadioButton.cs (RaisePostDataChangedEvent): This method was not
        used in 1.0, so put the whole method in 2.0

2007-01-20  Miguel de Icaza  <[email protected]>

        * WebPart.cs: Remove

        * PersonalizableAttribute.cs: Remove extra API that was wrong as well.

2006-11-28  Miguel de Icaza  <[email protected]>

        * WebPart.cs:

2007-01-20  Miguel de Icaza  <[email protected]>

        * FileUtils.cs (CreateTemporaryFile): Remove unused variable.



svn path=/trunk/mcs/; revision=71399
2007-01-20 22:42:04 +00:00
Igor Zelmanovich 90f9be5ab5 2007-01-04 Igor Zelmanovich <[email protected]>
* Page.cs: fixed: InitializeCulture should be called 
	before creating controls.

svn path=/trunk/mcs/; revision=70460
2007-01-04 10:27:20 +00:00
Marek Habersack c56a42792c Implement support for ProfileCommon class generation
svn path=/trunk/mcs/; revision=69829
2006-12-20 18:41:52 +00:00
Gonzalo Paniagua Javier aeae1b7019 2006-09-18 Gonzalo Paniagua Javier <[email protected]>
* System.Web.UI/PageParser.cs:
	* System.Web.Compilation/PageCompiler.cs: support the
	EnableEventValidation attribute.


svn path=/trunk/mcs/; revision=65610
2006-09-18 21:42:21 +00:00
Chris Toshok a41dc6da6b 2006-03-07 Chris Toshok <[email protected]>
* AspGenerator.cs: refactor the parsing code so that we can
	initiate parsing from outside this class.

	* PageCompiler.cs (PrependStatementsToFrameworkInitialize): new
	method, add our StyleSheetTheme assignment here.
	(AppendStatementsToFrameworkInitialize): rename AddStatements* to
	this.

	* TemplateControlCompiler.cs (EnsureID): make protected.
	(CreateAssignStatementsFromAttributes): same
	(AddChildCall): same.
	(CreateControlTree): same.
	(CreateFrameworkInitializeMethod): change
	"AddStatementsToFrameworkInitialize" to
	"AppendStatementsToFrameworkInitialize", and add call to
	"PrependStatementsToFrameworkInitialize" before the generation of
	"base.FrameworkInitialize()."

	* PageThemeCompiler.cs (CreateControlSkinMethod): remove spew.


svn path=/trunk/mcs/; revision=57674
2006-03-07 22:27:51 +00:00
Chris Toshok 9cd26e2c03 In System.Web.UI:
2006-03-02  Chris Toshok  <[email protected]>

	* Control.cs (ApplyStyleSheetTheme): remove the exception, and add
	a MonoTODO.

	* Page.cs (Theme): implement setter/getter.
	(StyleSheetTheme): same.
	
	* PageParser.cs (ProcessMainAttributes): parse the Theme and
	StyleSheetTheme attributes.

In System.Web.UI.WebControls:
2006-03-02  Chris Toshok  <[email protected]>

	* WebControl.cs (SkinID): implement setter/getter, and have them
	just chain up to base.SkinID.

In System.Web.Compilation:
2006-03-02  Chris Toshok  <[email protected]>

	* TemplateControlCompiler.cs (InitMethod): emit an assignment for
	SkinID just after the creation of our object, and right after that
	call "_ctrl.ApplyStyleSheetSkin (page)".
	(CreateAssignStatementsFromAttributes): split out the majority of
	this code to CreateAssignStatementFromAttribute, and change this
	method to simply a loop over the attribute keys.  In the 2.0 case,
	skip the SkinID property, since that's handled explicitly in
	InitMethod.

	* PageCompiler.cs (AddStatementsToInitMethod): emit assignments
	for Theme and StyleSheetTheme.


svn path=/trunk/mcs/; revision=57516
2006-03-02 19:30:08 +00:00
Gonzalo Paniagua Javier f269a83e07 2006-02-14 Gonzalo Paniagua Javier <[email protected]>
* System.Web.UI/WebHandlerParser.cs:
	* System.Web.UI/WebServiceParser.cs:
	* System.Web.UI/UserControlParser.cs:
	* System.Web.UI/PageParser.cs: added new ctor that uses a TextReader
	as input.

	* System.Web.UI/TemplateControlParser.cs: new Reader property.
	* System.Web.UI/SimpleWebHandlerParser.cs: new Reader property and
	ctor.

	* System.Web.dll.sources: added new files.

	* System.Web.Compilation/GlobalAsaxCompiler.cs:
	* System.Web.Compilation/PageCompiler.cs:
	* System.Web.Compilation/TemplateControlCompiler.cs: CreateMethods is
	now internal.

	* System.Web.Compilation/WebServiceBuildProvider.cs:
	* System.Web.Compilation/PageBuildProvider.cs:
	* System.Web.Compilation/UserControlBuildProvider.cs:
	* System.Web.Compilation/WebHandlerBuildProvider.cs: new build
	providers.

	* System.Web.Compilation/BuildProvider.cs: add assemblies.

	* System.Web.Compilation/BaseCompiler.cs: expose the provider and the
	compile unit through properties.

svn path=/trunk/mcs/; revision=56878
2006-02-14 22:02:15 +00:00
Chris Toshok 800a78cd46 2006-02-07 Chris Toshok <[email protected]>
* TemplateControlCompiler.cs (AddParsedSubObjectStmt): append the
	calls to AddParsedSubObject to a special statement collection --
	builder.flushOutputStatements -- not to builder.method.Statements.
	(InitMethod): initially, set flushOutputStatements to
	method.Statements.  If we're dealing with a ContentPlaceHolder,
	set flushOutputStatements to be the else block of a conditional we
	create.  This causes the compiled control to fall back to the
	ContentPlaceHolder's child controls in case there's no
	corresponding Content template.

	* PageCompiler.cs (CreatePropertyAssign): factor out the
	string,string implementation and add one that also takes a
	CodeExpression; make the string,string implementation call the
	three arg one with thisRef.
	(AddStatementsToInitMethod): make use of the 3-arg form of
	CreatePropertyAssign to reduce code.  Also, add support for
	setting the page's Title from the parser's Title.


svn path=/trunk/mcs/; revision=56635
2006-02-07 20:10:07 +00:00
Chris Toshok e210711eea 2006-02-07 Chris Toshok <[email protected]>
* UserControlCompiler.cs (AddStatementsToInitMethod): emit code to
	assign __ctrl.MasterPageFile to our master page, if we have one.

	* PageCompiler.cs (CreateContructor): remove the MasterPageFile
	assignment from here.
	(AddStatementsToInitMethod): and move it here.
	
	* TemplateControlCompiler.cs (InitMethod): in the case where
	builder is a RootBuilder (we're building the __BuildControlTree
	method), call a virtual method so that subclasses can add their
	own statements to the method (used by both Page and MasterPage);
	Also, in the RootBuilder case, the argument should be the
	parser.ClassName type (the class we're building); lastly, expand
	the ContentPlaceHolder logic to include all the
	ContentTemplates/InstantiateIn magic.
	(AddStatementsToInitMethod): empty virtual method.
	(AddContentTemplateInvocation): ContentControlBuilder ->
	ContentControlBuilderInternal.
	(CreateControlTree): same.
	(CallBaseFrameworkInitialize): new function, create call to
	base.FrameworkInitialize.
	(CreateFrameworkInitializeMethod): call CallBaseFrameworkIniitialize.


svn path=/trunk/mcs/; revision=56619
2006-02-07 16:48:02 +00:00
Lluis Sanchez 2fee37b32b 2005-06-13 Lluis Sanchez Gual <[email protected]>
* Directive.cs: Register the MasterType directive.
	* PageCompiler.cs: If a MasterType is specified, add a type specific
	Master property. All this fixes bug #75192.


svn path=/trunk/mcs/; revision=45885
2005-06-13 16:55:35 +00:00
Lluis Sanchez e1e3b57371 2005-01-21 Lluis Sanchez Gual <[email protected]>
* Directive.cs: Added MASTER directive.
	* AspGenerator.cs: Use UserControlCompiler for compiling master pages.
	* PageCompiler.cs: Set the master file name when generating the page.
	* TemplateControlCompiler.cs: When generating the method for a
	content holder, register the content holder in the base MasterPage.
	Added method for registering a Content control for a MasterPage.
	Generate code for Content controls.


svn path=/trunk/mcs/; revision=39320
2005-01-21 18:03:58 +00:00
Duncan Mak d1c09fcc67 Add licensing info
svn path=/trunk/mcs/; revision=30345
2004-06-24 20:59:43 +00:00
Gonzalo Paniagua Javier 042a08443a 2004-06-05 Gonzalo Paniagua Javier <[email protected]>
* System.Web/TraceContext.cs: don't check if HttpRuntime.TraceManager
	is enabled when writing.

	* System.Web.Compilation/PageCompiler.cs: fixed Trace and add support
	for Buffer.

	* System.Web.UI/Page.cs: removed obsolete TODO. Only check if Trace is
	enabled, not HttpRutime.TraceManager.

	* System.Web.UI/PageParser.cs: for 'trace' we have 2 variables now.
	Added support for 'buffer' attribute.

	Fixes bug #58481.

svn path=/trunk/mcs/; revision=28873
2004-06-05 15:47:26 +00:00
Gonzalo Paniagua Javier e404b1b70d 2004-06-04 Gonzalo Paniagua Javier <[email protected]>
* System.Web/HttpRequest.cs: added ClientTarget internal property.

	* System.Web.Compilation/PageCompiler.cs: override CreateConstructor
	to add assignment for ClientTarget.

	* System.Web.Configuration/HttpCapabilitiesBase.cs: ClientTarget takes
	precedence over UserAgent.

	* System.Web.UI/Page.cs: implemented ClientTarget.
	* System.Web.UI/PageParser.cs: support for clientTarget and check for
	validity.

svn path=/trunk/mcs/; revision=28811
2004-06-04 04:01:07 +00:00
Gonzalo Paniagua Javier 0745d5cd5d 2004-01-12 Gonzalo Paniagua Javier <[email protected]>
* System.Web.dll.sources: added new files in S.W.Configuration.

	* System.Web/HttpContext.cs: add setter for ConfigTimeout.
	* System.Web/HttpException.cs: added Description property and HTML
	encode some unescaped values.

	* System.Web/HttpRequest.cs: support request validation.

	* System.Web/HttpRequestValidationException.cs: added message and
	description.

	* System.Web/HttpServerUtility.cs: implemented ScriptTimeout.

	* System.Web.Compilation/PageCompiler.cs: invoke Request.ValidateInput
	if required.

	* System.Web.Configuration/GlobalizationConfiguration.cs: undo old fix.

	* System.Web.Configuration/PagesConfiguration.cs:
	* System.Web.Configuration/PagesConfigurationHandler.cs: new files for
	processing system.web/pages section.

	* System.Web.UI/ApplicationFileParser.cs: adde DefaultBaseTypeName
	property.

	* System.Web.UI/PageParser.cs: support validateRequest.

	* System.Web.UI/TemplateControlParser.cs: get default values from
	system.web/pages section.

	* System.Web.UI/TemplateParser.cs: added separate method for changing
	base type (Inherits or system.web/pages).

	* System.Web.UI/UserControlParser.cs: support system.web/pages defined
	base type.

svn path=/trunk/mcs/; revision=21971
2004-01-12 07:03:42 +00:00
Gonzalo Paniagua Javier ed575c326a 2003-12-17 Gonzalo Paniagua Javier <[email protected]>
* System.Web.dll.sources: added CustomErrorsConfigHandler.cs

	* System.Web/HttpContext.cs: implemented IsCustomErrorEnabled and
	IsDebuggingEnabled. Added internal ErrorPage property.

	* System.Web/HttpRuntime.cs: on error, check if we have a custom error
	page enabled to handle it and redirect.

	* System.Web/HttpResponse.cs: added RedirectCustomError (), which
	actually does the redirection to the error page.

	* System.Web.Compilation/PageCompiler.cs: assign the ErrorPage property
	if provided.

	* System.Web.UI/Page.cs: assign the ErrorPage to the context if we get
	an exception when processing the page which only calls Unload.

	* System.Web.UI/PageParser.cs: handle ErrorPage.

	* System.Web.Configuration/CustomErrorsConfigHandler.cs: handle
	<system.web><customErrors />..

	Closes bug #51979.

svn path=/trunk/mcs/; revision=21286
2003-12-17 17:26:46 +00:00
Jackson Harper eafdce1d24 * PageCompiler.cs: Add Trace and TraceMode to framework initialize
method if they are set.

svn path=/trunk/mcs/; revision=21221
2003-12-16 03:51:37 +00:00
Gonzalo Paniagua Javier f744323f8f 2003-11-30 Gonzalo Paniagua Javier <[email protected]>
* System.Web.Compilation/PageCompiler.cs: assign LCID, Culture and/or
	UICulture in FrameworInitialize() if provided in @Page.

	* System.Web.UI/Page.cs: fixed UICulture, LCID and Culture. Set the
	thread [UI]Culture before processing the request.

	* System.Web.UI/PageParser.cs: read Culture, UICulture and LCID
	attributes. Added properties for these. Partially contributed by
	Mohammad Damt.

	Fixes bug #51511.

svn path=/trunk/mcs/; revision=20633
2003-11-30 18:46:53 +00:00
Jackson Harper b85283462b * PageCompiler.cs: Call InitOutputCache when the OutputCache
directive is set.

svn path=/trunk/mcs/; revision=19974
2003-11-13 22:39:59 +00:00
Gonzalo Paniagua Javier 817a717054 2003-11-05 Gonzalo Paniagua Javier <[email protected]>
* System.Web/HttpRequest.cs:
	* System.Web/HttpResponse.cs:
	* System.Web/HttpUtility.cs:
	* System.Web/HttpValueCollection.cs: encoding fixes/updates.

	* System.Web/HttpWriter.cs: when updating the encoding, flush the
	existing stream. Encoding updates.

	* System.Web.Compilation/AspGenerator.cs: use fileEncoding from
	configuration files.

	* System.Web.Compilation/PageCompiler.cs: add assign statements for
	ContentType, ResponseEncoding and CodePage if supplied.

	* System.Web.Configuration/GlobalizationConfiguration.cs: added
	GetInstance method.

	* System.Web.Configuration/GlobalizationConfigurationHandler.cs: warn
	about unsupported encodings and provide reasonable defaults.

	* System.Web.Security/FormsAuthentication.cs: encoding updates.
	* System.Web.UI/LosFormatter.cs: encoding updates.
	* System.Web.UI/Page.cs: implemented CodePage and ContentType.
	* System.Web.UI/PageParser.cs: handle CodePage, ContentEncoding and
	ResponseEncoding attributes.

	* System.Web.Util/WebEncoding.cs: added properties to access
	configuration files encoding.

svn path=/trunk/mcs/; revision=19641
2003-11-05 07:49:02 +00:00
Gonzalo Paniagua Javier e80814a23c 2003-04-30 Gonzalo Paniagua Javier <[email protected]>
* AspComponentFoundry.cs: simplified it a lot by using Type and Assembly
	instead of their names.

	* AspElements.cs: removed. No longer needed.

	* AspGenerator.cs: this file is now in charge of interfacing between
	the parser and the compiler. It manages the creation of the
	ControlBuilder tree and the compilation of the CodeDOM tree.

	* AspParser.cs: tag handling is simpler now.  Instead of a whole bunch
	of different Types, tags are just and id and a set of attributes.
	Implement ILocation interface.

	* AspTokenizer.cs: added a few methods to help the parser implementing
	ILocation.

	* BaseCompiler.cs: handles the portions of the CodeDOM tree that are
	common to appliaction, page and user control, including the actual
	compilation and error handling.

	* CSCompiler.cs: compiles C# files using CodeDOM interfaces.

	* CachingCompiler.cs: simplified to use the new interfaces.

	* CompilationException.cs: it's now using CompilationResult to report
	errors.

	* CompilationResult.cs: Removed file.

	* Directive.cs: to check for the validity of a directive.

	* GlobalAsaxCompiler.cs: simplified a lot, as most of the work is done
	in BaseCompiler.

	* ILocation.cs: interface used to now the exact place where a parse
	error happens.

	* PageCompiler.cs: generates a couple of methods that are only used in
	pages.

	* ParseException.cs: use the ILocation interface.

	* TagAttributes.cs: handles the attributes of the tags parsed.

	* TagType.cs: an enum for the different kinds of tags.

	* TemplateControlCompiler.cs: this is the one that does most of the
	conversion from teh ControlBuilder tree into a CodeDOM tree.

	* UserControlCompiler.cs: simplified as most of the work is done in
	its base classes.

	* WebServiceCompiler.cs: dummy.

svn path=/trunk/mcs/; revision=14140
2003-04-30 04:56:01 +00:00
Gonzalo Paniagua Javier 3f3247b3ee 2003-03-10 Gonzalo Paniagua Javier <[email protected]>
* AspGenerator.cs:
	* BaseCompiler.cs:
	* CachingCompiler.cs:
	* CompilationResult.cs:
	* GlobalAsaxCompiler.cs:
	* PageCompiler.cs:
	* UserControlCompiler.cs: recompile the page if dependencies change.

svn path=/trunk/mcs/; revision=12401
2003-03-10 06:41:26 +00:00
Gonzalo Paniagua Javier 216bec00c9 2003-02-11 Gonzalo Paniagua Javier <[email protected]>
* list: added a couple of new files.
	* System.Web/HtmlizedException.cs: base class for exceptions that makes
	it easy to generate error pages.

	* System.Web/HttpException.cs: improved error displaying.

	* System.Web/HttpRuntime.cs: removed debugging output.

	* System.Web.Compilation/AspGenerator.cs: throw ParseException on parse
	error.

	* System.Web.Compilation/AspParser.cs: added Line and Column props.

	* System.Web.Compilation/CompilationException.cs: derives now from
	HtmlizedException.

	* System.Web.Compilation/CompilationResult.cs: added fileName field.
	Fixed set_ExitCode.

	* System.Web.Compilation/GlobalAsaxCompiler.cs:
	* System.Web.Compilation/PageCompiler.cs:
	* System.Web.Compilation/UserControlCompiler.cs: pass the file name in
	the CompilationResult.

	* System.Web.Compilation/ParseException.cs: new exception.

svn path=/trunk/mcs/; revision=11467
2003-02-11 05:04:30 +00:00
Gonzalo Paniagua Javier 3444afed80 2003-02-03 Gonzalo Paniagua Javier <[email protected]>
* System.Web.Compilation/AspParser.cs: the parser fires events when it
	parses an element.

	* System.Web.UI/SimpleWebHandlerParser.cs:
	* System.Web.Compilation/GlobalAsaxCompiler.cs:
	* System.Web.Compilation/PageCompiler.cs:
	* System.Web.Compilation/UserControlCompiler.cs:
	* System.Web.Compilation/AspElements.cs: modified to use the new parser
	interface.

	* System.Web.Compilation/AspGenerator.cs: modified to use the new
	parser. Merge multiple text strings into one single LiteralControl.

	* System.Web.Compilation/AspTokenizer.cs: added Line and Column properties.

svn path=/trunk/mcs/; revision=11146
2003-02-03 02:25:00 +00:00
Gonzalo Paniagua Javier 8e91ed0203 2002-12-18 Gonzalo Paniagua Javier <[email protected]>
* System.Web/HttpApplicationFactory.cs: add the context as parameter
	when building the application Type.

	* System.Web/HttpCookie.cs: new internal constructor.
	* System.Web/HttpCookieCollection.cs: new internal method to make a
	cookie expire.

	* System.Web/HttpRequest.cs: MapPath fixes.
	* System.Web/HttpResponse.cs: implemented ApplyAppPathModifier.
	* System.Web/HttpRuntime.cs: fixed typo in AppDomainAppVirtualPath.
	* System.Web.Compilation/AspGenerator.cs: now it uses the current
	HttpContext when creating user controls. TemplateSourceDirectory is no
	longer a dummy value.

	* System.Web.Compilation/GlobalAsaxCompiler.cs:
	* System.Web.Compilation/PageCompiler.cs:
	* System.Web.Compilation/UserControlCompiler.cs: set the context which
	will be used to locate the files.

	* System.Web.UI/BaseParser.cs: use MapPath and context to locate files.
	* System.Web.UI/Control.cs: implemented MapPathSecure.
	* System.Web.UI/TemplateControl.cs: use UrlUtils to generate the path.
	* System.Web.UI/TemplateControlParser.cs: use the context and MapPath.
	* System.Web.UI/UserControl.cs: implemented MapPath.
	* System.Web.UI/UserControlParser.cs: added context parameter to
	constructor.
	* System.Web.Util/PathUtil.cs: removed.
	* System.Web.Util/UrlUtils.cs: fixed Combine to handle '~'.

svn path=/trunk/mcs/; revision=9737
2002-12-18 02:17:17 +00:00
Gonzalo Paniagua Javier 31c202887f 2002-12-13 Gonzalo Paniagua Javier <[email protected]>
* System.Web.Compilation/AspGenerator.cs: added support for
	AutoEventWireup attribute in @Page and @Control.

	* System.Web.Compilation/CompilationResult.cs:
	* System.Web.Compilation/GlobalAsaxCompiler.cs:
	* System.Web.Compilation/PageCompiler.cs:
	* System.Web.Compilation/UserControlCompiler.cs: store the options.

	* System.Web.UI/Control.cs: added AutoEventWireup internal property.

	* System.Web.UI/Page.cs: removed page events wire up from here.

	* System.Web.UI/TemplateControl.cs: new method WireupAutomaticEvents to
	hook up page and user controls events.

	* System.Web.UI/TemplateControlParser.cs: process the options that are
	applicable once we have the instance of the control.

	* System.Web.UI/TemplateParser.cs: also stores the options.

	* System.Web.UI/UserControl.cs: hook up events before initializing the
	control.

svn path=/trunk/mcs/; revision=9623
2002-12-13 15:57:07 +00:00
Gonzalo Paniagua Javier 43d7f24f1c 2002-12-12 Gonzalo Paniagua Javier <[email protected]>
* list: Modified file.
	* System.Web/HttpRuntime.cs: avoid nulls and exception when getting
	resource format strings.

	* System.Web/StaticFileHandler.cs: added file name to error message.
	* System.Web.Compilation/AspElements.cs: new method Tag.GetElements
	used to parse the inner contents of a tag looking for data binding or
	code render tags.

	New property HtmlControlTag.ParseChildren allows
	differentiation of a couple of HtmlControls that has children as
	properties (namely HtmlTable and HtmlTableRow).

	* System.Web.Compilation/AspGenerator.cs: fixed container semantics to
	match BindingContainer one. Implemented Inherits attribute for page and
	control.

	Support HtmlControls that has ChildrenAsProperties.

	Generate code for data binding functions that matches the semantic of
	Container.

	Handle data bound and code render attribute values.

	Set proper value return for TemplateSourceDirectory. Should be relative
	to appPath.

	* System.Web.Compilation/BaseCompiler.cs: moved CompilerOptions and
	References handling here.

	* System.Web.Compilation/CachingCompiler.cs: copy result of compilation.

	* System.Web.Compilation/CompilationException.cs: simple ToString ()
	implementation.

	* System.Web.Compilation/CompilationResult.cs: implemented CopyFrom and
	ToString.

	* System.Web.Compilation/GlobalAsaxCompiler.cs:
	* System.Web.Compilation/PageCompiler.cs:
	* System.Web.Compilation/UserControlCompiler.cs: removed
	CompilerOptions as it's now handled in the base class. Get all the
	types in the generated assembly and look for one that derives from
	the correct Type.

	* System.Web.UI/Control.cs: implemented TemplateSourceDirectory.
	* System.Web.UI/TemplateControl.cs: implemented LoadControl and
	LoadTemplate.

	* System.Web.Util/PathUtil.cs: some path handling methods that are not
	available in Path.

svn path=/trunk/mcs/; revision=9583
2002-12-12 03:20:19 +00:00
Gonzalo Paniagua Javier be2bff830e 2002-11-26 Gonzalo Paniagua Javier <[email protected]>
* list: added/removed files.

	* System.Web.Compilation/AspGenerator.cs: reworked user control
	compilation. Provide the options as a Hashtable for use in compilation.
	Create the user controls in the private bin path of the domain.

	* System.Web.Compilation/BaseCompiler.cs: base class for the various
	compiler types.

	* System.Web.Compilation/CachingCompiler.cs: actually executes mcs and
	do some poor caching (it will use Cache when finished).

	* System.Web.Compilation/CompilationException.cs: this exception has
	enough information to generate a nice error page.
	* System.Web.Compilation/CompilationResult.cs: used in caching.

	* System.Web.Compilation/PageCompiler.cs: now derives from BaseCompiler

	* System.Web.Compilation/TemplateFactory.cs: no longer needed.

	* System.Web.Compilation/UserControlCompiler.cs: new class used when
	compiling user controls.
	* System.Web.Compilation/WebServiceCompiler.cs: derives from
	BaseCompiler.
	* System.Web.Mail/SmtpMail.cs: i don't wanna see that warning :-).
	* System.Web.UI/TemplateParser.cs: fixed BaseType.
	* System.Web.UI/UserControlParser.cs: helper class to compile user
	controls.

svn path=/trunk/mcs/; revision=9191
2002-11-26 02:52:25 +00:00
Gonzalo Paniagua Javier c8003f30ce 2002-11-13 Gonzalo Paniagua Javier <[email protected]>
* AspElements.cs: added ServerComment class.
	* AspParser.cs: ignore ServerComments tags. Remove server comments when
	in verbatim mode.

	Fixes #33482.

	* PageCompiler.cs: check if the type is already cached before generating
	the C# file.
	* TemplateFactory.cs: if csFile parameter is null, only checks if we
	already have the page compiled.

svn path=/trunk/mcs/; revision=8974
2002-11-13 19:07:23 +00:00
Gonzalo Paniagua Javier 095823b134 2002-10-27 Gonzalo Paniagua Javier <[email protected]>
* 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
2002-10-27 19:55:28 +00:00
Gonzalo Paniagua Javier f2e90236bb 2002-09-28 Gonzalo Paniagua Javier <[email protected]>
* list: added PageHandlerFactory.

	* System.Web/HttpApplication.cs:
	* System.Web/HttpApplicationFactory.cs:
	* System.Web/HttpRequest.cs:
	* System.Web/HttpRuntime.cs:
	* System.Web.Compilation/AspElements.cs:
	* System.Web.Compilation/AspGenerator.cs:
	* System.Web.Compilation/AspParser.cs:
	* System.Web.Compilation/PageCompiler.cs:
	* System.Web.Compilation/TemplateFactory.cs: Modified file.
	* System.Web.Configuration/HttpCapabilitiesBase.cs:
	* System.Web.Hosting/SimpleWorkerRequest.cs:
	* System.Web.UI/PageHandlerFactory.cs:
	* System.Web.UI/PageParser.cs:
	* System.Web.UI/TemplateControlParser.cs: we are now able to compile
	pages and use HttpApplication, HttpRuntime and SimpleWorkerRequest.

svn path=/trunk/mcs/; revision=7880
2002-09-28 07:44:14 +00:00
Gonzalo Paniagua Javier 9d79ec487d 2002-08-18 Gonzalo Paniagua Javier <[email protected]>
* System.Web/HttpContext.cs: reformatted.
	* System.Web/HttpStaticObjectsCollection.cs: implemented GetEnumertor,
	CopyTo and the indexer.
	* System.Web.Compilation/PageCompiler.cs: fixed compilation.
	* System.Web.SessionState/HttpSessionState.cs: IsAbandoned is internal.
	* System.Web.SessionState/SessionDictionary.cs: scope fixes.
	* System.Web.SessionState/SessionStateModule.cs: added events.

svn path=/trunk/mcs/; revision=6730
2002-08-19 01:31:11 +00:00
Gonzalo Paniagua Javier 3023fcd88d 2002-08-18 Gonzalo Paniagua Javier <[email protected]>
* PageCompiler.cs: generate C# file using AspGenerator.

svn path=/trunk/mcs/; revision=6729
2002-08-19 00:43:59 +00:00
Gonzalo Paniagua Javier 922dfc4b3d 2002-08-16 Gonzalo Paniagua Javier <[email protected]>
* System.Web.Compilation/AspElements.cs:
	* System.Web.Compilation/AspParser.cs:
	* System.Web.Compilation/AspTokenizer.cs:
	* System.Web.Compilation/ChangeLog:
	* System.Web.Compilation/PageCompiler.cs:
	* System.Web.Compilation/TemplateFactory.cs:
	* System.Web.UI/ApplicationFileParser.cs:
	* System.Web.UI/BaseParser.cs:
	* System.Web.UI/PageParser.cs:
	* System.Web.UI/TemplateControl.cs:
	* System.Web.UI/TemplateControlParser.cs:
	* System.Web.UI/TemplateParser.cs: first steps to move xsp into
	System.Web.

svn path=/trunk/mcs/; revision=6668
2002-08-16 05:36:06 +00:00