Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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; } } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SqlException.cs
- ScopeCompiler.cs
- TypefaceMap.cs
- ArrayWithOffset.cs
- WebServiceTypeData.cs
- FindResponse.cs
- FamilyTypefaceCollection.cs
- FrameworkReadOnlyPropertyMetadata.cs
- ImageFormatConverter.cs
- ReadOnlyDictionary.cs
- Setter.cs
- Token.cs
- MonikerHelper.cs
- XPathExpr.cs
- SiteMembershipCondition.cs
- ParallelRangeManager.cs
- UIElementAutomationPeer.cs
- _CookieModule.cs
- CTreeGenerator.cs
- WindowsFormsDesignerOptionService.cs
- ToolStripDropDownClosedEventArgs.cs
- WebPartTransformerAttribute.cs
- AttributeCollection.cs
- ReliableMessagingHelpers.cs
- ImageAnimator.cs
- Vector3DAnimationBase.cs
- NameObjectCollectionBase.cs
- KeyTime.cs
- SpellCheck.cs
- MemberMemberBinding.cs
- TdsParserHelperClasses.cs
- CredentialCache.cs
- XmlSchemaCollection.cs
- SortFieldComparer.cs
- ConfigViewGenerator.cs
- RangeValidator.cs
- _FtpControlStream.cs
- UnsafeNetInfoNativeMethods.cs
- DataGridViewColumn.cs
- SocketException.cs
- EpmCustomContentSerializer.cs
- EntityDataReader.cs
- WebPartConnectionsConfigureVerb.cs
- PackWebRequestFactory.cs
- DataSourceControl.cs
- LinearQuaternionKeyFrame.cs
- ProbeDuplexCD1AsyncResult.cs
- ObjectView.cs
- TransformerInfoCollection.cs
- PageParserFilter.cs
- Oid.cs
- EntityDataSourceChangingEventArgs.cs
- HtmlContainerControl.cs
- Graphics.cs
- ProfileManager.cs
- Grant.cs
- ObjectFullSpanRewriter.cs
- IDReferencePropertyAttribute.cs
- HtmlFormParameterReader.cs
- SafeCryptoHandles.cs
- BrowserCapabilitiesCodeGenerator.cs
- Simplifier.cs
- BamlLocalizableResourceKey.cs
- IsolatedStorageFile.cs
- MailAddress.cs
- ConnectivityStatus.cs
- AdCreatedEventArgs.cs
- ResourceType.cs
- SafeFileHandle.cs
- RuleEngine.cs
- SyndicationSerializer.cs
- DoubleLinkList.cs
- DefaultPrintController.cs
- ItemsPanelTemplate.cs
- SortAction.cs
- MetaType.cs
- HttpStreamMessage.cs
- CopyAttributesAction.cs
- Variant.cs
- LocalizationComments.cs
- SectionRecord.cs
- DataGridViewCellCollection.cs
- PerformanceCounterLib.cs
- ColorInterpolationModeValidation.cs
- SystemTcpStatistics.cs
- LabelEditEvent.cs
- AvTrace.cs
- EndpointConfigContainer.cs
- FrameworkContextData.cs
- MSHTMLHost.cs
- WebPartsSection.cs
- SchemaElementLookUpTable.cs
- LinkArea.cs
- CreateUserErrorEventArgs.cs
- HtmlTable.cs
- DiagnosticTraceSource.cs
- _RequestCacheProtocol.cs
- OleAutBinder.cs
- TaiwanCalendar.cs
- TreeViewHitTestInfo.cs