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 / Configuration / CapabilitiesSection.cs / 1 / 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
- SqlLiftWhereClauses.cs
- Int32CAMarshaler.cs
- CodeDomConfigurationHandler.cs
- XmlSchemaAttributeGroupRef.cs
- DataGridViewCellConverter.cs
- ConfigXmlReader.cs
- TextSpan.cs
- HtmlToClrEventProxy.cs
- DSASignatureFormatter.cs
- NativeMethods.cs
- PropertyConverter.cs
- FocusChangedEventArgs.cs
- WebPartTransformerAttribute.cs
- CacheVirtualItemsEvent.cs
- TypefaceMetricsCache.cs
- XmlImplementation.cs
- CustomValidator.cs
- TraceRecord.cs
- Odbc32.cs
- ComplexTypeEmitter.cs
- HelloMessage11.cs
- DeclarationUpdate.cs
- XmlFormatReaderGenerator.cs
- FileLogRecord.cs
- ByValueEqualityComparer.cs
- XmlChildEnumerator.cs
- LocationSectionRecord.cs
- NavigationPropertyEmitter.cs
- TextPenaltyModule.cs
- MonikerUtility.cs
- EastAsianLunisolarCalendar.cs
- SecurityTokenValidationException.cs
- SqlDataSourceFilteringEventArgs.cs
- ListBoxAutomationPeer.cs
- WindowsAuthenticationEventArgs.cs
- TextCompositionManager.cs
- TokenizerHelper.cs
- TypedElement.cs
- XmlAttributeOverrides.cs
- ProtocolsConfigurationEntry.cs
- TriState.cs
- FragmentQueryKB.cs
- PropertyChangeTracker.cs
- SoapIgnoreAttribute.cs
- TypeToStringValueConverter.cs
- DeadCharTextComposition.cs
- ReferencedCollectionType.cs
- SingleObjectCollection.cs
- TreeNode.cs
- ParseElementCollection.cs
- CngAlgorithmGroup.cs
- NativeMethods.cs
- BaseTemplateParser.cs
- ColorKeyFrameCollection.cs
- CharEnumerator.cs
- LocalBuilder.cs
- _BaseOverlappedAsyncResult.cs
- ServiceModelStringsVersion1.cs
- SqlFactory.cs
- DeflateEmulationStream.cs
- Helpers.cs
- ShaperBuffers.cs
- HostingEnvironmentException.cs
- SelectionWordBreaker.cs
- WeakHashtable.cs
- httpapplicationstate.cs
- HttpCookie.cs
- TranslateTransform3D.cs
- DataGridViewTextBoxColumn.cs
- TabItemAutomationPeer.cs
- SqlConnectionStringBuilder.cs
- TextFormatterHost.cs
- TimelineCollection.cs
- SpeakCompletedEventArgs.cs
- OdbcConnectionPoolProviderInfo.cs
- TransactionInterop.cs
- IndexOutOfRangeException.cs
- PermissionRequestEvidence.cs
- CatalogPartChrome.cs
- Popup.cs
- TempEnvironment.cs
- ServicePointManager.cs
- TransportSecurityBindingElement.cs
- LOSFormatter.cs
- CustomGrammar.cs
- EnvelopedSignatureTransform.cs
- TabItemWrapperAutomationPeer.cs
- EpmContentDeSerializer.cs
- ScheduleChanges.cs
- EdmFunction.cs
- InternalCache.cs
- MouseDevice.cs
- StringComparer.cs
- SystemWebCachingSectionGroup.cs
- ComponentEvent.cs
- WindowsGraphicsWrapper.cs
- ColorPalette.cs
- TextDecorations.cs
- ToolStripItemImageRenderEventArgs.cs
- LicFileLicenseProvider.cs