Commit Graph
560 Commits
Author SHA1 Message Date
Marek Habersack dfdb975263 2009-04-30 Marek Habersack <[email protected]>
* BuildManager.cs: when BuildInner catches a compilation
	exception, wrap it in HttpException before re-throwing.

2009-04-30  Marek Habersack  <[email protected]>

	* TemplateParser.cs: removed the PageParserFilterTypeName
	property, the filter type name is looked up on demand now.

	* ApplicationFileParser.cs, MasterPageParser.cs,
	UserControlParser.cs: load config defaults explicitly after
	initializing the instance.

svn path=/trunk/mcs/; revision=133169
2009-04-30 10:53:41 +00:00
Marek Habersack 506b43f893 2009-04-28 Marek Habersack <[email protected]>
* Makefile (TEST_RESOURCE_FILES): added
	Test/mainsoft/NunitWebResources/LinkInHeadWithEmbeddedExpression.aspx

2009-04-28  Marek Habersack  <[email protected]>

	* TemplateControlCompilerTest.cs: added test for bug #498637

2009-04-28  Marek Habersack  <[email protected]>

	* AspGenerator.cs: ProcessTag doesn't process a tag which is not
	server-side and which has declarative expressions embedded. Fixes
	bug #498637

2009-04-28  Marek Habersack  <[email protected]>

	* NunitWebResources/LinkInHeadWithEmbeddedExpression.aspx: added

svn path=/trunk/mcs/; revision=132812
2009-04-28 08:39:43 +00:00
Marek Habersack a6ed4173aa 2009-04-24 Marek Habersack <[email protected]>
* System.Web_test.dll.sources: added
	System.Web.UI/PageParserFilterTest.cs

2009-04-24  Marek Habersack  <[email protected]>

	* TemplateParser.cs: PageParserFilter.Initialize now takes just
	one parameter.

	* PageParserFilter.cs: a few alignments for .NET compatibility in
	the default behavior.

2009-04-24  Marek Habersack  <[email protected]>

	* AspGenerator.cs: ProcessCode should _not_ stop processing the
	passed code string if the filter's ProcessCodeConstruct returns
	false. Fixes bug #497775

2009-04-24  Marek Habersack  <[email protected]>

	* PageParserFilterTest.cs: added

svn path=/trunk/mcs/; revision=132607
2009-04-24 18:54:29 +00:00
Marek Habersack a277d5477f 2009-04-21 Marek Habersack <[email protected]>
* PageCompiler.cs: implemented new way of setting output cache
	parameters in the 2.0 profile. The generated code is now the same
	as on .NET and uses the OutputCacheParameters class to pass
	settings to InitOutputCache.

2009-04-21  Marek Habersack  <[email protected]>

	* Page.cs: added support for OutputCacheParameters.NoStore to
	InitOutputCache.

	* TemplateParser.cs:
	Added support for the SqlDependency, NoStore and CacheProfile
	attributes of the OutputCache directive. Fixes bug #496951

svn path=/trunk/mcs/; revision=132312
2009-04-21 19:56:57 +00:00
Marek Habersack 3a9971ab23 2009-04-17 Marek Habersack <[email protected]>
* AspGenerator.cs: if thead/tbody are parsed as children of a
	server-side table control, ignore them. Fixes bug #481622

svn path=/trunk/mcs/; revision=131977
2009-04-17 07:41:09 +00:00
Marek Habersack d7fb90cfca 2009-04-16 Marek Habersack <[email protected]>
* HttpContext.cs: local resources code now uses the custom
	resource provider factory, just like the global resources
	code. Fixes bug #493263

2009-04-16  Marek Habersack  <[email protected]>

	* TemplateControlCompiler.cs:
	AssignPropertyFromResources now checks whether the field/property
	passed to it is decorated with the Localizable custom attribute
	and whether the resource provider contains an entry for that
	property.

svn path=/trunk/mcs/; revision=131888
2009-04-16 12:26:14 +00:00
Marek Habersack c503734d12 2009-04-16 Marek Habersack <[email protected]>
* TemplateControlCompiler.cs: using a regexp to check whether an
	expression is a Bind one. Fixes bug #493639

