138 Commits
Author SHA1 Message Date
Zoltan Varga 032f313d5f [bcl] Remove NET_4_0 defines from class libs. 2015-01-13 16:06:31 -05:00
Gonzalo Paniagua Javier a05c8bebb2 Remove duplicate 'using' statement 2011-09-15 11:34:41 -04:00
Marek Habersack 885455cc37 [asp.net] Fix for bug #681421. Use VirtualPathProvider.CombineVirtualPaths
The method is used by the parsers to look up dependencies, sources, controls
and master pages.
2011-03-22 21:24:59 +01:00
Marek Habersack 5f5d73fbdb [asp.net] Use List <string> instead of ArrayList to keep assembly locations in TemplateParser 2011-03-22 21:24:59 +01:00
Marek Habersack bc0cb19ea9 [asp.net] Use List <string> instead of ArrayList to keep file dependencies 2011-03-22 21:24:58 +01:00
Marek Habersack 51e6b86309 [asp.net,4.0] Added support for setting default base types for various kinds of resources.
ASP.NET 4.0 allows one to set base types for Pages, User Controls, Application and PageParserFilter
from the pre-application start method(s). This commit implements support for this mechanism.

* ApplicationFileParser.cs: added override of DefaultBaseType property which checks whether
  PageParser.DefaultApplicationBaseType is set and, if yes, uses it to set application base type
  if there's no custom Global.asax
* PageParser.cs: implemented the EnableLongStringsAsResources, DefaultPageBaseType, DefaultApplicationBaseType,
  DefaultPageParserFilterType and DefaultUserControlBaseType properties.
* TemplateParser.cs: if PageParser.DefaultPageParserFilterType is set, use it as the default type to create instance
  of the page parser filter
* Added tests for the new properties.
* Added support in standalone runner for setting custom application domain data on domain creation, just before
  the test is ran.
2010-08-06 22:27:08 +02:00
Marek Habersack 3a84414136 [asp.net] Made TemplateParser.CompileIntoType internal
This method was present only in 1.0 and 1.1 profiles. It's made internal because
we use it throughout our code.
2010-08-06 22:27:08 +02:00
Marek Habersack 8731e553a7 [asp.net,4.0] Added support for declarative per-user control output cache provider selection
This adds support for the ProviderName attribute of the OutputCache directive in user controls.
Also implemented missing support for SqlDependency attribute.

* TemplateControlCompiler.cs: StaticPartialCachingControl instantiation now uses the constructor overloads
  which accept sqlDependency (2.0+) and providerName (4.0+)
* UserControlCompiler.cs: added code to output PartialCachingAttribute which accepts sqlDependency (2.0+) and
  ProviderName (4.0+) arguments
* PartialCachingAttribute.cs added the 4.0 ProviderName property
* StaticPartialCachingControl.cs: implemented two missing constructors (one 2.0 and the other 4.0)
  Added a missing BuildCachedControl overload which accepts providerName (4.0)
* TemplateParser.cs: factored out OutputCache attribute processing to a separate internal virtual method.
* UserControlParser.cs: added support for the ProviderName attribute of the OutputCache directive.
2010-08-06 01:27:34 +02:00
Marek Habersack 5411dd0e2a 2010-05-19 Marek Habersack <[email protected]>
* PageParser.cs: handle several main directive attributes
    	specially, as they can have expressions as their values. Fixes bug
    	#603532

    	* MainDirectiveAttribute.cs: added - helper class to handle
    	directive attributes which can take either a value or an
    	expression.

    	* BaseParser.cs: IsDirective, IsExpression and IsDataBound methods
    	moved to here from TemplateControlCompiler.

    2010-05-19  Marek Habersack  <[email protected]>

    	* TemplateControlCompiler.cs: IsDirective, IsExpression and
    	IsDataBound methods moved to System.Web.UI.BaseParser.
    	Made CompileExpression and GetFieldOrProperty methods internal.

    	* PageCompiler.cs: check several of the Page directive attributes
    	for expressions. Fixes bug #603532

    	* AspGenerator.cs, TagAttributes.cs: use IDictionary instead of
    	Hashtable

