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
- TablePatternIdentifiers.cs
- WsatConfiguration.cs
- COM2ComponentEditor.cs
- XmlCountingReader.cs
- Base64Decoder.cs
- BamlTreeNode.cs
- DocumentPageTextView.cs
- RegexCaptureCollection.cs
- ControlEvent.cs
- PeerResolverElement.cs
- ControlUtil.cs
- ToolStripProgressBar.cs
- MobileErrorInfo.cs
- DetailsViewCommandEventArgs.cs
- SqlCacheDependency.cs
- AsymmetricKeyExchangeFormatter.cs
- EventWaitHandleSecurity.cs
- ReferenceEqualityComparer.cs
- HealthMonitoringSection.cs
- ListenUriMode.cs
- BaseAddressPrefixFilterElement.cs
- VirtualPathProvider.cs
- StateWorkerRequest.cs
- Stack.cs
- XmlWrappingReader.cs
- AmbientValueAttribute.cs
- BasePattern.cs
- shaperfactoryquerycacheentry.cs
- Matrix.cs
- AsmxEndpointPickerExtension.cs
- SubclassTypeValidatorAttribute.cs
- TextDecorationLocationValidation.cs
- SimpleType.cs
- BaseProcessor.cs
- UrlAuthFailedErrorFormatter.cs
- Rect.cs
- KeyToListMap.cs
- MasterPage.cs
- DoubleConverter.cs
- EntitySqlException.cs
- ConnectionPoint.cs
- RawStylusActions.cs
- Size.cs
- PackagePart.cs
- MailWriter.cs
- CatalogPartCollection.cs
- XmlQueryType.cs
- storepermissionattribute.cs
- WindowsTitleBar.cs
- CryptoConfig.cs
- DeviceSpecificChoice.cs
- DesignerActionPropertyItem.cs
- XPathAncestorQuery.cs
- ProgressBarHighlightConverter.cs
- FileSystemEventArgs.cs
- ColorMap.cs
- GenericUriParser.cs
- Section.cs
- OutputCacheModule.cs
- NullRuntimeConfig.cs
- CacheSection.cs
- SqlTypesSchemaImporter.cs
- DynamicResourceExtensionConverter.cs
- TableLayout.cs
- XmlChildEnumerator.cs
- SQLDateTime.cs
- LinqDataSourceContextEventArgs.cs
- PropertyItemInternal.cs
- SubMenuStyleCollection.cs
- KnownColorTable.cs
- FixedDSBuilder.cs
- cache.cs
- OrderedEnumerableRowCollection.cs
- CancellationHandler.cs
- SqlServices.cs
- MessagePropertyFilter.cs
- MarkupProperty.cs
- Variable.cs
- ScriptDescriptor.cs
- WebPartMovingEventArgs.cs
- NameTable.cs
- _LazyAsyncResult.cs
- PropertyItem.cs
- ServerIdentity.cs
- Options.cs
- PropertyPathConverter.cs
- _LoggingObject.cs
- TlsSspiNegotiation.cs
- HuffmanTree.cs
- MemberHolder.cs
- RootBuilder.cs
- BlurBitmapEffect.cs
- ActivitySurrogateSelector.cs
- SerializationException.cs
- ProgressiveCrcCalculatingStream.cs
- TrackingMemoryStream.cs
- DataColumnMapping.cs
- DeobfuscatingStream.cs
- CustomTrackingRecord.cs
- Renderer.cs