2009-04-16  Marek Habersack  <[email protected]>

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

2009-04-16  Marek Habersack  <[email protected]>

	* TemplateControlCompilerTest.cs: added test for bug #493639

svn path=/trunk/mcs/; revision=131874
2009-04-16 09:51:12 +00:00
Marek Habersack c2a841d9f8 2009-04-15 Marek Habersack <[email protected]>
* TemplateParser.cs: use generic lists for import, namespace and
	interface caches. If a namespace is added (e.g. by parsing the
	Import directive), find the assembly in which namespace is
	defined.

2009-04-15  Marek Habersack  <[email protected]>

	* BuildManager.cs: do not add all assemblies in bin/ when serving
	a precompiled site. Fixes bug #493873
	When serving a precompiled site, check if the bin/ directory
	contains certain well-known assemblies and load them if present.

svn path=/trunk/mcs/; revision=131768
2009-04-15 13:32:47 +00:00
Marek Habersack 53b225fc4b 2009-04-07 Marek Habersack <[email protected]>
* TemplateControlCompiler.cs: GenerateExpressionFromString doesn't
	assume that the passed member is a property anymore. Fixes bug
	#492252

svn path=/trunk/mcs/; revision=131210
2009-04-07 10:44:56 +00:00
Marek Habersack b31a989a87 2009-04-06 Marek Habersack <[email protected]>
* BuildManager.cs: make sure that precompiled is not null before
	using it in GetPrecompiledType.

svn path=/trunk/mcs/; revision=131138
2009-04-06 18:03:04 +00:00
Marek Habersack 505ca45601 2009-04-03 Marek Habersack <[email protected]>
* AspParser.cs: local copy of checksum generated by the tokenizer
	is made right after parsing is done.

	* AspGenerator.cs: set tparser.MD5Checksum in Parse instead of in
	InitParser. Avoids empty checksums in #pragma checksum.

svn path=/trunk/mcs/; revision=130971
2009-04-03 14:34:36 +00:00
Marek Habersack 1dca373f1f 2009-04-02 Marek Habersack <[email protected]>
* CompilationException.cs: skip warnings in ErrorMessage and
	ErrorLines

	* BuildManager.cs: when an error occurs while compiling the
	requested virtual path, throw the exception, do not attempt to
	build again.

	* TemplateControlCompiler.cs: implemented missing converter for
	the ExpandDepth property. Fixes bug #490860

2009-04-02  Marek Habersack  <[email protected]>

	* HttpException.cs: if there are more lines with errors, display
	them all.

svn path=/trunk/mcs/; revision=130876
2009-04-02 15:25:03 +00:00
Marek Habersack 58caa86044 2009-04-02 Marek Habersack <[email protected]>
* TemplateControlCompiler.cs: implemented missing converter for
	the ExpandDepth property. Fixes bug #490860

svn path=/trunk/mcs/; revision=130813
2009-04-01 22:31:58 +00:00
Marek Habersack a136d79b68 2009-04-01 Marek Habersack <[email protected]>
* AssemblyBuilder.cs: CSharpCodePragmaGenerator.ReserveSpace:
	added the 2 extra chars to pragmaChecksumStaticCount constant (the
	ones added by Gonzalo below) and removed one NewLine to account
	for Martin's change below.
	VBCodePragmaGenerator.ReserveSpace - one newline follows
	#ExternalSource.
	VBCodePragmaGenerator.DecorateFile - one newline follows
	#ExternalSource.

svn path=/trunk/mcs/; revision=130763
2009-04-01 16:07:02 +00:00
Martin Baulig b902657bcf Don't emit a blank line after '#line' as this would cause all line numbers to be off by 1.
svn path=/trunk/mcs/; revision=130755
2009-04-01 14:39:05 +00:00
Gonzalo Paniagua Javier fec458c0ba 2009-03-31 Gonzalo Paniagua Javier <[email protected]>
* AssemblyBuilder.cs: the guid has to be quoted.