svn path=/trunk/mcs/; revision=157519
2010-05-19 01:28:09 +00:00
Marek Habersack 80e56d75c4 Removed 1.x code and NET_2_0 ifdefs
svn path=/trunk/mcs/; revision=145834
2009-11-10 14:00:01 +00:00
Marek Habersack 8b4e17d0d2 2009-11-10 Marek Habersack <[email protected]>
* TemplateParser.cs: AddImports is called from LoadConfigDefaults
	so that it reads configuration from the correct .config file (it
	needs to be called after this.VirtualPath has been
	initialized). Fixes an issue with MVC apps which put configuration
	in Views/web.config etc. Fixes bug #552457

	* ControlBuilder.cs, Page.cs: system.web/pages section is not
	confined to the top-level web.config

2009-11-10  Marek Habersack  <[email protected]>

	* WebConfigurationManager.cs: path passed to OpenWebConfiguration
	from GetSection does not come from FindWebConfig.

2009-11-10  Marek Habersack  <[email protected]>

	* BaseCompiler.cs: parser.Imports is a Dictionary <>/Hashtable
	now.

	* AspComponentFoundry.cs: system.web/pages section is not confined
	to the top-level web.config

svn path=/trunk/mcs/; revision=145831
2009-11-10 13:49:01 +00:00
Marek Habersack 5c59801fff Performance improvements:
- made sure invariant culture is used with String.ToLower, String.ToUpper and String.Compare
- replaced all calls to CultureInfo.InvariantCulture with a reference to a static field System.Web.Util.Helpers.InvariantCulture

svn path=/trunk/mcs/; revision=143587
2009-10-07 00:10:03 +00:00
Marek Habersack 7c2b88b9fe 2009-09-15 Marek Habersack <[email protected]>
* TemplateParser.cs: FindNamespaceInAssembly must catch
	ReflectionTypeLoadException so that it doesn't break on invalid
	assemblies.

svn path=/trunk/mcs/; revision=141962
2009-09-15 13:04:06 +00:00
Marek Habersack 563da7386f 2009-06-15 Marek Habersack <[email protected]>
* TemplateParser.cs: AddAssembliesInBin (1.1 profile) tries to
	load every assembly in order to see if it's a valid one. All bad
	dll image errors are silently ignored. Fixes bug #315816

svn path=/trunk/mcs/; revision=136089
2009-06-15 07:28:44 +00:00
Marek Habersack 9a0870f6a1 Hush compilation warnings
svn path=/trunk/mcs/; revision=135050
2009-05-29 07:48:14 +00:00
Marek Habersack b3a66935ff 2009-05-05 Marek Habersack <[email protected]>
* TemplateParser.cs: PageParserFilterType uses
	HttpApplication.LoadType so that it is able to load the filter
	from App_Code or with not fully qualified type names.

svn path=/trunk/mcs/; revision=133606
2009-05-05 20:47:02 +00:00
Marek Habersack 8aa3c10397 2009-05-04 Marek Habersack <[email protected]>
* ThemeDirectoryBuildProvider.cs: use new AspGenerator constructor
	which takes AspComponentFoundery as its
	parameter. AspGenerator.RootBuilder isn't initialized until after
	the parser is initialized.

	* TemplateControlCompiler.cs: make sure to call
	ProcessGeneratedCode on each instance of ControlBuilder after it's
	fully generated. Fixes bug #500075

	* TemplateBuildProvider.cs: moved the directive regex to
	AspGenerator

	* BaseCompiler.cs: added two internal properties, BaseType and
	DerivedType, which are used in calls to
	ControlBuilder.ProcessGeneratedCode. Fixes bug #500075

	* AspGenerator.cs: implemented a work around for our parser
	limitation which is unable to extract the page/control's base type
	before parsing the actual file contents. This is necessary to
	support ASP.NET MVC's "generic" Inherits attribute. The reason we
	need to find out what the base type is before parsing the file is
	that we need to look at the type's custom attributes to see if a
	root control builder type is specified (which is what ASP.NET MVC
	does) and, if yes, use it instead of the default type. Fixes bug
	#500075

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

	* TemplateParser.cs: take RootBuilder from the associated
	generator.
	Allow the main page directive to be added twice if the parser
	needs it. Used by AspGenerator when extracting the inherited type
	name before actual parsing. Fixes bug #500075

	* FileLevelControlBuilderAttribute.cs,
	FileLevelPageControlBuilder.cs, FileLevelUserControlBuilder.cs:
	implemented

	* ControlBuilder.cs: added a new internal property,
	DataBindingMethod.
	Implemented ProcessGeneratedCode.

