Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- ButtonColumn.cs
- ThemeDirectoryCompiler.cs
- TextAnchor.cs
- ArraySubsetEnumerator.cs
- XmlTextReader.cs
- PropertyInfoSet.cs
- Path.cs
- UnknownBitmapDecoder.cs
- CodeFieldReferenceExpression.cs
- Substitution.cs
- EmptyQuery.cs
- Oid.cs
- ScriptIgnoreAttribute.cs
- LineBreak.cs
- HttpRequest.cs
- DrawingContext.cs
- MetadataCollection.cs
- DataBindingHandlerAttribute.cs
- CodeLinePragma.cs
- CachedFontFace.cs
- DataBindingValueUIHandler.cs
- ThrowHelper.cs
- UserMapPath.cs
- CustomGrammar.cs
- TabPageDesigner.cs
- WsatServiceAddress.cs
- Stack.cs
- PackageRelationshipSelector.cs
- ClientRolePrincipal.cs
- StringFreezingAttribute.cs
- TextRenderingModeValidation.cs
- CultureNotFoundException.cs
- TraceEventCache.cs
- GridViewDeletedEventArgs.cs
- SignatureResourcePool.cs
- CollectionCodeDomSerializer.cs
- MimeXmlImporter.cs
- SafeSecurityHandles.cs
- IChannel.cs
- HttpWebResponse.cs
- StringBuilder.cs
- HttpWebResponse.cs
- Object.cs
- WeakKeyDictionary.cs
- WindowAutomationPeer.cs
- ResourceDescriptionAttribute.cs
- TableRow.cs
- ConstrainedDataObject.cs
- SelectionService.cs
- HtmlShim.cs
- IsolatedStorageFilePermission.cs
- OdbcConnectionFactory.cs
- SignedInfo.cs
- FixedSOMFixedBlock.cs
- AssemblySettingAttributes.cs
- MbpInfo.cs
- QilLiteral.cs
- CoreSwitches.cs
- TypeReference.cs
- CallbackValidatorAttribute.cs
- HtmlInputCheckBox.cs
- ResourceReferenceExpression.cs
- PnrpPeerResolverElement.cs
- LineProperties.cs
- TransformerTypeCollection.cs
- TextElementCollection.cs
- ConditionalAttribute.cs
- Executor.cs
- DragCompletedEventArgs.cs
- ContextMenu.cs
- SystemResourceHost.cs
- LoadedOrUnloadedOperation.cs
- VisualStyleTypesAndProperties.cs
- ResourceExpressionBuilder.cs
- StructuredTypeEmitter.cs
- TableSectionStyle.cs
- NavigationFailedEventArgs.cs
- HostingEnvironmentSection.cs
- ProtectedConfigurationProviderCollection.cs
- CursorInteropHelper.cs
- ThreadAttributes.cs
- Brush.cs
- IDictionary.cs
- SslStream.cs
- WebPartTransformerAttribute.cs
- XmlNamespaceMapping.cs
- ContainerParagraph.cs
- assertwrapper.cs
- MulticastNotSupportedException.cs
- EntityDesignerUtils.cs
- Control.cs
- ChannelPool.cs
- DesignerLabelAdapter.cs
- Visual.cs
- ToolStripPanelCell.cs
- NamedPermissionSet.cs
- ReflectTypeDescriptionProvider.cs
- ObjectSet.cs
- ConfigXmlSignificantWhitespace.cs
- HtmlInputControl.cs