Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / 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. //------------------------------------------------------------------------------ // // 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- RangeBase.cs
- XamlToRtfWriter.cs
- ObjectToIdCache.cs
- SoapReflectionImporter.cs
- ZipIOExtraFieldElement.cs
- UrlMappingsModule.cs
- ImageSourceConverter.cs
- Int16AnimationBase.cs
- UpdatableWrapper.cs
- MsmqIntegrationBindingCollectionElement.cs
- DateBoldEvent.cs
- DataServiceQueryProvider.cs
- _NegotiateClient.cs
- WizardSideBarListControlItem.cs
- CompareValidator.cs
- PersistencePipeline.cs
- SortExpressionBuilder.cs
- XMLUtil.cs
- ActivityExecutorSurrogate.cs
- DBDataPermissionAttribute.cs
- DataGridViewComboBoxCell.cs
- SystemUdpStatistics.cs
- SQLUtility.cs
- VectorAnimation.cs
- XmlSchemaAttribute.cs
- MediaElement.cs
- SchemaMapping.cs
- CryptographicAttribute.cs
- SmtpSection.cs
- TwoPhaseCommitProxy.cs
- ThreadInterruptedException.cs
- DetailsViewInsertEventArgs.cs
- ServiceModelConfigurationSectionCollection.cs
- IgnoreFileBuildProvider.cs
- HtmlGenericControl.cs
- BasicBrowserDialog.cs
- TimeSpanStorage.cs
- ChangeInterceptorAttribute.cs
- ObjectQueryState.cs
- CursorConverter.cs
- LambdaCompiler.Expressions.cs
- ZipIOLocalFileHeader.cs
- GuidelineCollection.cs
- TreeNodeCollectionEditorDialog.cs
- ThemeDirectoryCompiler.cs
- Utils.cs
- XmlCustomFormatter.cs
- XslVisitor.cs
- InkCollectionBehavior.cs
- PriorityChain.cs
- RegistryDataKey.cs
- ToolStripPanel.cs
- DateTimeConverter2.cs
- XmlSchemaSimpleContentExtension.cs
- HttpRequestBase.cs
- SynchronizationLockException.cs
- Brush.cs
- FieldTemplateUserControl.cs
- ResponseStream.cs
- WindowsAuthenticationModule.cs
- MetadataSerializer.cs
- _ContextAwareResult.cs
- BuiltInPermissionSets.cs
- PaperSize.cs
- RegexStringValidatorAttribute.cs
- XmlUtf8RawTextWriter.cs
- CategoryNameCollection.cs
- InkPresenterAutomationPeer.cs
- Quad.cs
- KeyInstance.cs
- DataColumnMappingCollection.cs
- WebPartEditVerb.cs
- EntityDesignerDataSourceView.cs
- HiddenField.cs
- ServiceOperationParameter.cs
- LinearGradientBrush.cs
- XmlText.cs
- ImageList.cs
- FragmentQueryProcessor.cs
- Selector.cs
- MemberInfoSerializationHolder.cs
- AttributeProviderAttribute.cs
- StringUtil.cs
- GraphicsState.cs
- DrawingBrush.cs
- EntitySqlQueryCacheEntry.cs
- metadatamappinghashervisitor.cs
- RegexCompilationInfo.cs
- BufferedResponseStream.cs
- ResXResourceReader.cs
- GenerateScriptTypeAttribute.cs
- BindingContext.cs
- VectorAnimationUsingKeyFrames.cs
- Compilation.cs
- PackageFilter.cs
- RegexFCD.cs
- CodeExpressionStatement.cs
- _ScatterGatherBuffers.cs
- SessionStateItemCollection.cs
- MenuAdapter.cs