svn path=/trunk/mcs/; revision=133500
2009-05-04 13:29:32 +00:00
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 1368d48fa1 2009-04-24 Marek Habersack <[email protected]>
* TemplateParser.cs:
	AddImport ignores null/empty namespaces. Fixes bug #498118

svn path=/trunk/mcs/; revision=132619
2009-04-24 20:55:22 +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 8b9834bc9c 2009-04-22 Marek Habersack <[email protected]>
* TemplateParser.cs: create the imports ArrayList before
	attempting to use it. Fixes bug #497174

svn path=/trunk/mcs/; revision=132366
2009-04-22 14:27:34 +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 1c50013daa 2009-04-21 Marek Habersack <[email protected]>
* SimpleWebHandlerParser.cs: retrieve CompilationSection from the
	appropriate web.config file.

	* BaseParser.cs: moved the internal property VirtualPath from
	TemplateParser to here and added an internal method
	GetConfigSection to retrieve sections from the correct web.config
	file on 2.0 applications. Fixes bug #494245

	* PageParser.cs: use the new GetConfigSection method to retrieve
	ClientTargetSection.

	* TemplateParser.cs: moved the VirtualPath property to
	BaseParser.
	PagesConfig now uses the new GetConfigSection method. Fixes bug
	#494245

svn path=/trunk/mcs/; revision=132300
2009-04-21 17:54:02 +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
Gonzalo Paniagua Javier 871da8a251 2009-02-28 Gonzalo Paniagua Javier <[email protected]>
* BaseParser.cs:
	* PageParser.cs:
	* ControlBuilder.cs:
	* TemplateParser.cs:
	* Page.cs:
	* SimpleWebHandlerParser.cs: settings that have to be in
	machine.config or the root level web.config now call
	GetWebApplicationSection.



svn path=/trunk/mcs/; revision=128273
2009-02-28 20:04:36 +00:00
Marek Habersack ebd1b1f4a0 2009-02-18 Marek Habersack <[email protected]>
* TemplateParser.cs: don't initialize PageParserFilter in
	LoadConfigDefaults, postpone it till the first time the
	PageParserFilter property is accessed.

	* ApplicationFileParser.cs, UserControlParser.cs: make sure
	VirtualPath is set in the constructors.

svn path=/trunk/mcs/; revision=127333
2009-02-18 21:32:17 +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 0d7e4c54f6 LinePragmas default to true if value is not present
svn path=/trunk/mcs/; revision=123142
2009-01-12 22:29:31 +00:00
Marek Habersack 5be8f882cb 2009-01-12 Marek Habersack <[email protected]>
* TemplateParser.cs: line pragmas are on by default. Fixes bug
	#460479

svn path=/trunk/mcs/; revision=123090
2009-01-12 16:50:23 +00:00
Marek Habersack 8b9adb2940 2008-12-11 Marek Habersack <[email protected]>
* TemplateParser.cs: in the 2.0 profile when a custom control is
	registered, do not compile it right away but store the tag name in
	a registry to be compiled at a later stage.

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

	* BaseCompiler.cs: added a new method, InitializeType, to be
	overriden in child classes when any class initialization needs to
	be performed before methods, constructors and fields are created.

	* TemplateControlCompiler.cs: if the parser has any custom
	controls registered, compile them here - in the InitializeType
	method.

svn path=/trunk/mcs/; revision=121262
2008-12-10 23:45:04 +00:00
Marek Habersack fa32fdf482 2008-11-25 Marek Habersack <[email protected]>
* System.Web.dll.sources: added
	System.Web.Compilation/AspComponent.cs

2008-11-25  Marek Habersack  <[email protected]>

	* RootBuilder.cs: use new API in AspComponentFoundry to retrieve
	registered control type.

	* TemplateControlParser.cs: AddControlImports () removed. Its
	functionality is now implemented in ControlBuilder.AddChild in a
	more elegant, fine grained and correct way.

	* TemplateParser.cs: replaced some "" with String.Empty

	* ControlBuilder.cs: AddChild now adds an import for child's
	namespace if the control being added has been registered in the
	web.config file. Possible fix for #447896 and #447898

	* PageParser.cs, MasterPageParser.cs: do not call
	AddControlImports, it no longer exists.

