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 / ApplicationFileParser.cs / 1 / ApplicationFileParser.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*
* Implements the ASP.NET template parser
*
* Copyright (c) 1998 Microsoft Corporation
*/
namespace System.Web.UI {
using System;
using System.Collections;
using System.IO;
using System.Web.Util;
using System.Web.Compilation;
using Debug=System.Web.Util.Debug;
/*
* Parser for global.asax files
*/
internal sealed class ApplicationFileParser : TemplateParser {
internal ApplicationFileParser() {}
internal override Type DefaultBaseType { get { return typeof(System.Web.HttpApplication); } }
internal override bool FApplicationFile { get { return true; } }
internal const string defaultDirectiveName = "application";
internal override string DefaultDirectiveName {
get { return defaultDirectiveName; }
}
internal override void CheckObjectTagScope(ref ObjectTagScope scope) {
// Map the default scope to AppInstance
if (scope == ObjectTagScope.Default)
scope = ObjectTagScope.AppInstance;
// Check for invalid scopes
if (scope == ObjectTagScope.Page) {
throw new HttpException(
SR.GetString(SR.Page_scope_in_global_asax));
}
}
}
}
// 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
*/
namespace System.Web.UI {
using System;
using System.Collections;
using System.IO;
using System.Web.Util;
using System.Web.Compilation;
using Debug=System.Web.Util.Debug;
/*
* Parser for global.asax files
*/
internal sealed class ApplicationFileParser : TemplateParser {
internal ApplicationFileParser() {}
internal override Type DefaultBaseType { get { return typeof(System.Web.HttpApplication); } }
internal override bool FApplicationFile { get { return true; } }
internal const string defaultDirectiveName = "application";
internal override string DefaultDirectiveName {
get { return defaultDirectiveName; }
}
internal override void CheckObjectTagScope(ref ObjectTagScope scope) {
// Map the default scope to AppInstance
if (scope == ObjectTagScope.Default)
scope = ObjectTagScope.AppInstance;
// Check for invalid scopes
if (scope == ObjectTagScope.Page) {
throw new HttpException(
SR.GetString(SR.Page_scope_in_global_asax));
}
}
}
}
// 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
- SchemaComplexType.cs
- ResourceAttributes.cs
- Attributes.cs
- documentsequencetextview.cs
- MarshalDirectiveException.cs
- InheritanceContextHelper.cs
- PageVisual.cs
- GreenMethods.cs
- OdbcException.cs
- DataGridViewHeaderCell.cs
- CommunicationObjectManager.cs
- TabItemAutomationPeer.cs
- MemberPath.cs
- JsonUriDataContract.cs
- Msec.cs
- DataGridPagingPage.cs
- RegexStringValidatorAttribute.cs
- HistoryEventArgs.cs
- ToolboxDataAttribute.cs
- AlternateView.cs
- BrushConverter.cs
- SrgsToken.cs
- HttpListenerException.cs
- ViewKeyConstraint.cs
- SelectedDatesCollection.cs
- OrderedHashRepartitionStream.cs
- DataGridViewRow.cs
- _UncName.cs
- WebBrowserDocumentCompletedEventHandler.cs
- _AuthenticationState.cs
- ManipulationDeltaEventArgs.cs
- Registry.cs
- ListViewDeletedEventArgs.cs
- NamedPipeChannelListener.cs
- PersonalizableAttribute.cs
- ColumnMapProcessor.cs
- JsonXmlDataContract.cs
- DigitShape.cs
- XmlSchemaSimpleContentRestriction.cs
- InheritanceContextChangedEventManager.cs
- DBSchemaRow.cs
- TextElementCollection.cs
- TextDpi.cs
- PenThread.cs
- GetUserPreferenceRequest.cs
- WebPartConnectionsEventArgs.cs
- CodeTypeReferenceExpression.cs
- ScriptingRoleServiceSection.cs
- XmlSerializerNamespaces.cs
- GroupBox.cs
- CharacterShapingProperties.cs
- WinEventWrap.cs
- DataSourceView.cs
- ToolStripPanelRenderEventArgs.cs
- TimeSpan.cs
- Parameter.cs
- TableDetailsCollection.cs
- ProgressPage.cs
- StyleBamlRecordReader.cs
- ColumnWidthChangingEvent.cs
- SecurityElement.cs
- ClearTypeHintValidation.cs
- RelationshipSet.cs
- DataBoundControlAdapter.cs
- SmiConnection.cs
- SqlConnectionFactory.cs
- ColumnHeader.cs
- TagNameToTypeMapper.cs
- ContentTextAutomationPeer.cs
- IOException.cs
- ArgumentNullException.cs
- InvalidFilterCriteriaException.cs
- DocumentCollection.cs
- DataTableExtensions.cs
- SchemaImporterExtensionElementCollection.cs
- TextEditorCopyPaste.cs
- MailDefinition.cs
- LayoutEngine.cs
- SqlStatistics.cs
- DoubleKeyFrameCollection.cs
- XmlSchemaCollection.cs
- ApplyImportsAction.cs
- DataObjectAttribute.cs
- ProxyWebPart.cs
- UnhandledExceptionEventArgs.cs
- ReferenceEqualityComparer.cs
- RawStylusInputCustomDataList.cs
- ToolZone.cs
- ToolboxComponentsCreatingEventArgs.cs
- HttpClientProtocol.cs
- TextEndOfLine.cs
- SelectionPatternIdentifiers.cs
- AccessorTable.cs
- XmlIlTypeHelper.cs
- GPRECT.cs
- WindowsRichEditRange.cs
- PresentationTraceSources.cs
- DoubleAnimation.cs
- DelegateSerializationHolder.cs
- WebServiceFaultDesigner.cs