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
- RemotingException.cs
- GroupQuery.cs
- BaseValidatorDesigner.cs
- EnumConverter.cs
- FormattedText.cs
- XsdValidatingReader.cs
- ViewValidator.cs
- FamilyMap.cs
- WindowsTreeView.cs
- DetailsViewPageEventArgs.cs
- DataColumnChangeEvent.cs
- VerificationException.cs
- SafeRegistryHandle.cs
- DefaultPropertiesToSend.cs
- _CookieModule.cs
- ServiceDescriptionContext.cs
- XmlDictionaryReader.cs
- CardSpaceSelector.cs
- ListViewItemEventArgs.cs
- SrgsDocumentParser.cs
- HtmlAnchor.cs
- Trace.cs
- PropertyItem.cs
- DataTableNewRowEvent.cs
- DiagnosticTraceSource.cs
- CodeIdentifiers.cs
- RelationshipEndCollection.cs
- FieldBuilder.cs
- TemplateControlParser.cs
- Transform3DGroup.cs
- MenuItemBindingCollection.cs
- ModelItemImpl.cs
- AssemblyResourceLoader.cs
- HttpFormatExtensions.cs
- MemoryMappedViewAccessor.cs
- TraceContextRecord.cs
- AnalyzedTree.cs
- LocalBuilder.cs
- AssemblyUtil.cs
- DeflateInput.cs
- TextEditorSelection.cs
- PrimitiveDataContract.cs
- ProfilePropertySettingsCollection.cs
- LogFlushAsyncResult.cs
- UnknownBitmapDecoder.cs
- RawStylusInputCustomDataList.cs
- CellTreeSimplifier.cs
- ImageButton.cs
- PerformanceCounter.cs
- SrgsSubset.cs
- IPEndPointCollection.cs
- OperationCanceledException.cs
- ResizingMessageFilter.cs
- GraphicsPath.cs
- ParameterModifier.cs
- CustomCredentialPolicy.cs
- ToolStripCodeDomSerializer.cs
- ProviderException.cs
- WindowsServiceCredential.cs
- CodeDelegateCreateExpression.cs
- XmlSchemaComplexType.cs
- NamespaceDisplay.xaml.cs
- DrawingContextWalker.cs
- DataSourceExpression.cs
- SubMenuStyle.cs
- ControlType.cs
- IndexerNameAttribute.cs
- Comparer.cs
- ExpandCollapseIsCheckedConverter.cs
- WindowsScrollBarBits.cs
- HtmlElementCollection.cs
- HttpCapabilitiesEvaluator.cs
- InternalControlCollection.cs
- Operators.cs
- MeasureItemEvent.cs
- TypeSystemProvider.cs
- SettingsSavedEventArgs.cs
- Formatter.cs
- WebServiceResponseDesigner.cs
- UnitySerializationHolder.cs
- X509IssuerSerialKeyIdentifierClause.cs
- StructureChangedEventArgs.cs
- BaseHashHelper.cs
- ComponentRenameEvent.cs
- __ConsoleStream.cs
- InstanceDataCollection.cs
- CacheSection.cs
- ObjectConverter.cs
- Vector3D.cs
- LassoSelectionBehavior.cs
- CertificateManager.cs
- CompositeCollection.cs
- WorkflowApplicationTerminatedException.cs
- ConfigsHelper.cs
- ElementMarkupObject.cs
- Table.cs
- ForEachAction.cs
- MobileContainerDesigner.cs
- PenThreadPool.cs
- XmlSchemaDatatype.cs