mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-17 11:21:39 -10:00
* 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
64 lines
1.8 KiB
C#
64 lines
1.8 KiB
C#
//
|
|
// Authors:
|
|
// Marek Habersack ([email protected])
|
|
//
|
|
// (C) 2010 Novell, Inc (http://www.novell.com)
|
|
//
|
|
|
|
//
|
|
// Permission is hereby granted, free of charge, to any person obtaining
|
|
// a copy of this software and associated documentation files (the
|
|
// "Software"), to deal in the Software without restriction, including
|
|
// without limitation the rights to use, copy, modify, merge, publish,
|
|
// distribute, sublicense, and/or sell copies of the Software, and to
|
|
// permit persons to whom the Software is furnished to do so, subject to
|
|
// the following conditions:
|
|
//
|
|
// The above copyright notice and this permission notice shall be
|
|
// included in all copies or substantial portions of the Software.
|
|
//
|
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
//
|
|
using System;
|
|
|
|
namespace System.Web.UI
|
|
{
|
|
sealed class MainDirectiveAttribute <T>
|
|
{
|
|
string unparsedValue;
|
|
T value;
|
|
bool isExpression;
|
|
bool isDataBound;
|
|
|
|
public string UnparsedValue {
|
|
get { return unparsedValue; }
|
|
}
|
|
|
|
public bool IsExpression {
|
|
get { return isExpression; }
|
|
}
|
|
|
|
public T Value {
|
|
get { return value; }
|
|
}
|
|
|
|
public MainDirectiveAttribute (string value)
|
|
{
|
|
this.unparsedValue = value;
|
|
if (value != null)
|
|
this.isExpression = BaseParser.IsExpression (value);
|
|
}
|
|
|
|
public MainDirectiveAttribute (T value, bool unused)
|
|
{
|
|
this.value = value;
|
|
}
|
|
}
|
|
}
|