* 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
* Makefile (TEST_RESOURCE_FILES): added
Test/mainsoft/NunitWebResources/App_GlobalResources/Resource1.resx
and
Test/mainsoft/NunitWebResources/TagWithExpressionWithinAttribute.aspx
2010-01-19 Marek Habersack <[email protected]>
* TemplateControlCompilerTest.cs: added test for bug #568631
2010-01-19 Marek Habersack <[email protected]>
* AspGenerator.cs: modified the runatServer regex to correctly
match embedded server tags which end in a sequence like: "%>"/>
Fixes bug #568631
svn path=/trunk/mcs/; revision=149855
* AspParser.cs: PlainText should calculate the boundaries of
text using character offset, not line offset. Fixes bug #562286
InternalLineOffset and Internal properties need not exist.
* AspGenerator.cs: AspParser inner parser constructor takes 5
parameters now - accepts character offset of the current outer
parser's position.
2009-12-14 Marek Habersack <[email protected]>
* Makefile (TEST_RESOURCE_FILES): added
Test/mainsoft/NunitWebResources/NestedParserFileText.aspx
svn path=/trunk/mcs/; revision=148378
- 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
* Makefile (TEST_RESOURCE_FILES): added
Test/mainsoft/NunitWebResources/DuplicateControlsInClientComment.aspx
2009-08-18 Marek Habersack <[email protected]>
* ControlBuilder.cs: Location property makes a copy of assigned
ILocation now.
2009-08-18 Marek Habersack <[email protected]>
* AspParser.cs: added a constructor which creates an internal
parser, nested within the outer one, and adjusts its ILocation
members to report correct locations in the outer parser for better
error reporting. Inner parser also returns the outer's FileText,
if available.
* AspGenerator.cs: restored part of r138474 reverted in r138657,
r138658 and r138659 to fix bug #525104
BuilderLocation creates a copy of Location for its own use (since
the ILocation passed is actually AspParser, the line numbers
change between creating a BuilderLocation and using its Location
member).
The end of tag, expression and client comment regular expressions
now use lazy quantifiers. This fixes bugs #525104 and #517656
Client side comment blocks aren't ignored anymore, they are parsed
just as the other parts of the document. Fixes bug #524358
2009-08-18 Marek Habersack <[email protected]>
* JavaScriptSerializer.cs: read converters from the config only if
explicitly requested.
2009-08-18 Marek Habersack <[email protected]>
* TemplateControlCompilerTest.cs: added test for bug #525104 and
improved test for bug #517656
svn path=/trunk/mcs/; revision=140161
* AspGenerator.cs:
Check for duplicate control IDs at the end of parse. Fixes bug
#524358
2009-07-23 Marek Habersack <[email protected]>
* ControlBuilder.cs: added an internal helper property
IsNamingContainer.
2009-07-23 Marek Habersack <[email protected]>
* HttpException.cs: if an exception is processed which refers to
internal "files", don't show the internal name.
svn path=/trunk/mcs/; revision=138521
* Makefile (TEST_RESOURCE_FILES): added
Test/mainsoft/NunitWebResources/FullTagsInText.aspx
Test/mainsoft/NunitWebResources/TagsExpressionsAndCommentsInText.aspx
2009-07-23 Marek Habersack <[email protected]>
* AspGenerator.cs: TextParsed takes a different approach to
post-processing text blocks now. It applies, in order, client-side
comment, tag and expression regular expressions to the text
and splits it into blocks of different types. Then the blocks are
processed accordingly.
svn path=/trunk/mcs/; revision=138474
* AspGenerator.cs: TextParsed must remove client-side comments
from the passed text before attempting to parse the text for
server side controls and expressions. Fixes bug #517656
2009-06-30 Marek Habersack <[email protected]>
* TemplateControlCompilerTest.cs: added test for bug #517656
2009-06-30 Marek Habersack <[email protected]>
* Makefile (TEST_RESOURCE_FILES): added
Test/mainsoft/NunitWebResources/ServerControlInClientSideComment.aspx
2009-06-30 Marek Habersack <[email protected]>
* NunitWebResources/ServerControlInClientSideComment.aspx: added
svn path=/trunk/mcs/; revision=137137
* AspGenerator.cs: CreateRootBuilder quits when root builder
already exist. This can happen when recursively parsing an include
file. Fixes bug #512028
svn path=/trunk/mcs/; revision=136096
* AspGenerator.cs: if plain text is parsed and it contains
server-side controls, parse and process them. Fixes bug #508888
2009-06-04 Marek Habersack <[email protected]>
* Makefile (TEST_RESOURCE_FILES): added
Test/mainsoft/NunitWebResources/ServerSideControlsInScriptBlock.aspx
2009-06-04 Marek Habersack <[email protected]>
* TemplateControlCompilerTest.cs: added test for bug #508888
svn path=/trunk/mcs/; revision=135486
* AspGenerator.cs: before including a file specified with the
<!--#include file="" --> directive, check if it's within the
current application's root.
svn path=/trunk/mcs/; revision=134747
* Makefile (TEST_RESOURCE_FILES): added
Test/mainsoft/NunitWebResources/ExpressionInListControl.aspx
2009-05-10 Marek Habersack <[email protected]>
* AspGenerator.cs: keep processing the tag if it is not a server
one and contains expressions and no code render blocks.
2009-05-10 Marek Habersack <[email protected]>
* TemplateControlCompilerTest.cs: added a test for expressions in
list control items.
svn path=/trunk/mcs/; revision=133861
* BuildManager.cs: RemoveFailedAssemblies wraps the compilation
exception to be rethrown in a HttpException instance.
* AspGenerator.cs: create a Location and pass it to the parser
before calling AddDirective from GetInheritedType, so that we get
meaningful exception messages with source, line information etc.
svn path=/trunk/mcs/; revision=133568
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* AspGenerator.cs: implemented a work around which allows the
server controls embedded in client tag attributes to be parsed and
compiled.
svn path=/trunk/mcs/; revision=123397
* CodeBuilder.cs, RootBuilder.cs, CollectionBuilder.cs: updates
related to ControlBuilder cleanup.
* ControlBuilder.cs: code cleanup - no field should be visible
outside the class unless it's a constant or a read-only field.
2009-01-13 Marek Habersack <[email protected]>
* XmlBuilder.cs: updates related to ControlBuilder cleanup.
2009-01-13 Marek Habersack <[email protected]>
* TemplateControlCompiler.cs, AspGenerator.cs, BaseCompiler.cs,
GlobalAsaxCompiler.cs, PageThemeCompiler.cs: updates related to
ControlBuilder cleanup.
svn path=/trunk/mcs/; revision=123229
* LiteralStringControlBuilder.cs: added. Fixes bug #461214
* ControlBuilder.cs: added location tracking for literal string
children. Fixes bug #461214
* TemplateParser.cs: line pragmas are on by default. Fixes bug
#460479
2009-01-12 Marek Habersack <[email protected]>
* TemplateControlCompiler.cs: the LiteralStringControlBuilder
class is now used to track the location of the plain strings being
output to the generated code. Fixes bug #461214
* AspGenerator.cs: AppendLiteralString is called with the current
parser location as one of its parameters in FlushText (). Fixes
bug #461214
2009-01-12 Marek Habersack <[email protected]>
* System.Web.dll.sources: added
System.Web.UI/LiteralStringControlBuilder.cs
svn path=/trunk/mcs/; revision=123106
* AspGenerator.cs: ignore whitespace only if it's between
CodeRender blocks, not between DataBinding and
CodeRenderExpression.
svn path=/trunk/mcs/; revision=113844
* ControlBuilder.cs: CreatePropertyBuilder now correctly processes
property names with prefixes (e.g. 'prefix:PropertyName').
Original, parsed, tag name is stored to properly handle closing
tags.
2008-09-01 Marek Habersack <[email protected]>
* AspGenerator.cs:
CloseControl uses ControlBuilder's OriginalTagName property,
should the property/tag name be prefixed with 'prefix:'
svn path=/trunk/mcs/; revision=112003
* TemplateControl.cs: changed the way in which ParseControl is
implemented for the 2.0+ profile. Still not quite there, but
better and closer to .NET
2008-09-01 Marek Habersack <[email protected]>
* BaseCompiler.cs: AssignAppRelativeVirtualPath works with
null/empty parser.InputFile now.
* AspGenerator.cs: AddTypeToCache works checks whether inputFile
is null or empty and does not assume the dependencies ArrayList is
present.
* CachingCompiler.cs: expect the dependencies ArrayList to be null
or empty.
svn path=/trunk/mcs/; revision=111998
* 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