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 / DelayedRegex.cs / 1 / DelayedRegex.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.Configuration { using System.Collections; using System.Configuration; using System.IO; using System.Security; using System.Security.Permissions; using System.Text.RegularExpressions; using System.Web.Configuration; using System.Web.Util; using System.Xml; using Pair = System.Web.UI.Pair; internal class DelayedRegex { private String _regstring; private Regex _regex; internal DelayedRegex(String s) { _regex = null; _regstring = s; } internal Match Match(String s) { EnsureRegex(); return _regex.Match(s); } internal int GroupNumberFromName(String name) { EnsureRegex(); return _regex.GroupNumberFromName(name); } internal void EnsureRegex() { string regstring = _regstring; if(_regex == null) { _regex = new Regex(regstring); //free original _regstring = null; } return; } } } // 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.Configuration; using System.IO; using System.Security; using System.Security.Permissions; using System.Text.RegularExpressions; using System.Web.Configuration; using System.Web.Util; using System.Xml; using Pair = System.Web.UI.Pair; internal class DelayedRegex { private String _regstring; private Regex _regex; internal DelayedRegex(String s) { _regex = null; _regstring = s; } internal Match Match(String s) { EnsureRegex(); return _regex.Match(s); } internal int GroupNumberFromName(String name) { EnsureRegex(); return _regex.GroupNumberFromName(name); } internal void EnsureRegex() { string regstring = _regstring; if(_regex == null) { _regex = new Regex(regstring); //free original _regstring = null; } return; } } } // 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
- SplitterCancelEvent.cs
- FormsAuthenticationUser.cs
- AstTree.cs
- StructuredTypeEmitter.cs
- CompilerWrapper.cs
- TextRunCacheImp.cs
- BackStopAuthenticationModule.cs
- cryptoapiTransform.cs
- DataObjectFieldAttribute.cs
- ZipArchive.cs
- Brush.cs
- ConfigXmlWhitespace.cs
- EventProxy.cs
- DocumentGridPage.cs
- ListViewDataItem.cs
- ToolboxItemImageConverter.cs
- EmptyEnumerable.cs
- HScrollBar.cs
- DataSourceComponent.cs
- ProgressPage.cs
- HighContrastHelper.cs
- ProtocolInformationWriter.cs
- NetworkStream.cs
- SqlCacheDependencyDatabaseCollection.cs
- Rotation3DKeyFrameCollection.cs
- WebPartManager.cs
- WSFederationHttpSecurityElement.cs
- VerticalAlignConverter.cs
- SkewTransform.cs
- SqlRecordBuffer.cs
- XPathAncestorQuery.cs
- BitmapMetadata.cs
- WebEventTraceProvider.cs
- _SslState.cs
- QueryOpcode.cs
- FocusWithinProperty.cs
- FrameworkElementFactory.cs
- PropertyEmitter.cs
- PresentationTraceSources.cs
- RecommendedAsConfigurableAttribute.cs
- PackagingUtilities.cs
- ViewGenResults.cs
- OdbcHandle.cs
- PeerToPeerException.cs
- StateItem.cs
- XmlFormatExtensionPointAttribute.cs
- BoundsDrawingContextWalker.cs
- RuntimeTransactionHandle.cs
- RSACryptoServiceProvider.cs
- ContentPresenter.cs
- Peer.cs
- ProfileBuildProvider.cs
- EditorBrowsableAttribute.cs
- StylusPointDescription.cs
- DataGridViewBindingCompleteEventArgs.cs
- StorageAssociationSetMapping.cs
- StrokeNodeData.cs
- BrowserCapabilitiesCompiler.cs
- QilScopedVisitor.cs
- XmlHelper.cs
- ConstantSlot.cs
- ContentPresenter.cs
- XmlBinaryReader.cs
- PageRanges.cs
- PeerTransportCredentialType.cs
- ComNativeDescriptor.cs
- ApplicationSecurityManager.cs
- PlanCompilerUtil.cs
- AutomationPattern.cs
- ToolStripRenderer.cs
- RoutedEventHandlerInfo.cs
- XPathAncestorQuery.cs
- NonPrimarySelectionGlyph.cs
- DbDataRecord.cs
- URLBuilder.cs
- EntityUtil.cs
- RedistVersionInfo.cs
- StringAnimationBase.cs
- XamlPointCollectionSerializer.cs
- CommandSet.cs
- UserControl.cs
- COAUTHINFO.cs
- AxHost.cs
- BoundPropertyEntry.cs
- DataTableMapping.cs
- DeclarationUpdate.cs
- AttachmentService.cs
- ValueSerializerAttribute.cs
- ImplicitInputBrush.cs
- ProxyManager.cs
- XComponentModel.cs
- PasswordDeriveBytes.cs
- SerializerDescriptor.cs
- SiteMapNodeItemEventArgs.cs
- CodeTypeDeclarationCollection.cs
- KeyValueConfigurationCollection.cs
- DataGridItemEventArgs.cs
- Size3DConverter.cs
- IISUnsafeMethods.cs
- TdsValueSetter.cs