Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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. // //----------------------------------------------------------------------------- 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
- CodeAccessPermission.cs
- CompensationTokenData.cs
- MessageAction.cs
- Symbol.cs
- StylusPoint.cs
- DataDesignUtil.cs
- FileAuthorizationModule.cs
- ObjectDataSourceMethodEventArgs.cs
- RefType.cs
- NameValueSectionHandler.cs
- PermissionToken.cs
- LogicalMethodInfo.cs
- DataGridTextBox.cs
- Rotation3D.cs
- Transform3D.cs
- AliasedSlot.cs
- ListItemParagraph.cs
- TraceSection.cs
- Freezable.cs
- DbExpressionBuilder.cs
- EventMappingSettingsCollection.cs
- CellTreeNodeVisitors.cs
- DayRenderEvent.cs
- CodeGeneratorOptions.cs
- SmtpCommands.cs
- ChtmlTextBoxAdapter.cs
- DocumentViewer.cs
- HyperLink.cs
- Propagator.Evaluator.cs
- DataGridViewComboBoxCell.cs
- DateTimeFormat.cs
- CompareValidator.cs
- Configuration.cs
- RepeaterItemEventArgs.cs
- ToolStripOverflowButton.cs
- ActivityCodeDomSerializer.cs
- ToolStripPanelSelectionGlyph.cs
- SkewTransform.cs
- XmlSchemaAny.cs
- ComIntegrationManifestGenerator.cs
- Tracer.cs
- UpdateProgress.cs
- SizeIndependentAnimationStorage.cs
- Menu.cs
- XmlUnspecifiedAttribute.cs
- DataGridViewControlCollection.cs
- PaintEvent.cs
- ComponentEvent.cs
- BitmapData.cs
- ConnectorRouter.cs
- StyleXamlParser.cs
- AppModelKnownContentFactory.cs
- CorruptingExceptionCommon.cs
- Activator.cs
- DependencyPropertyAttribute.cs
- DataStreams.cs
- CollectionViewSource.cs
- Visual3DCollection.cs
- XPathExpr.cs
- DecoderFallback.cs
- DesignerDataColumn.cs
- FormViewDeleteEventArgs.cs
- MimeParameterWriter.cs
- PrivilegedConfigurationManager.cs
- Rotation3D.cs
- OutputScope.cs
- ManifestBasedResourceGroveler.cs
- PropertyCollection.cs
- FixedSOMTextRun.cs
- InvalidateEvent.cs
- SqlClientWrapperSmiStreamChars.cs
- PersonalizationProviderHelper.cs
- DateTimeStorage.cs
- RewritingPass.cs
- WebReferencesBuildProvider.cs
- RadioButtonBaseAdapter.cs
- UserNameSecurityTokenAuthenticator.cs
- ColumnBinding.cs
- WindowHelperService.cs
- WizardStepBase.cs
- AssemblyHelper.cs
- ParagraphResult.cs
- PerformanceCounterPermissionEntryCollection.cs
- RadialGradientBrush.cs
- ObjectToken.cs
- CompiledQuery.cs
- MemberCollection.cs
- ResizeGrip.cs
- EntryPointNotFoundException.cs
- ImageButton.cs
- ResXBuildProvider.cs
- Tile.cs
- SafeRightsManagementPubHandle.cs
- MarkedHighlightComponent.cs
- XmlEnumAttribute.cs
- TimeSpanConverter.cs
- TraceSource.cs
- ToolboxDataAttribute.cs
- ConnectionPointConverter.cs
- IdentityNotMappedException.cs