Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / Configuration / CapabilitiesSection.cs / 1305376 / CapabilitiesSection.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.Configuration {
using System.Collections;
using System.Collections.Specialized;
using System.Diagnostics;
using System.Globalization;
using System.Reflection;
using System.Security;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Web.Caching;
using System.Web.Compilation;
using System.Web.Hosting;
using System.Security.Permissions;
//
// Implementation of
// expand the "with" pattern and match against the "match" expression.
//
internal class CapabilitiesSection : CapabilitiesRule {
internal CapabilitiesPattern _expr;
internal DelayedRegex _regex;
internal CapabilitiesRule[] _rules;
internal CapabilitiesSection(int type, DelayedRegex regex, CapabilitiesPattern expr, ArrayList rulelist) {
_type = type;
_regex = regex;
_expr = expr;
_rules = (CapabilitiesRule[])rulelist.ToArray(typeof(CapabilitiesRule));
}
internal override void Evaluate(CapabilitiesState state) {
Match match;
state.Exit = false;
if (_regex != null) {
match = _regex.Match(_expr.Expand(state));
if (!match.Success)
return;
state.AddMatch(_regex, match);
}
for (int i = 0; i < _rules.Length; i++) {
_rules[i].Evaluate(state);
if (state.Exit)
break;
}
if (_regex != null) {
state.PopMatch();
}
state.Exit = (Type == Case);
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.Configuration {
using System.Collections;
using System.Collections.Specialized;
using System.Diagnostics;
using System.Globalization;
using System.Reflection;
using System.Security;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Web.Caching;
using System.Web.Compilation;
using System.Web.Hosting;
using System.Security.Permissions;
//
// Implementation of
// expand the "with" pattern and match against the "match" expression.
//
internal class CapabilitiesSection : CapabilitiesRule {
internal CapabilitiesPattern _expr;
internal DelayedRegex _regex;
internal CapabilitiesRule[] _rules;
internal CapabilitiesSection(int type, DelayedRegex regex, CapabilitiesPattern expr, ArrayList rulelist) {
_type = type;
_regex = regex;
_expr = expr;
_rules = (CapabilitiesRule[])rulelist.ToArray(typeof(CapabilitiesRule));
}
internal override void Evaluate(CapabilitiesState state) {
Match match;
state.Exit = false;
if (_regex != null) {
match = _regex.Match(_expr.Expand(state));
if (!match.Success)
return;
state.AddMatch(_regex, match);
}
for (int i = 0; i < _rules.Length; i++) {
_rules[i].Evaluate(state);
if (state.Exit)
break;
}
if (_regex != null) {
state.PopMatch();
}
state.Exit = (Type == Case);
}
}
}
// 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
- ModelItemDictionaryImpl.cs
- WinEventWrap.cs
- StreamedFramingRequestChannel.cs
- EndpointIdentityConverter.cs
- BitmapFrameDecode.cs
- FlowLayoutSettings.cs
- CodeTypeMemberCollection.cs
- DateTimeOffsetAdapter.cs
- DateTimeOffsetConverter.cs
- StateMachineWorkflow.cs
- CodeStatement.cs
- ToolboxComponentsCreatingEventArgs.cs
- CompilerScope.cs
- ComplusTypeValidator.cs
- Queue.cs
- __Filters.cs
- RecordBuilder.cs
- PermissionAttributes.cs
- ObjectListGeneralPage.cs
- FixedSOMTextRun.cs
- XmlDsigSep2000.cs
- Object.cs
- Vector3DAnimation.cs
- XmlIlVisitor.cs
- DbException.cs
- SqlBulkCopy.cs
- TextStore.cs
- X509RawDataKeyIdentifierClause.cs
- TextServicesProperty.cs
- DataTablePropertyDescriptor.cs
- LinqToSqlWrapper.cs
- SubpageParaClient.cs
- Rotation3DAnimationBase.cs
- WebServiceResponse.cs
- DeferredBinaryDeserializerExtension.cs
- BaseValidator.cs
- _Rfc2616CacheValidators.cs
- BuiltInExpr.cs
- TemplateXamlParser.cs
- SqlProviderManifest.cs
- CommandBindingCollection.cs
- FileStream.cs
- CountdownEvent.cs
- ItemDragEvent.cs
- DBSqlParser.cs
- DocumentManager.cs
- AuthenticatedStream.cs
- MatrixCamera.cs
- SqlDataReaderSmi.cs
- ResourceLoader.cs
- Scheduler.cs
- PeerNameRecordCollection.cs
- BooleanAnimationUsingKeyFrames.cs
- OdbcErrorCollection.cs
- CalendarDay.cs
- FreezableDefaultValueFactory.cs
- Permission.cs
- LookupTables.cs
- ToolStripDropDownButton.cs
- TypeConverterValueSerializer.cs
- SizeAnimationUsingKeyFrames.cs
- VariableElement.cs
- DataViewManager.cs
- ParagraphResult.cs
- BevelBitmapEffect.cs
- SelectedDatesCollection.cs
- ResumeStoryboard.cs
- ReceiveReply.cs
- SafeCryptoHandles.cs
- GuidelineSet.cs
- WorkflowPersistenceService.cs
- FontResourceCache.cs
- PageStatePersister.cs
- DiscreteKeyFrames.cs
- DefaultPrintController.cs
- MimeWriter.cs
- OutputCacheEntry.cs
- ComponentResourceKey.cs
- TypeLoader.cs
- MultipartIdentifier.cs
- WindowsGraphics.cs
- SingleKeyFrameCollection.cs
- ExtractedStateEntry.cs
- BooleanKeyFrameCollection.cs
- Brush.cs
- FrugalList.cs
- ComponentChangedEvent.cs
- AccessViolationException.cs
- FrameworkEventSource.cs
- XmlSchemaObjectTable.cs
- ImpersonationContext.cs
- Rectangle.cs
- DataSourceHelper.cs
- XmlSchemaDocumentation.cs
- WeakEventManager.cs
- CallTemplateAction.cs
- SessionPageStatePersister.cs
- SeverityFilter.cs
- NameScopePropertyAttribute.cs
- StringSource.cs