Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / Configuration / DelayedRegex.cs / 1305376 / 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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- BinHexEncoder.cs
- Component.cs
- MethodBody.cs
- ConstructorNeedsTagAttribute.cs
- SqlAliaser.cs
- SafeTimerHandle.cs
- CodeSnippetTypeMember.cs
- DataGridViewCellCollection.cs
- XmlDocumentFragment.cs
- StylusTip.cs
- HitTestResult.cs
- SqlMethodCallConverter.cs
- ToolStripDropDownItem.cs
- DataTable.cs
- ToolStripHighContrastRenderer.cs
- HttpCapabilitiesSectionHandler.cs
- CompositeScriptReferenceEventArgs.cs
- MediaElementAutomationPeer.cs
- PreviewPageInfo.cs
- PolyQuadraticBezierSegment.cs
- OperatingSystem.cs
- ConvertEvent.cs
- DataSet.cs
- SimpleTextLine.cs
- SqlFunctions.cs
- ListComponentEditor.cs
- DataBoundControl.cs
- COMException.cs
- Positioning.cs
- Speller.cs
- WorkflowView.cs
- activationcontext.cs
- WebServiceData.cs
- ParamArrayAttribute.cs
- ConfigXmlWhitespace.cs
- OleDbError.cs
- PropertyCondition.cs
- ClientScriptManager.cs
- Pair.cs
- CallSiteHelpers.cs
- MessageBuilder.cs
- FrameworkElement.cs
- CornerRadiusConverter.cs
- TableRowCollection.cs
- XmlStringTable.cs
- SkipQueryOptionExpression.cs
- SurrogateSelector.cs
- SqlUtil.cs
- BaseTemplatedMobileComponentEditor.cs
- OutputCacheProfile.cs
- SQLByteStorage.cs
- DesignTimeVisibleAttribute.cs
- NoneExcludedImageIndexConverter.cs
- CachedRequestParams.cs
- IntSecurity.cs
- ValidationException.cs
- HwndProxyElementProvider.cs
- HopperCache.cs
- Char.cs
- HwndMouseInputProvider.cs
- Stack.cs
- DateTimeOffsetAdapter.cs
- SafeNativeMethods.cs
- StringWriter.cs
- InvalidDocumentContentsException.cs
- ComNativeDescriptor.cs
- PersonalizationProvider.cs
- Int32CAMarshaler.cs
- BuildResult.cs
- SecurityAccessDeniedException.cs
- UnsafeNativeMethodsCLR.cs
- FontDriver.cs
- EntitySqlException.cs
- DataKey.cs
- AssociatedControlConverter.cs
- TabControlAutomationPeer.cs
- FilterElement.cs
- RestClientProxyHandler.cs
- unsafenativemethodsother.cs
- ConsumerConnectionPointCollection.cs
- CommandManager.cs
- HtmlInputCheckBox.cs
- DecimalAnimationBase.cs
- SessionParameter.cs
- WebPermission.cs
- NativeMethods.cs
- OracleDateTime.cs
- SafeTimerHandle.cs
- CodeTypeDeclarationCollection.cs
- BasicBrowserDialog.designer.cs
- PrintControllerWithStatusDialog.cs
- InheritanceContextHelper.cs
- NotSupportedException.cs
- WorkflowOperationBehavior.cs
- TreeViewHitTestInfo.cs
- JsonMessageEncoderFactory.cs
- SizeConverter.cs
- LongValidator.cs
- EntityProviderFactory.cs
- FlowDocumentReaderAutomationPeer.cs