svn path=/trunk/mcs/; revision=130720
2009-04-01 03:50:10 +00:00
Marek Habersack 433193ce48 Typo fix
svn path=/trunk/mcs/; revision=130666
2009-03-31 15:01:34 +00:00
Marek Habersack e9a0173141 2009-03-31 Marek Habersack <[email protected]>
* All of the below are part of the fix for bug #489687

	* ThemeDirectoryCompiler.cs: pass VirtualPath instances to parser
	constructors.

	* BuildProvider.cs: associated virtual path is stored internally
	as an instance of VirtualPath, accessible via new
	VirtualPathInternal property.

	* BuildManagerDirectoryBuilder.cs: VirtualPath.IsFake is used to
	detect fake virtual paths.
	GetBuildProvider now takes a VirtualPath instead of string for the
	virtualPath parameter. The passed VirtualPath instance is passed
	unchanged to BuildProvider.

	* BuildManager.cs: AssertVirtualPathExists now uses
	VirtualPath.IsFake to check for fake virtual paths.

	* ApplicationFileBuildProvider.cs, GenericBuildProvider.cs,
	MasterPageBuildProvider.cs, PageBuildProvider.cs,
	ThemeBuildProvider.cs, UserControlBuildProvider.cs,
	WebHandlerBuildProvider.cs, WebServiceBuildProvider.cs:
	CreateParser overloads now take a VirtualPath instead of a string
	for the virtualPath parameter.

	* ThemeBuildProvider.cs: use new parser constructors which take
	VirtualPath instances instead of strings.

2009-03-31  Marek Habersack  <[email protected]>

	* VirtualPath.cs: added code to detect whether the VirtualPath
	instance represents a fake virtual path (IsFake property).
	Added new property DirectoryNoNormalize which returns
	non-normalized directory for the VirtualPath instance.
	Made ToString () a bit more friendly and well-behaved.

2009-03-31  Marek Habersack  <[email protected]>

	* ApplicationFileParser.cs, MasterPageParser.cs, PageParser.cs,
	PageThemeFileParser.cs, PageThemeParser.cs, UserControlParser.cs,
	WebHandlerParser.cs, WebServiceParser.cs: 2.0 constructors take a
	VirtualPath instance for the virtualPath parameter, instead of a
	string.

svn path=/trunk/mcs/; revision=130665
2009-03-31 15:01:21 +00:00
Marek Habersack 20242bfa98 2009-03-30 Marek Habersack <[email protected]>
* AspTokenizer.cs: UpdateChecksum - fixed off-by-one bug when
	processing the checksum buffer.

svn path=/trunk/mcs/; revision=130664
2009-03-31 15:01:08 +00:00
Marek Habersack 65f9434933 2009-03-30 Marek Habersack <[email protected]>
* AssemblyBuilder.cs: introduced a kludge to add #pragma checksum
	and #pragma lines (or its vb equivalent - #ExternalSource) to
	code-behind files named in the CodeFile/Src directives while
	copying them to the dynamic directory for compilation. The kludge
	works by recognizing the .cs and .vb extensions and wrapping the
	file contents in the appropriate directives. This is done in this
	way because the other possible way, using the
	CodeSnippetCompileUnit, requires the entire file to be read in
	memory and then passed to CodeDOM. We fall back to this way when
	the file being copied is neither C# or VB.

svn path=/trunk/mcs/; revision=130566
2009-03-30 18:24:34 +00:00
Marek Habersack 8b21628c27 2009-03-25 Marek Habersack <[email protected]>
* AspTokenizer.cs: MD5 checksum calculation happens here. It's
	done incrementally as characters are read.

	* AspParser.cs: the MD5 checksum is no longer computed here. Moved
	to AspTokenizer.
	After parsing, both the tokenizer and the string reader are
	disposed of.

svn path=/trunk/mcs/; revision=130245
2009-03-25 21:20:50 +00:00
Marek Habersack f56fae0f58 2009-03-25 Marek Habersack <[email protected]>
* AssemblyBuilder.cs: renamed CopyFile to CopyFileWithChecksum, in
	prepration for future inclusion of checksum and line pragmas in
	the file being copied.
	Files are copied chunk by chunk, not by reading the entire
	contents.

