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
- TagMapInfo.cs
- PersonalizationProviderHelper.cs
- ComboBox.cs
- AuthStoreRoleProvider.cs
- MemberHolder.cs
- CfgParser.cs
- TreeViewItem.cs
- Formatter.cs
- CardSpaceException.cs
- WindowsTreeView.cs
- x509store.cs
- MessageTransmitTraceRecord.cs
- DBParameter.cs
- PassportIdentity.cs
- ResourcesBuildProvider.cs
- TextRangeSerialization.cs
- IteratorFilter.cs
- HtmlInputPassword.cs
- EventArgs.cs
- InstanceContext.cs
- FrameworkElementFactoryMarkupObject.cs
- WindowsPrincipal.cs
- Size3DConverter.cs
- StorageAssociationTypeMapping.cs
- SourceInterpreter.cs
- DBParameter.cs
- DbParameterCollectionHelper.cs
- NullableLongMinMaxAggregationOperator.cs
- ShaderEffect.cs
- ReferenceEqualityComparer.cs
- RestHandlerFactory.cs
- SerializableAttribute.cs
- BitVec.cs
- TimelineGroup.cs
- DataRelationCollection.cs
- StylusLogic.cs
- QueryableFilterUserControl.cs
- SqlMethods.cs
- ScrollChrome.cs
- BaseDataBoundControl.cs
- EffectiveValueEntry.cs
- PackagePartCollection.cs
- ListenerSingletonConnectionReader.cs
- HtmlInputCheckBox.cs
- XmlWrappingReader.cs
- DesignTimeDataBinding.cs
- ChildrenQuery.cs
- ClientSettings.cs
- TemplateBindingExpressionConverter.cs
- FlowDocumentReaderAutomationPeer.cs
- CodeSnippetStatement.cs
- OrderedDictionaryStateHelper.cs
- StringValueSerializer.cs
- DateTimeConverter.cs
- RNGCryptoServiceProvider.cs
- BasePattern.cs
- OdbcHandle.cs
- Crypto.cs
- UTF7Encoding.cs
- EncoderReplacementFallback.cs
- XmlSchemaFacet.cs
- CodeDomSerializer.cs
- EditorPartDesigner.cs
- HtmlEmptyTagControlBuilder.cs
- ShaderEffect.cs
- OdbcRowUpdatingEvent.cs
- DLinqColumnProvider.cs
- TabControlEvent.cs
- _ChunkParse.cs
- ListViewTableCell.cs
- ReadOnlyCollection.cs
- TransactionWaitAsyncResult.cs
- SubqueryRules.cs
- PropertyTabChangedEvent.cs
- DateTimeFormat.cs
- ViewBase.cs
- IisNotInstalledException.cs
- ModuleConfigurationInfo.cs
- FamilyTypeface.cs
- RelationshipType.cs
- HostingEnvironmentWrapper.cs
- MaskedTextProvider.cs
- GreenMethods.cs
- NameValueSectionHandler.cs
- Page.cs
- InstalledFontCollection.cs
- RTTypeWrapper.cs
- XPathDocument.cs
- BitmapFrame.cs
- MessageContractMemberAttribute.cs
- SqlUDTStorage.cs
- SelectionItemProviderWrapper.cs
- HitTestFilterBehavior.cs
- UncommonField.cs
- GeometryGroup.cs
- ExecutorLocksHeldException.cs
- ForEachAction.cs
- HtmlPageAdapter.cs
- BitmapEffectvisualstate.cs
- GridViewPageEventArgs.cs