* 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
* 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
* 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
* BaseCompiler.cs: check for base type globality in all the
location it is used.
2007-12-27 Marek Habersack <[email protected]>
* TemplateParser.cs: check for base type globality also when the
default type is used.
svn path=/trunk/mcs/; revision=91942
* BaseCompiler.cs: Refactoring. Move the provider creation code to
an internal static method, so that other piece of code which need
to create the provider can do it using the same code.
Added setters to several internal properties, so that they can be
shared with derivative classes.
* WebServiceCompiler.cs: adjust to the changes above. Fixes bug
#350398.
* CachingCompiler.cs: adjust to the changes above. Also some
refactoring.
svn path=/trunk/mcs/; revision=91789
* SimpleWebHandlerParser.cs: Default value for Debug is taken from
the compilation config section.
* TemplateParser.cs: Added LoadConfigDefaults here, loads default
value for Debug from the compilation section.
Cache CompilationConfig in methods where it is accessed more than
once.
Default value for Debug in ProcessMainAttributes is taken from the
compilation config.
* PageParser.cs, TemplateControlParser.cs: LoadPagesConfigDefaults
renamed to LoadConfigDefaults.
2007-12-15 Marek Habersack <[email protected]>
* AppCodeCompiler.cs: do not instantiate CodeDomProvider twice.
* BaseCompiler.cs: do not use CreateCompiler () in the 2.0
profile, it's obsoleted. CachingCompiler will use the
CodeDomProvider methods directly in that case.
* WebServiceCompiler.cs: Updated GetCompiledType to acquire
compiler information for the 2.0 profile from system.codeDom.
* CachingCompiler.cs: the Compile overloads do not use the
compiler instance, but call appropriate methods on the
CodeDomProvider instance directly.
Updated some Compile overloads to acquire compiler information for
the 2.0 profile from system.codeDom.
svn path=/trunk/mcs/; revision=91343
* TemplateControlCompiler.cs, WebServiceCompiler.cs,
BuildProvider.cs, BaseCompiler.cs, CachingCompiler.cs: use
HttpApplication.LoadType instead of Type.GetType.
2007-10-15 Marek Habersack <[email protected]>
* ProvidersHelper.cs: use HttpApplication.LoadType instead of
Type.GetType.
2007-10-15 Marek Habersack <[email protected]>
* ObjectDataSourceView.cs: use HttpApplication.LoadType instead of
Type.GetType.
2007-10-15 Marek Habersack <[email protected]>
* ProfileBase.cs: use HttpApplication.LoadType instead of
Type.GetType.
svn path=/trunk/mcs/; revision=87506
* TemplateControlCompiler.cs: TemplateControl is assigned for
controls that are placed within ContentPlaceHolder and not for the
ContentPlaceHolder itself.
No longer add the overriden version of TemplateSourceDirectory to
the generated source, all the work is now done in
Control.TemplateSourceDirectory.
* BaseCompiler.cs: AppRelativeVirtualPath shouldn't end with a
slash, for compatibility with MS.NET
2007-06-09 Marek Habersack <[email protected]>
* TemplateControl.cs: make sure TemplateControl is set to the
current control.
* Control.cs: TemplateControl property goes up the parent chain if
the property isn't defined in the current control.
TemplateSourceDir finally implemented correctly.
2007-06-09 Marek Habersack <[email protected]>
* ControlTest.cs: enabled two tests that hadn't been working
before.
svn path=/trunk/mcs/; revision=79021
* AppCodeCompiler.cs: yet another method of detecting if we have a
custom profile.
* BaseCompiler.cs: as above
* AspComponentFoundry.cs: implemented delayed loading of control
assemblies. Fixes bug #81058.
svn path=/trunk/mcs/; revision=75910
attribute. Fixed part of bug #81399.
* BaseCompiler.cs: On 2.0, when ClassName attribute contains namespace
then use it instead of the default ASP namespace. Fixes part of bug
#81399.
svn path=/trunk/mcs/; revision=75909
* BaseCompiler.cs: don't look at the number of profile properties
when deciding if we have a custom profile. It is possible to have
a profile that just inherits from a base class and does not list
any custom properties. Fixes bug #81396.
* AppCodeCompiler.cs: as above
svn path=/trunk/mcs/; revision=75908
* BaseCompiler.cs: display the source of the file in which the
error actually happened if the file exists, or the unit
otherwise.
svn path=/trunk/mcs/; revision=75482
* TemplateParser.cs: Added support for the CodeFileBaseClass directive. Fixes bug #81132
2007-03-21 Marek Habersack <[email protected]>
* BaseCompiler.cs: cast 'this' to CodeFileBaseClass in
AssignAppRelativeVirtualPath if the attribute was defined.
svn path=/trunk/mcs/; revision=74764
* 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
* AppResourceFilesCollection.cs: added separate constructor for
local resources handling.
* TemplateControlCompiler.cs: request the local resource object
with proper virtual path.
* BaseCompiler.cs: added code to assing AppRelativeVirtualPath
property in the page/control constructor.
* AppResourcesCompiler.cs: does not require specifying manually
whether it's a global or local resource compiler anymore. New
constructors take care of that.
Changed to compile local resources on demand, when a control/page
is parsed.
2007-03-13 Marek Habersack <[email protected]>
* AppResourceFilesCollection.cs: added separate constructor for
local resources handling.
* TemplateControlCompiler.cs: request the local resource object
with proper virtual path.
* BaseCompiler.cs: added code to assing AppRelativeVirtualPath
property in the page/control constructor.
* AppResourcesCompiler.cs: does not require specifying manually
whether it's a global or local resource compiler anymore. New
constructors take care of that.
Changed to compile local resources on demand, when a control/page
is parsed.
2007-03-13 Marek Habersack <[email protected]>
* TemplateControl.cs: implement AppRelativeVirtualPath. Closes bug
#80634.
svn path=/trunk/mcs/; revision=74159
* BuildManager.cs, BaseCompiler.cs: CodeAssemblies is a collection
of Assembly instances, not strings.
* CachingCompiler.cs: make sure items in the CodeAssemblies and
TopLevelAssemblies are really instances of the Assembly class
before trying to use them.
CodeAssemblies is a collection of Assembly instances, not
strings.
* AppCodeCompiler.cs: on MS.NET CodeAssemblies is a collection of
assemblies, not paths to assemblies.
svn path=/trunk/mcs/; revision=74104
CreateProfileProperty and InternalCreatePageProperty to
BaseCompiler from PageCompiler.
* GlobalAsaxCompiler.cs: generate the Profile property for the
Global_asax class.
svn path=/trunk/mcs/; revision=74036
* BaseCompiler.cs: for 2.0, emit the correct namespace and class
names in the case where you use "NS.ClassName" in the Inherits
attribute. Fixes bug #78135.
svn path=/trunk/mcs/; revision=59706
* BaseCompiler.cs (GetCompiledType): fall back to CodeDomProvider
if system.web/compilation doesn't list a compiler for our
language.
svn path=/trunk/mcs/; revision=58493
* 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
* System.Web.Configuration_2.0/Compiler.cs:
* System.Web.Configuration_2.0/CompilerCollection.cs: removed
compatibility code.
* System.Web.Configuration_2.0/BuildProviderCollection.cs: add
GetProviderForExtension().
* System.Web.UI/IThemeResolutionService.cs: this is now added to the
sources file, but some other stuff does not compile yet as the
interface changed after the beta.
* System.Web.UI/ObjectConverter.cs: removed extra attribute.
* System.Web.UI/ObjectStateFormatter.cs: add IStateFormatter for 2.0.
* System.Web.UI/ICallbackEventHandler.cs: update the interface, but
commented the 'good' stuff out, since other files need to be fixed
too.
* System.Web.dll.sources: add new files.
* System.Web.Configuration/CompilationConfiguration.cs:
* System.Web.Configuration/CompilationConfigurationHandler.cs: only
compile these for pre-2.0 assemblies.
* System.Web.Hosting/DefaultVirtualPathProvider.cs: add some
comments/TODO.
* System.Web.Hosting/HostingEnvironment.cs: initialize the
default value for VirtualPathProvider.
* System.Web.Compilation/CompilerType.cs: implemented.
* System.Web.Compilation/AssemblyBuilder.cs: implemented most of it.
* System.Web.Compilation/WebServiceCompiler.cs:
* System.Web.Compilation/CachingCompiler.cs: update 2.0 compiler
instance creation code.
* System.Web.Compilation/ClientBuildManager.cs: implemented some of
its methods. Not yet ready.
* System.Web.Compilation/BuildManager.cs: the more interesting methods
are implemented now.
* System.Web.Compilation/BaseCompiler.cs: delete the temporary files
in case of error.
* System.Web.Compilation/BuildProvider.cs: implemented the
Get*Compiler* protected methods.
svn path=/trunk/mcs/; revision=56781
* System.Web.Hosting/ApplicationHost.cs:
* System.Web.Compilation/BaseCompiler.cs: set the domain's DynamicBase
property instead of guessing it in BaseCompiler.
svn path=/trunk/mcs/; revision=49847
* BaseCompiler.cs: when the OutputAssembly is null, we can still have
the assembly file there and be able to load it. Thanks to Rogerio and
Mark.
svn path=/trunk/mcs/; revision=45440
* System.Web.Configuration/CompilationConfigurationHandler.cs: ensure
TempDirectory is not empty before assigning it. Don't mangle the
assembly names provided.
* System.Web.Configuration/CompilationConfiguration.cs: use DynamicBase
as the temp directory instead of Path.GetTempPath.
* System.Web.UI/SimpleWebHandlerParser.cs:
* System.Web.UI/TemplateParser.cs: always get the location (full path)
for assemblies, even the ones from the GAC.
* System.Web.Compilation/BaseCompiler.cs: check that DynamicBase
directory exists before creating the TempFileCollection.
The changes related to assembly names fix bug number #74500.
svn path=/trunk/mcs/; revision=43462
* BaseCompiler.cs: do the bridge of Explicit/Strict attributes from
@Page/@Control directives to CodeDOM (VB.NET support)
svn path=/trunk/mcs/; revision=43356
* System.Web.Compilation/BaseCompiler.cs:
* System.Web.Compilation/CachingCompiler.cs:
* System.Web.Compilation/WebServiceCompiler.cs:
* System.Web.UI/SimpleWebHandlerParser.cs: correctly cache Type instead
of the assembly for ashx/asmx. Otherwise we need to open the file and
check for the class name in there. Thanks to Ben for pointing this out.
svn path=/trunk/mcs/; revision=33382
* System.Web/TraceContext.cs: added internal HaveTrace property whose
value is true when the page has a Trace attribute.
* System.Web.Handlers/TraceHandler.cs: check that trace is enabled or
throw.
* System.Web.UI/Page.cs: added additional checks for saving/displaying
trace data.
* System.Web.UI/PageParser.cs: removed checks for trace enabled in
configuration files.
Thanks to David Taylor for most of these patch and the tests.
svn path=/trunk/mcs/; revision=30808
* System.Web.Compilation/BaseCompiler.cs: try getting the Type from
the cache before doing the real work. Remove temporary files right after
successful compilation.
* System.Web.Compilation/CachingCompiler.cs: added GetTypeFromCache.
* System.Web.Compilation/UserControlCompiler.cs: nothing interesting.
* System.Web.Compilation/WebServiceCompiler.cs: try getting the Type
from the cache before doing anything else. Remove temp files on
sucessful compilation.
* System.Web.UI/SimpleWebHandlerParser.cs: implemented
GetCompiledTypeFromCache. When we read the default directive, check the
cache for the Type and if present, don't keep reading and store the
type found.
* System.Web.UI/WebHandlerParser.cs:
* System.Web.UI/WebServiceParser.cs: try GetCompiledTypeFromCache
before actually compiling.
svn path=/trunk/mcs/; revision=29652
* BaseCompiler.cs: dynamicBase is now protected. Check
MONO_ASPNET_NODELETE here.
* TemplateControlCompiler.cs: if the type is not known but has a
TypeConverter, invoke ConvertFromString in the generated code.
* WebServiceCompiler.cs: it used a hardcoded C# compiler, now it gets
the compiler from the configuration. Also handle MONO_ASPNET_NODELETE.
* CachingCompiler.cs: updated compilation of web services and simple
web handlers.
svn path=/trunk/mcs/; revision=29255
* System.Web.Compilation/BaseCompiler.cs: use DynamicBase for the output
assemblies.
* System.Web.Configuration/CompilationConfiguration.cs: a null value is
ok for TempDirectory.
* System.Web.Hosting/AppDomainFactory.cs: set the Dynamic base for the
AppDomain.
Fixes bug #57726.
svn path=/trunk/mcs/; revision=27329
* System.Web/HttpApplicationFactory.cs: fixlet for session events hook.
* System.Web.Compilation/AspGenerator.cs: handle more possible errors
in global.asax file.
* System.Web.Compilation/BaseCompiler.cs: added utility methods for
creating <object> related properties and fields.
* System.Web.Compilation/GlobalAsaxCompiler.cs: keep around applications
and session scope objects builders. Also a list of imports and
assemblies added in global.asax.
* System.Web.Compilation/TemplateControlCompiler.cs: use base class
methods for <object> stuff.
* System.Web.UI/ApplicationFileParser.cs: check for error in directives.
Use GlobalAsaxCompiler.CompileApplicationType for compiling.
* System.Web.UI/ObjectTagBuilder.cs: load the Type and check for errors.
* System.Web.UI/TemplateParser.cs: add assemblies and imports from
global.asax.
Now we properly create accessors for session and application objects in
the application itself, pages and controls. First step for fixing
bug #53387.
svn path=/trunk/mcs/; revision=22584
attribute build a PartialCachingControl in the parents __Build method.
* BaseCompiler.cs: Add a method for adding class attributes to the
class.
* UserControlCompiler.cs: If caching is enabled on a user control
add the PartialCachingAttribute to it.
svn path=/trunk/mcs/; revision=22034
* System.Web.dll.sources: new files in System.Web.Configuration.
* System.Web.Configuration/CompilationConfiguration.cs:
* System.Web.Configuration/CompilationConfigurationHandler.cs:
* System.Web.Configuration/CompilerCollection.cs:
* System.Web.Configuration/WebCompiler.cs: new files that process and
store system.web/compilation info (compilers + assemblies).
* System.Web.Configuration/HttpHandlersSectionHandler.cs: added option
for an attribute to be empty.
* System.Web.UI/BaseParser.cs: added CompilationConfig property.
* System.Web.UI/TemplateParser.cs:
* System.Web.UI/SimpleWebHandlerParser.cs: added CompilationConfig
property. Don't hardcode assembly names any more, assemblies in bin
are added depending on the configuration. The default language is
also taken from the configuration.
* System.Web.Compilation/BaseCompiler.cs: now gets the CodeCompiler
from configuration files.
In short, this changes make our ASP.NET support any language
that has CodeDom CodeCompiler and CodeGenerator.
VB.NET currently fails because of its buggy handling of options.
svn path=/trunk/mcs/; revision=19035