svn path=/trunk/mcs/; revision=130244
2009-03-25 21:20:39 +00:00
Zoltan Varga bc1fec26b1 2009-03-23 Zoltan Varga <[email protected]>
* PageCompiler.cs: Fix the build.

svn path=/trunk/mcs/; revision=130093
2009-03-23 21:58:58 +00:00
Marek Habersack 73f04c137f 2009-03-23 Marek Habersack <[email protected]>
* TemplateBuildProvider.cs: add values of the CodeFile and Src
	page/master/control directives to the list of file dependencies.
	Extract language also for master/page, not only for controls.

	* PageCompiler.cs: CreateConstructors now triggers master page
	build, if the current page is using one. Fixes bug #487857

svn path=/trunk/mcs/; revision=130082
2009-03-23 19:58:36 +00:00
Marek Habersack 549f07d36b 2009-03-16 Marek Habersack <[email protected]>
* AspGenerator.cs:
	TagParsed now better handles <script> tags. For both server and
	client tags ProcessScript is called and the input text, in case of
	client tags, is read verbatim to be processed when ProcessScript
	is called to close the tag. At this point the verbatim text is
	checked whether it contains server-side tags and/or expressions.

svn path=/trunk/mcs/; revision=129491
2009-03-16 18:54:17 +00:00
Marek Habersack 5d92b0cb21 2009-03-16 Marek Habersack <[email protected]>
* AspGenerator.cs: when parsing nested tags (includes tags inside
	client-side javascript script blocks) pass the closing tag up to
	the containing parser.
	Instead of parsing the whole plain text contents, plus the two
	constructs we're interested in from it using regexs. This is
	necessary as we might be passed JavaScript code and without
	understanding its syntax we'll confuse the '<' character for the
	start of a tag.

svn path=/trunk/mcs/; revision=129449
2009-03-16 14:54:44 +00:00
Marek Habersack 309c9647cd 2009-03-16 Marek Habersack <[email protected]>
* AspGenerator.cs: when parsing nested tags (includes tags inside
	client-side javascript script blocks) pass the closing tag up to
	the containing parser.

svn path=/trunk/mcs/; revision=129412
2009-03-16 09:54:48 +00:00
Marek Habersack 39c6840184 2009-03-12 Marek Habersack <[email protected]>
* BuildManager.cs, BuildManagerDirectoryBuilder.cs,
	BuildProvider.cs, TemplateBuildProvider.cs: dependencies are
	returned as an IDictionary <string, bool>. Dependencies must be
	compared case-insensitively.

svn path=/trunk/mcs/; revision=129142
2009-03-12 14:27:12 +00:00
Marek Habersack 709407a75f 2009-03-12 Marek Habersack <[email protected]>
* TemplateBuildProvider.cs: ExtractReferenceDependencies must also
	extract the value of the Page attribute.

svn path=/trunk/mcs/; revision=129141
2009-03-12 14:27:01 +00:00
Gonzalo Paniagua Javier d7f1dbcff0 missed these two
svn path=/trunk/mcs/; revision=128276
2009-02-28 20:37:37 +00:00
Gonzalo Paniagua Javier e63f092be1 2009-02-28 Gonzalo Paniagua Javier <[email protected]>
* AppResourcesAssemblyBuilder.cs:
	* BuildManagerDirectoryBuilder.cs:
	* AspComponentFoundry.cs:
	* AssemblyBuilder.cs:
	* CachingCompiler.cs:
	* AspGenerator.cs:
	* WsdlBuildProvider.cs:
	* BaseCompiler.cs:
	* BuildProvider.cs:
	* AppWebReferencesCompiler.cs:
	* TemplateControlCompiler.cs:
	* BuildManager.cs:
	* AppCodeCompiler.cs: settings that have to be in
	machine.config or the root level web.config now call
	GetWebApplicationSection.


svn path=/trunk/mcs/; revision=128275
2009-02-28 20:30:31 +00:00
Marek Habersack 2aaf750270 2009-02-26 Marek Habersack <[email protected]>
* TagAttributes.cs: modified ToString to return string formatted
	in a more helpful way.

	* AspParser.cs: added ToString, helpful when debugging.

	* AspGenerator.cs: properly print leading and trailing plain text
	when looking for embedded tags in ProcessTagsInAttributes.