2008-11-25  Marek Habersack  <[email protected]>

	* AspComponentFoundry.cs: GetComponentType methods replaced with
	GetComponent returning an instance of AspComponent which fully
	describes the registered item. Components are cached, indexed by
	full tag name.

	* AspComponent.cs: added

svn path=/trunk/mcs/; revision=119893
2008-11-25 00:51:21 +00:00
Marek Habersack f0d6c8fe78 2008-10-03 Marek Habersack <[email protected]>
* TemplateParser.cs: make sure the generated class name is a valid
	language independent identifier. Fixes bug #431622

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

	* BuildManager.cs: if an assembly fails to build out of a batch of
	files, extract the virtual path that was requested by the client
	and attempt to compile it alone.

svn path=/trunk/mcs/; revision=114732
2008-10-03 07:53:06 +00:00
Marek Habersack 27ece7a9b2 2008-08-31 Marek Habersack <[email protected]>
* TemplateParser.cs: added support for the LinePragmas directive
	attribute.

	* ControlBuilder.cs: if this instance is a TemplateBuilder do not
	call MyNamingContainer, so that our own ContainerType can be used
	as the binding container (if present).

2008-08-31  Marek Habersack  <[email protected]>

	* TemplateControlCompiler.cs: trust builder.BindingContainerType
	in the 2.0+ profile - do not use container properties to detect
	the type.
	Added a helper method, compiled only when DEBUG is defined, to
	generate Console.WriteLine CodeDOM calls.

	* BaseCompiler.cs: add line pragmas only if enabled for the
	current file.


svn path=/trunk/mcs/; revision=111983
2008-08-31 01:41:14 +00:00
Marek Safar f3f05c2055 Warnings cleanup
svn path=/trunk/mcs/; revision=111904
2008-08-29 09:48:05 +00:00
Marek Habersack e16dafc604 2008-06-30 Marek Habersack <[email protected]>
* TemplateParser.cs: use atomic incrementation for automatic class
	name creation to avoid Monitor Enter/Exit.

svn path=/trunk/mcs/; revision=106888
2008-06-30 14:11:12 +00:00
Marek Habersack 4944213e17 2008-06-30 Marek Habersack <[email protected]>
* AspGenerator.cs: hush the warnings and fix invalid type
	comparison.

	* AssemblyBuilder.cs: hush the warnings and add some debugging
	CWLs.

	* AspParser.cs, AppResourcesCompiler.cs, TemplateBuildProvider.cs,
	CachingCompiler.cs, BaseCompiler.cs, TemplateControlCompiler.cs,
	SimpleBuildProvider.cs, BuildManager.cs: hush the warnings

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

	* HtmlForm.cs: hush the warnings

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

	* ObjectDataSourceView.cs, Menu.cs, DataList.cs,
	CustomValidator.cs: hush the warnings

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

	* MachineKeyRegistryStorage.cs: hush the warnings

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

	* SqliteMembershipProvider.cs, SqliteRoleProvider.cs: remove
	unused method

	* SqlRoleProvider.cs, AspNetDBSchemaChecker.cs: hush the warnings

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

	* UserControlParser.cs: hush the warnings and remove unnecessary
	code.

	* ControlCachePolicy.cs, PageParser.cs, ControlBuilder.cs,
	TemplateParser.cs, SimpleWebHandlerParser.cs, TemplateControl.cs,
	ApplicationFileParser.cs: hush the warnings

	* Page.cs: Context is protected internal in .NET 3.5
	Initialize encryption IVs before returning the transform.

	* Control.cs: Hush the warnings.

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

	* HttpRuntime.cs, HttpApplication.cs: hush the warnings

	* HttpContext.cs: Hush the warnings.

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

	* SqliteProfileProvider.cs: remove unused method

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

	* CompilationSection.cs: hush the warnings



svn path=/trunk/mcs/; revision=106886
2008-06-30 13:20:58 +00:00
Marek Habersack cf49b7dc9a unbreak the 1.x build
svn path=/trunk/mcs/; revision=104344
2008-05-28 23:06:15 +00:00
Marek Habersack f0d27ade04 2008-05-28 Marek Habersack <[email protected]>
* TemplateParser.cs: added support for #pragma checksum

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

	* AspParser.cs, AspGenerator.cs, BaseCompiler.cs: added support
	for #pragma checksum

