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

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TrackingMemoryStreamFactory.cs
- OleDbConnectionFactory.cs
- IISMapPath.cs
- log.cs
- RecognizedWordUnit.cs
- XmlILOptimizerVisitor.cs
- QueryExpr.cs
- WindowsGraphics.cs
- XmlTypeMapping.cs
- RadioButtonList.cs
- XmlIncludeAttribute.cs
- Single.cs
- _ContextAwareResult.cs
- LongSumAggregationOperator.cs
- DataGrid.cs
- HttpCookie.cs
- SmiEventStream.cs
- WebDisplayNameAttribute.cs
- RegionIterator.cs
- DesignerCategoryAttribute.cs
- SettingsPropertyValue.cs
- XmlRawWriter.cs
- ConfigurationElement.cs
- DropDownHolder.cs
- LockedAssemblyCache.cs
- ConfigurationValidatorAttribute.cs
- CalendarDataBindingHandler.cs
- TableRowCollection.cs
- AsyncResult.cs
- CategoryGridEntry.cs
- Helper.cs
- ExecutionContext.cs
- PlatformNotSupportedException.cs
- Compilation.cs
- LockRecursionException.cs
- ThreadExceptionDialog.cs
- OleDbStruct.cs
- DetailsViewUpdateEventArgs.cs
- SqlNotificationRequest.cs
- AssemblySettingAttributes.cs
- ClientProxyGenerator.cs
- ArrayList.cs
- MobileCategoryAttribute.cs
- HyperlinkAutomationPeer.cs
- XslAst.cs
- SecurityStandardsManager.cs
- X509Certificate2Collection.cs
- InternalBufferOverflowException.cs
- RenderDataDrawingContext.cs
- CurrentTimeZone.cs
- DataTableMapping.cs
- ExecutionEngineException.cs
- EventWaitHandle.cs
- TextLineResult.cs
- XamlBrushSerializer.cs
- PtsContext.cs
- ListViewUpdateEventArgs.cs
- RelationshipConverter.cs
- RectAnimationUsingKeyFrames.cs
- InvalidDataException.cs
- SimpleRecyclingCache.cs
- ToolStripProgressBar.cs
- IndentedWriter.cs
- RemoteTokenFactory.cs
- PackageProperties.cs
- Button.cs
- TextEditorTyping.cs
- TransformPattern.cs
- UnderstoodHeaders.cs
- Stack.cs
- SubMenuStyle.cs
- DataGridViewRowCancelEventArgs.cs
- ZipIOExtraFieldElement.cs
- DisableDpiAwarenessAttribute.cs
- DataGrid.cs
- ViewManager.cs
- Comparer.cs
- SqlRowUpdatedEvent.cs
- ProjectionPathSegment.cs
- ContractHandle.cs
- SystemIPGlobalProperties.cs
- XmlCDATASection.cs
- Int16KeyFrameCollection.cs
- HGlobalSafeHandle.cs
- KerberosSecurityTokenProvider.cs
- PeerNameResolver.cs
- LinkedList.cs
- Int32CollectionConverter.cs
- RTTrackingProfile.cs
- PrivilegeNotHeldException.cs
- NativeMethods.cs
- GeometryGroup.cs
- ReachIDocumentPaginatorSerializer.cs
- XmlNodeComparer.cs
- StrongNameMembershipCondition.cs
- ProcessActivityTreeOptions.cs
- SimpleTextLine.cs
- DataServiceProviderWrapper.cs
- CuspData.cs
- ScrollableControl.cs