svn path=/trunk/mcs/; revision=128091
2009-02-26 14:16:20 +00:00
Marek Habersack 39ea4c8b32 2009-02-25 Marek Habersack <[email protected]>
* AspTokenizer.cs: put_back now uses a stack and allows more than
	one invocation when called inside a tag.

	* AspGenerator.cs: when a nested parser is used, pay attention to
	server tags found inside client tags and add them to the control
	tree.

svn path=/trunk/mcs/; revision=127935
2009-02-25 02:49:25 +00:00
Marek Habersack 75a2356018 2009-02-24 Marek Habersack <[email protected]>
* BuildManager.cs: Path.Combine must not be passed null first
	parameter.

svn path=/trunk/mcs/; revision=127878
2009-02-24 18:12:35 +00:00
Gonzalo Paniagua Javier 38d6841577 2009-02-20 Gonzalo Paniagua Javier <[email protected]>
* System.Web/HttpWriter.cs: new Response property and WriteUTF8Ptr
	method.
	* System.Web/HttpResponseStream.cs: added support for writing from an
	IntPtr. copied the memcpy method from String.cs.

	* System.Web.Compilation/BuildManager.cs: updated comment.

	* System.Web.UI/ResourceBasedLiteralControl.cs: new Control. It's just
	like a LiteralControl but will render itself from the bytes pointed to
	by an IntPtr and not create any string from the underlying data unless
	needed.

	* System.Web.UI/TemplateControl.cs: implemented a bunch of methods
	that are used from the precompiled assemblies for a web project. The
	most notable change needed is to be able to read a win32 resource from
	the dll of the control. The resource is a concatenation of literals
	with plain text for the control and a specialized LiteralControl is
	generated from different chunks of the resource.

	* System.Web.UI/HtmlTextWriter.cs: new method that returns the
	HttpWriter in use.

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

	* System.Web.Util/ICalls.cs: new internal call to get a pointer to the
	win32 resource associated with the control's assembly.


svn path=/trunk/mcs/; revision=127579
2009-02-20 21:30:58 +00:00
Gonzalo Paniagua Javier a6b02b8aee svn path=/trunk/mcs/; revision=127355 2009-02-18 23:53:11 +00:00
Gonzalo Paniagua Javier bbfde12266 2009-02-18 Gonzalo Paniagua Javier <[email protected]>
* System.Web/HttpApplicationFactory.cs: check of global.asax was precompiled.
	* System.Web.UI/MasterPage.cs: the items in ContentPlaceHolders are lowercase.
	* System.Web.Compilation/TemplateControlCompiler.cs: lowercase place holder names
	* System.Web.Compilation/BuildManager.cs: initial support for
	precompilation. No 'updatable', please.



svn path=/trunk/mcs/; revision=127352
2009-02-18 23:49:33 +00:00
Marek Habersack 5df8b478b6 2009-02-13 Marek Habersack <[email protected]>
* AspParser.cs: added an event raised when parsing is complete.

	* AspGenerator.cs: added support for PageParserFilter which, if
	found, is used to control certain aspects of code parsing
	(accepting/rejecting control types, accepting/rejecting code
	snippets, parsing completion)
	Added the AddControl method, used by PageParserFilter when a
	custom filter wants to inject a control in the current control
	builder tree.

2009-02-13  Marek Habersack  <[email protected]>

	* TemplateParser.cs: PageParserFilter handling moved to here.
	PagesConfig must use the current virtual path when retrieving the
	section, or otherwise we'll miss the lower level web.configs.
	Added the AddControl method, used by PageParserFilter.
	Implementing filtering of: parsed directives and the base type, if
	a page parser filter is present.

	* PageParserFilter.cs: added missing 3.5 members and implemented
	everything.

	* PageParser.cs: moved PageParserFilter processing to
	TemplateParser.
	VirtualPath must be set before anything else.
	Call page parser filter's directive preprocessing code from
	AddDirective if a filter is present and a mastertype or
	previouspagetype directive is parsed.

	* MasterPageParser.cs: when PageParserFilter is present use it to
	preprocess the MasterType directive.