svn path=/trunk/mcs/; revision=104321
2008-05-28 19:42:06 +00:00
Marek Habersack 480a1be6f7 2008-05-07 Marek Habersack <[email protected]>
* TemplateParser.cs: added a stack of include directories, to
	properly resolve file relative paths when the #include file=""
	directive is used. Fixes bug #324536

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

	* AspGenerator.cs: push the include file directory to the parser
	include directory stack and pop it after parsing the include, so
	that the relative file paths are resolved correctly. Fixes bug
	#324536

svn path=/trunk/mcs/; revision=102729
2008-05-07 14:48:46 +00:00
Marek Habersack bf6db8d3c5 2008-04-24 Marek Habersack <[email protected]>
* AspComponentFoundry.cs: added a new GetComponentType overload
	which returns component source and a boolean flag whether the
	control was registered from web.config (2.0).

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

	* RootBuilder.cs: when registering a custom control, add its path
	to the parser dependencies. Fixes bug #377915
	In the 2.0 profile, if the custom control being used was
	registered from web.config and is found in the same directory what
	the file being parsed, throw an exception. This behavior matches
	MS.NET.

	* TemplateParser.cs: added new VirtualPath property, which stores
	the virtual path to the file being parsed.

	* PageParser.cs: set the VirtualPath property in the 2.0 profile
	when constructing the parser.

svn path=/trunk/mcs/; revision=101623
2008-04-23 23:26:04 +00:00
Marek Habersack 80d647dba3 2008-04-23 Marek Habersack <[email protected]>
* TemplateParser.cs: constructs the VirtualPath using the current
	parser's BaseVirtualDirectory. Fixes bug #381715
2008-04-23  Marek Habersack  <[email protected]>

	* VirtualPath.cs: introduced the CurrentRequestDirectory property,
	which returns the virtual directory for the current request. The
	information is taken from either current request's
	CurrentExecutionFilePath property (if not null) or from the path
	set externally (by setting the property or using the appropriate
	VirtualPath constructor). The new property is used to construct
	the correct absolute virtual path in the MakeRooted method. Fixes
	bug #381715.

svn path=/trunk/mcs/; revision=101557
2008-04-23 16:02:53 +00:00
Marek Habersack 4b7f0e3b79 2008-04-19 Marek Habersack <[email protected]>
* SimpleWebHandlerParser.cs: refactoring - move code between
	constructors, reader should be set before initializing the rest of
	the object. Fixes bug #381364

	* TemplateParser.cs: RegisterCustomControl must use absolute
	virtual path when querying the virtual path provider for
	file. Fixes bug #381364
2008-04-19  Marek Habersack  <[email protected]>

	* BuildManager.cs: use absolute virtual path to query the
	VirtualPathProvider for path existence.
	When ASP.NET is self-hosted, force
        non-batch compilation. Fixes bug #380985

	* ILocation.cs: added a new property, FileText.
	
	* Location.cs: added implementation of the ILocation.FileText
	property.

	* ParseException.cs: use the new ILocation.FileText, if defined,
	to get the file source.
	
	* AspGenerator.cs: when TextReader is present, use it to read with
	the VirtualPathProvider to read the file source. Fixes bug #381364

	* AspParser.cs: added a new property FileText to provide the file
	contents which was read in the constructor.


svn path=/trunk/mcs/; revision=101177
2008-04-18 22:35:47 +00:00
Marek Habersack 5ed0259afe 2008-04-14 Marek Habersack <[email protected]>
* SimpleWebHandlerParser.cs, TemplateParser.cs, AspGenerator.cs:
	make sure streams are disposed the way they should be.

svn path=/trunk/mcs/; revision=100685
2008-04-14 21:55:50 +00:00
Marek Habersack 1e9e697cc9 2008-04-07 Marek Habersack <[email protected]>
* VirtualPath.cs: added

2008-04-08  Marek Habersack  <[email protected]>

	* System.Web.dll.sources: added System.Web/VirtualPath.cs

2008-04-08  Marek Habersack  <[email protected]>

	* DefaultVirtualDirectory.cs: fixed the constructor - derive
	virtual directory from the original path.
	AddDirectories and AddFiles combine the virtual paths properly
	now.

2008-04-08  Marek Habersack  <[email protected]>

	* TemplateParser.cs: CodeFile/Src handling uses
	HostingEnvironment.VirtualPathProvider to check for file
	existence.

2008-04-08  Marek Habersack  <[email protected]>

	* TemplateParser.cs: CodeFile/Src handling uses
	HostingEnvironment.VirtualPathProvider to check for file
	existence.

