Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- cookiecontainer.cs
- ResourcesBuildProvider.cs
- IdleTimeoutMonitor.cs
- TransformPattern.cs
- APCustomTypeDescriptor.cs
- DynamicMethod.cs
- TextMessageEncoder.cs
- WorkItem.cs
- COM2ColorConverter.cs
- MexHttpsBindingElement.cs
- PortCache.cs
- ColumnClickEvent.cs
- StylusCollection.cs
- UtilityExtension.cs
- FontDialog.cs
- DesignerOptionService.cs
- SiteMap.cs
- SystemFonts.cs
- EventProviderBase.cs
- ListViewItem.cs
- AnimationClockResource.cs
- PartialTrustVisibleAssembliesSection.cs
- SqlDataSourceFilteringEventArgs.cs
- PermissionAttributes.cs
- MaskedTextProvider.cs
- SystemIPv4InterfaceProperties.cs
- CopyCodeAction.cs
- LoginUtil.cs
- TypeElement.cs
- XmlSerializationWriter.cs
- DataMemberAttribute.cs
- AsymmetricSignatureFormatter.cs
- XmlRawWriter.cs
- XmlSchemaAll.cs
- DataSourceXmlElementAttribute.cs
- CharacterBuffer.cs
- MgmtResManager.cs
- ExtensionSimplifierMarkupObject.cs
- StylusOverProperty.cs
- StrokeNodeData.cs
- AppliedDeviceFiltersEditor.cs
- CustomAssemblyResolver.cs
- HostingEnvironmentSection.cs
- MetadataItemEmitter.cs
- CodeMemberEvent.cs
- BindingSource.cs
- PathSegment.cs
- ExpandSegment.cs
- RealizationDrawingContextWalker.cs
- WaitingCursor.cs
- OleDbError.cs
- MergeFailedEvent.cs
- OperationFormatStyle.cs
- OpCopier.cs
- NativeMethodsOther.cs
- AuthorizationRuleCollection.cs
- HttpDictionary.cs
- ListControlBoundActionList.cs
- ControlUtil.cs
- SessionEndingCancelEventArgs.cs
- ConfigUtil.cs
- File.cs
- ConnectionConsumerAttribute.cs
- BaseUriHelper.cs
- SerializationTrace.cs
- Matrix.cs
- Operand.cs
- BinaryConverter.cs
- PartitionerStatic.cs
- UndoUnit.cs
- EntityParameterCollection.cs
- ClientUrlResolverWrapper.cs
- AsyncPostBackTrigger.cs
- PeerNameRecord.cs
- Scheduling.cs
- WpfGeneratedKnownTypes.cs
- PathSegment.cs
- NativeMethods.cs
- WindowsPrincipal.cs
- HtmlObjectListAdapter.cs
- Group.cs
- StorageMappingFragment.cs
- WindowsFormsSectionHandler.cs
- Stackframe.cs
- CodeObject.cs
- TextElement.cs
- DeclarativeCatalogPart.cs
- Section.cs
- Helpers.cs
- AncillaryOps.cs
- TypeToken.cs
- OleDbStruct.cs
- DeviceSpecificChoice.cs
- PropertyGridView.cs
- CatalogZone.cs
- StatusStrip.cs
- ContentFileHelper.cs
- CodeDirectiveCollection.cs
- translator.cs
- ConfigurationStrings.cs