svn path=/trunk/mcs/; revision=126855
2009-02-13 20:11:19 +00:00
Marek Habersack b82b595555 2009-02-05 Marek Habersack <[email protected]>
* AppResourcesCompiler.cs: implemented a type resolver for
	ResXResourceReader so that it can correctly resolve
	System.Resources types which are normally found in
	System.Windows.Forms but are included by System.Web
	directly. Without the type resolver, code comparing types inside
	ResXResourceReader when file references are used in side the .resx
	file will not work correctly. The reason for that is that .resx
	files will name "System.Resources.ResXFileRef,
	System.Windows.Forms" as the file reference handler, while inside
	System.Web ResXFileRef will be of type
	"System.Resources.ResXFileRef, System.Web". Fixes bug #466059

svn path=/trunk/mcs/; revision=125945
2009-02-05 22:08:33 +00:00
Marek Habersack f3b110a6d0 2009-02-05 Marek Habersack <[email protected]>
* GenericBuildProvider.cs: added a new virtual method, MapPath,
	which can be overriden by builders which need special handling of
	virtual path mapping.

	* PageBuildProvider.cs: provide implementation of
	GenericBuildProvider.MapPath which takes into account fake virtual
	paths. Fixes bug #463950

svn path=/trunk/mcs/; revision=125857
2009-02-05 13:15:06 +00:00
Marek Habersack 135d21c0b3 2009-01-26 Marek Habersack <[email protected]>
* BuildManagerDirectoryBuilder.cs: added support for fake virtual
	paths.

svn path=/trunk/mcs/; revision=124536
2009-01-26 17:51:25 +00:00
Marek Habersack 4a986567ec 2009-01-26 Marek Habersack <[email protected]>
* CompilationException.cs: added a Message override to make error
	messages more useful.

svn path=/trunk/mcs/; revision=124475
2009-01-26 10:46:23 +00:00
Gonzalo Paniagua Javier 2cd8cdbf02 2009-01-23 Gonzalo Paniagua Javier <[email protected]>
* AspComponentFoundry.cs: no need to throw. Caller handles a null
	return value.


svn path=/trunk/mcs/; revision=124403
2009-01-24 05:16:23 +00:00
Marek Habersack 502f34f419 2009-01-23 Marek Habersack <[email protected]>
* BuildManager.cs: use -1 for infinite wait in calls to
	Acquire{Reader,Writer}Lock ()

svn path=/trunk/mcs/; revision=124329
2009-01-23 14:29:07 +00:00
Marek Habersack dfc843bcf1 2009-01-22 Marek Habersack <[email protected]>
* Makefile (SYSTEMCORE_DEP):
	If NO_SYSTEMCORE_DEP is defined System.Web.dll will not be linked
	with System.Core.dll and BuildManager will use ReaderWriterLock
	instead of ReaderWriterLockSlim.

2009-01-22  Marek Habersack  <[email protected]>
	* BuildManager.cs:
	 - if SYSTEMCOR_DEP is undefined use ReaderWriterLock instead of
	 ReaderWriterLockSlim

svn path=/trunk/mcs/; revision=124253
2009-01-22 21:25:42 +00:00
Marek Habersack 05e3bfbff1 new BuildManager change logs
svn path=/trunk/mcs/; revision=124189
2009-01-22 11:45:04 +00:00
Marek Habersack a6f295ebc2 Removed unused variables
svn path=/trunk/mcs/; revision=124185
2009-01-22 11:43:35 +00:00
Marek Habersack 9e483b3f69 Removed the suppressAutoRestart variable
svn path=/trunk/mcs/; revision=124184
2009-01-22 11:42:48 +00:00
Marek Habersack 61d6c015ec AssemblyBuilder.Units property is no longer used
svn path=/trunk/mcs/; revision=124182
2009-01-22 11:42:22 +00:00
Marek Habersack c7d0b1a773 Removed debugging code
svn path=/trunk/mcs/; revision=124180
2009-01-22 11:41:33 +00:00