2008-04-08  Marek Habersack  <[email protected]>

	* AppCodeCompiler.cs: VirtualPath used in PhysicalToVirtual.

	* BuildManager.cs: switched to VirtualPath instead of a string
	path in several methods.
	Batch compilation is turned off if we have a custom
	VirtualPathProvider which implements only the VirtualFile and
	falls back to DefaultVirtualDirectory implementation for directory
	access.

	* GenericBuildProvider.cs: AddCodeFile accepts a virtual path.

	* BuildProvider.cs: SetVirtualPath accepts a VirtualPath now.

	* AssemblyBuilder.cs: constructors use the new VirtualPath class
	now.
	AddCodeFile can use the VirtualPathProvider if necessary now.
	BuildAssembly overloads accept VirtualPath parameter instead of a
	string path now.

	* TemplateBuildProvider.cs: GetCodeBehindSource returns the
	virtual path now.

svn path=/trunk/mcs/; revision=100063
2008-04-07 23:00:16 +00:00
Marek Habersack c7396f52b0 2008-04-01 Marek Habersack <[email protected]>
* TemplateControl.cs: ParseControl implemented for the 2.0
	profile.

	* UserControlParser.cs: added support for compiling controls
	without input file (e.g. from TemplateControl.ParseControl).

	* TemplateParser.cs: implemented VirtualPathProvider support for
	registering UserControls.
	If there is no input file path provided, auto-generate the class
	name in the ClassName property getter.

svn path=/trunk/mcs/; revision=99570
2008-04-01 19:47:06 +00:00
Marek Habersack 94dc72ad1d 2008-03-13 Marek Habersack <[email protected]>
* ApplicationHostTest.cs: adjust test for the PrivateBinPath
	change in ApplicationHost.
2008-03-13  Marek Habersack  <[email protected]>

	* HttpApplicationFactory.cs: use HttpApplication.BinDirs to
	create watchers for binary application directories.

	* HttpApplication.cs: 
	Remove the BinDirectories enumerator property, replaced with a
	BinDirectory one returning a string with path to the binary
	directory.
2008-03-13  Marek Habersack  <[email protected]>

	* ApplicationHost.cs: use HttpRuntime.CaseInsensitive when
	checking whether we're running in a case-insensitive environment.
	Revert to the single-bin-dir behavior when setting the
	PrivateBinPath - the directories are sought for in the order given
	by HttpApplication.BinDirs and the first existing directory is set
	as the value of PrivateBinPath. If none of those are found,
	PrivateBinPath defaults to "bin" (and "/app/full/path/bin" in the
	2.0 profile)
2008-03-13  Marek Habersack  <[email protected]>

	* TemplateParser.cs: HttpApplication.BinaryDirectories property no longer
	exists, use HttpApplication.BinDirectory instead.

svn path=/trunk/mcs/; revision=98211
2008-03-13 21:30:12 +00:00
Marek Habersack 6d3e29ed26 2008-03-09 Marek Habersack <[email protected]>
* TemplateControlParser.cs: 2.0 allows controls with extensions
	different than .ascx, as long as they derive from
	System.Web.UI.UserControl and a build provider is available for
	them.

	* TemplateParser.cs: user controls must derive from
	System.Web.UI.UserControl.

svn path=/trunk/mcs/; revision=97816
2008-03-09 17:38:54 +00:00
Marek Habersack a2a7d08ceb 2008-02-26 Marek Habersack <[email protected]>
* TemplateParser.cs: a better error message.

	* ControlBuilder.cs: if one of the parent builders is a
	TemplateBuilder, use it as the naming container and use its
	ContainerType property as the value of the BindingContainerType
	property.
2008-02-26  Marek Habersack  <[email protected]>

	* BuildProviderCollection.cs: be case-insensitive when looking for
	the extension match.
2008-02-26  Marek Habersack  <[email protected]>

	* BuildManager.cs: known file types extensions are now matched
	case-insensitively.

svn path=/trunk/mcs/; revision=96644
2008-02-26 13:56:15 +00:00
Marek Habersack dbd1f99732 2008-02-08 Marek Habersack <[email protected]>
* TemplateParser.cs: make sure that the Src attribute is treated
	correctly in the 2.0 profile. Fixes bug #319016

svn path=/trunk/mcs/; revision=95198
2008-02-07 22:27:11 +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