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
- ViewStateException.cs
- XmlQualifiedName.cs
- TextBoxBase.cs
- CustomWebEventKey.cs
- HitTestParameters3D.cs
- HandleCollector.cs
- VersionedStream.cs
- ResourceAttributes.cs
- SymbolTable.cs
- UnsafeMethods.cs
- DataGridViewColumnDividerDoubleClickEventArgs.cs
- CharUnicodeInfo.cs
- WebPartConnectionCollection.cs
- ValidationErrorCollection.cs
- linebase.cs
- SpecialFolderEnumConverter.cs
- AudioStateChangedEventArgs.cs
- DbExpressionVisitor_TResultType.cs
- Types.cs
- DataServiceHostFactory.cs
- IntSecurity.cs
- HostProtectionPermission.cs
- ISCIIEncoding.cs
- FontDifferentiator.cs
- HttpResponseHeader.cs
- InspectionWorker.cs
- wgx_exports.cs
- Hashtable.cs
- KeySplineConverter.cs
- HttpApplicationFactory.cs
- DictionarySectionHandler.cs
- WebPartDisplayMode.cs
- ReversePositionQuery.cs
- GeneratedContractType.cs
- ClientEndpointLoader.cs
- TabItemAutomationPeer.cs
- SqlTopReducer.cs
- SHA512CryptoServiceProvider.cs
- xsdvalidator.cs
- XpsFilter.cs
- CodeNamespaceCollection.cs
- SqlProfileProvider.cs
- ZoneMembershipCondition.cs
- ExclusiveCanonicalizationTransform.cs
- ProcessHost.cs
- RegexTree.cs
- EpmTargetTree.cs
- DbQueryCommandTree.cs
- CultureTable.cs
- Light.cs
- FixedDocumentSequencePaginator.cs
- SoapIncludeAttribute.cs
- Region.cs
- WindowsRichEdit.cs
- RecognizedAudio.cs
- RunWorkerCompletedEventArgs.cs
- UnsafeNativeMethodsMilCoreApi.cs
- VoiceInfo.cs
- CustomTypeDescriptor.cs
- HotSpotCollectionEditor.cs
- TagNameToTypeMapper.cs
- Int64Storage.cs
- CryptoKeySecurity.cs
- XAMLParseException.cs
- StringStorage.cs
- HttpProcessUtility.cs
- MergablePropertyAttribute.cs
- TextSearch.cs
- FontUnitConverter.cs
- FileAuthorizationModule.cs
- SqlCachedBuffer.cs
- CommandHelpers.cs
- HttpCachePolicyElement.cs
- LoginCancelEventArgs.cs
- NullReferenceException.cs
- SourceItem.cs
- altserialization.cs
- Rfc2898DeriveBytes.cs
- RenderTargetBitmap.cs
- AssemblyCollection.cs
- ProfileSettings.cs
- WebPartManager.cs
- WebPartVerbsEventArgs.cs
- CompiledQuery.cs
- RegexTree.cs
- HttpCachePolicy.cs
- DefaultValueAttribute.cs
- DiscreteKeyFrames.cs
- ITreeGenerator.cs
- BufferAllocator.cs
- Error.cs
- ResourceDescriptionAttribute.cs
- XmlAnyAttributeAttribute.cs
- MissingMemberException.cs
- LiteralSubsegment.cs
- WebConfigurationFileMap.cs
- DataMisalignedException.cs
- AncillaryOps.cs
- MaskedTextBoxDesignerActionList.cs
- Debug.cs