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
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XmlSchemaInclude.cs
- ProtocolsConfigurationHandler.cs
- SessionEndingCancelEventArgs.cs
- ComponentSerializationService.cs
- DictionaryBase.cs
- EntityDataSource.cs
- ObservableCollection.cs
- ListView.cs
- precedingsibling.cs
- SqlMultiplexer.cs
- DataGridTablesFactory.cs
- QilTypeChecker.cs
- MimeMapping.cs
- WindowsIdentity.cs
- CacheDependency.cs
- MouseActionConverter.cs
- ObjectViewListener.cs
- HandledEventArgs.cs
- Message.cs
- EncoderExceptionFallback.cs
- BrowserCapabilitiesCompiler.cs
- __ComObject.cs
- ContextMarshalException.cs
- ResXResourceWriter.cs
- XXXOnTypeBuilderInstantiation.cs
- LongSumAggregationOperator.cs
- XmlSchemaObject.cs
- DataServiceHostFactory.cs
- AutomationPropertyInfo.cs
- SamlAdvice.cs
- AnimationClock.cs
- XmlSerializerAssemblyAttribute.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- TemplatePropertyEntry.cs
- UdpTransportSettings.cs
- AffineTransform3D.cs
- Expression.cs
- SymDocumentType.cs
- RegexFCD.cs
- ApplicationServicesHostFactory.cs
- HostingEnvironmentSection.cs
- X509UI.cs
- NavigateEvent.cs
- FormViewPagerRow.cs
- BaseTemplateParser.cs
- TraceHelpers.cs
- CatalogPart.cs
- BmpBitmapEncoder.cs
- EditorZoneAutoFormat.cs
- BulletedListEventArgs.cs
- StaticSiteMapProvider.cs
- ThicknessAnimationUsingKeyFrames.cs
- XPathDescendantIterator.cs
- ReadOnlyHierarchicalDataSourceView.cs
- SizeConverter.cs
- SQLDateTime.cs
- InstanceDescriptor.cs
- HighlightVisual.cs
- HttpChannelHelpers.cs
- MailWriter.cs
- ChtmlTextWriter.cs
- HtmlControl.cs
- DateTime.cs
- MruCache.cs
- MemberCollection.cs
- PostBackOptions.cs
- IDQuery.cs
- ListDictionary.cs
- Speller.cs
- WrapperEqualityComparer.cs
- SHA256Managed.cs
- CodePageUtils.cs
- CompilationLock.cs
- Vector3dCollection.cs
- TreeViewImageGenerator.cs
- ColumnMapTranslator.cs
- FlowLayoutPanelDesigner.cs
- DropDownHolder.cs
- RequestBringIntoViewEventArgs.cs
- X509Certificate2Collection.cs
- dbdatarecord.cs
- Simplifier.cs
- ScrollItemPatternIdentifiers.cs
- FullTextLine.cs
- SoapSchemaImporter.cs
- Attachment.cs
- RawMouseInputReport.cs
- BindingContext.cs
- LinkLabel.cs
- SrgsRuleRef.cs
- MobileErrorInfo.cs
- DelegateBodyWriter.cs
- HtmlAnchor.cs
- Color.cs
- Query.cs
- TextEditorParagraphs.cs
- DataServiceBuildProvider.cs
- ProbeRequestResponseAsyncResult.cs
- InstanceDescriptor.cs
- LinkedResourceCollection.cs