Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / xsp / System / Web / UI / BaseParser.cs / 1 / BaseParser.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*
* Implements the ASP.NET template parser
*
* Copyright (c) 1998 Microsoft Corporation
*/
/*********************************
Class hierarchy
BaseParser
DependencyParser
TemplateControlDependencyParser
PageDependencyParser
UserControlDependencyParser
MasterPageDependencyParser
TemplateParser
BaseTemplateParser
TemplateControlParser
PageParser
UserControlParser
MasterPageParser
PageThemeParser
ApplicationFileParser
**********************************/
namespace System.Web.UI {
using System;
using System.Collections;
using System.Web.Hosting;
using System.Web.Util;
using System.Text.RegularExpressions;
using System.Web.RegularExpressions;
using System.Security.Permissions;
// Internal interface for Parser that have exteranl assembly dependency.
internal interface IAssemblyDependencyParser {
ICollection AssemblyDependencies { get; }
}
///
/// [To be supplied.]
///
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)]
public class BaseParser {
// The directory used for relative path calculations
private VirtualPath _baseVirtualDir;
internal VirtualPath BaseVirtualDir {
get { return _baseVirtualDir; }
}
// The virtual path to the file currently being processed
private VirtualPath _currentVirtualPath;
internal VirtualPath CurrentVirtualPath {
get { return _currentVirtualPath; }
set {
_currentVirtualPath = value;
// Can happen in the designer
if (value == null) return;
_baseVirtualDir = value.Parent;
}
}
internal string CurrentVirtualPathString {
get { return System.Web.VirtualPath.GetVirtualPathString(CurrentVirtualPath); }
}
internal readonly static Regex tagRegex = new TagRegex();
internal readonly static Regex directiveRegex = new DirectiveRegex();
internal readonly static Regex endtagRegex = new EndTagRegex();
internal readonly static Regex aspCodeRegex = new AspCodeRegex();
internal readonly static Regex aspExprRegex = new AspExprRegex();
internal readonly static Regex databindExprRegex = new DatabindExprRegex();
internal readonly static Regex commentRegex = new CommentRegex();
internal readonly static Regex includeRegex = new IncludeRegex();
internal readonly static Regex textRegex = new TextRegex();
// Regexes used in DetectSpecialServerTagError
internal readonly static Regex gtRegex = new GTRegex();
internal readonly static Regex ltRegex = new LTRegex();
internal readonly static Regex serverTagsRegex = new ServerTagsRegex();
internal readonly static Regex runatServerRegex = new RunatServerRegex();
/*
* Turns relative virtual path into absolute ones
*/
internal VirtualPath ResolveVirtualPath(VirtualPath virtualPath) {
return VirtualPathProvider.CombineVirtualPathsInternal(CurrentVirtualPath, virtualPath);
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*
* Implements the ASP.NET template parser
*
* Copyright (c) 1998 Microsoft Corporation
*/
/*********************************
Class hierarchy
BaseParser
DependencyParser
TemplateControlDependencyParser
PageDependencyParser
UserControlDependencyParser
MasterPageDependencyParser
TemplateParser
BaseTemplateParser
TemplateControlParser
PageParser
UserControlParser
MasterPageParser
PageThemeParser
ApplicationFileParser
**********************************/
namespace System.Web.UI {
using System;
using System.Collections;
using System.Web.Hosting;
using System.Web.Util;
using System.Text.RegularExpressions;
using System.Web.RegularExpressions;
using System.Security.Permissions;
// Internal interface for Parser that have exteranl assembly dependency.
internal interface IAssemblyDependencyParser {
ICollection AssemblyDependencies { get; }
}
///
/// [To be supplied.]
///
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)]
public class BaseParser {
// The directory used for relative path calculations
private VirtualPath _baseVirtualDir;
internal VirtualPath BaseVirtualDir {
get { return _baseVirtualDir; }
}
// The virtual path to the file currently being processed
private VirtualPath _currentVirtualPath;
internal VirtualPath CurrentVirtualPath {
get { return _currentVirtualPath; }
set {
_currentVirtualPath = value;
// Can happen in the designer
if (value == null) return;
_baseVirtualDir = value.Parent;
}
}
internal string CurrentVirtualPathString {
get { return System.Web.VirtualPath.GetVirtualPathString(CurrentVirtualPath); }
}
internal readonly static Regex tagRegex = new TagRegex();
internal readonly static Regex directiveRegex = new DirectiveRegex();
internal readonly static Regex endtagRegex = new EndTagRegex();
internal readonly static Regex aspCodeRegex = new AspCodeRegex();
internal readonly static Regex aspExprRegex = new AspExprRegex();
internal readonly static Regex databindExprRegex = new DatabindExprRegex();
internal readonly static Regex commentRegex = new CommentRegex();
internal readonly static Regex includeRegex = new IncludeRegex();
internal readonly static Regex textRegex = new TextRegex();
// Regexes used in DetectSpecialServerTagError
internal readonly static Regex gtRegex = new GTRegex();
internal readonly static Regex ltRegex = new LTRegex();
internal readonly static Regex serverTagsRegex = new ServerTagsRegex();
internal readonly static Regex runatServerRegex = new RunatServerRegex();
/*
* Turns relative virtual path into absolute ones
*/
internal VirtualPath ResolveVirtualPath(VirtualPath virtualPath) {
return VirtualPathProvider.CombineVirtualPathsInternal(CurrentVirtualPath, virtualPath);
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CorrelationScope.cs
- KeyBinding.cs
- TextFormatter.cs
- MaskedTextProvider.cs
- ToolStripPanelRenderEventArgs.cs
- PromptStyle.cs
- ReturnEventArgs.cs
- ExpressionsCollectionEditor.cs
- HtmlInputFile.cs
- Bits.cs
- CodeDomSerializer.cs
- ConnectionStringsSection.cs
- Attributes.cs
- TargetPerspective.cs
- DataServiceQueryProvider.cs
- TextUtf8RawTextWriter.cs
- Compiler.cs
- Positioning.cs
- MetabaseServerConfig.cs
- ResourcesBuildProvider.cs
- InspectionWorker.cs
- HtmlEmptyTagControlBuilder.cs
- ToolboxItemCollection.cs
- PaperSource.cs
- WindowInteractionStateTracker.cs
- LinqDataSourceDisposeEventArgs.cs
- XslAst.cs
- BoundsDrawingContextWalker.cs
- TrackBar.cs
- HashAlgorithm.cs
- SQLInt64.cs
- InstanceValue.cs
- AnnotationResourceChangedEventArgs.cs
- DataBinder.cs
- Menu.cs
- EntityDataSourceContainerNameItem.cs
- TypeNameConverter.cs
- Parser.cs
- PageHandlerFactory.cs
- DataGridViewLinkCell.cs
- Rect3DConverter.cs
- ReaderWriterLockSlim.cs
- FieldDescriptor.cs
- SchemaSetCompiler.cs
- _BufferOffsetSize.cs
- PropertyKey.cs
- DescendentsWalkerBase.cs
- BitmapMetadataEnumerator.cs
- CompilerState.cs
- DataGridTextBoxColumn.cs
- DropShadowBitmapEffect.cs
- AssemblyCacheEntry.cs
- LinkArea.cs
- mediaeventshelper.cs
- SlotInfo.cs
- Span.cs
- EntitySqlQueryBuilder.cs
- OracleTransaction.cs
- BamlReader.cs
- BufferedReadStream.cs
- ColorBlend.cs
- ImageField.cs
- XmlSchemaIdentityConstraint.cs
- RepeaterItemCollection.cs
- MonikerBuilder.cs
- ArgumentException.cs
- DataViewManagerListItemTypeDescriptor.cs
- ExecutionContext.cs
- HitTestDrawingContextWalker.cs
- ScopeElement.cs
- EntityType.cs
- GetUserPreferenceRequest.cs
- CommonObjectSecurity.cs
- securitycriticaldataformultiplegetandset.cs
- StringFormat.cs
- BuildProviderAppliesToAttribute.cs
- Codec.cs
- CollectionTypeElement.cs
- SqlBooleanMismatchVisitor.cs
- SamlSecurityTokenAuthenticator.cs
- TextTreeUndoUnit.cs
- Accessible.cs
- LogArchiveSnapshot.cs
- GB18030Encoding.cs
- CodeMethodInvokeExpression.cs
- MultipartContentParser.cs
- FileDialog.cs
- HttpRuntime.cs
- StructuredProperty.cs
- FilteredDataSetHelper.cs
- Compiler.cs
- ConfigurationValidatorBase.cs
- MsdtcWrapper.cs
- TransportSecurityProtocolFactory.cs
- Matrix3DStack.cs
- SourceFileInfo.cs
- WebServiceData.cs
- PenThread.cs
- _CacheStreams.cs
- ControllableStoryboardAction.cs