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
- ControllableStoryboardAction.cs
- MultiByteCodec.cs
- BindingSourceDesigner.cs
- BaseValidatorDesigner.cs
- NamedServiceModelExtensionCollectionElement.cs
- RowType.cs
- ReadContentAsBinaryHelper.cs
- SqlDataSourceView.cs
- ObservableDictionary.cs
- ArithmeticException.cs
- AuthenticatingEventArgs.cs
- PieceNameHelper.cs
- Renderer.cs
- KeyboardEventArgs.cs
- listitem.cs
- ScrollableControlDesigner.cs
- StorageConditionPropertyMapping.cs
- CodeMemberField.cs
- OletxDependentTransaction.cs
- FormViewRow.cs
- SmtpException.cs
- PropertyGroupDescription.cs
- SchemaReference.cs
- remotingproxy.cs
- DelegatingHeader.cs
- Camera.cs
- SmiEventStream.cs
- TextReader.cs
- HandleCollector.cs
- CodeGotoStatement.cs
- SQLInt16Storage.cs
- XmlCharCheckingWriter.cs
- DataTable.cs
- BufferedStream.cs
- HuffCodec.cs
- FixedDocumentPaginator.cs
- _SSPIWrapper.cs
- ContextStaticAttribute.cs
- DeobfuscatingStream.cs
- WebRequestModulesSection.cs
- DeclarationUpdate.cs
- WmlPageAdapter.cs
- ProcessModule.cs
- DtdParser.cs
- XmlFileEditor.cs
- _FtpControlStream.cs
- Thickness.cs
- BuildManager.cs
- SafeBitVector32.cs
- BitSet.cs
- QilChoice.cs
- ToolStripDropDownButton.cs
- PerformanceCounterManager.cs
- ConfigurationPropertyAttribute.cs
- WebPartEventArgs.cs
- PointValueSerializer.cs
- LineServicesCallbacks.cs
- WmpBitmapDecoder.cs
- MultipleViewPattern.cs
- Composition.cs
- TriggerCollection.cs
- OraclePermissionAttribute.cs
- ResourceContainerWrapper.cs
- DataGridAutoFormat.cs
- SerializableAttribute.cs
- AnnotationComponentManager.cs
- Baml6ConstructorInfo.cs
- WebBrowserDesigner.cs
- QilGeneratorEnv.cs
- Enumerable.cs
- FormViewUpdateEventArgs.cs
- LongTypeConverter.cs
- ShaderEffect.cs
- AdornerDecorator.cs
- MetadataSource.cs
- XsltSettings.cs
- DataColumnCollection.cs
- Hex.cs
- XLinq.cs
- ToolStripContainerActionList.cs
- OrderByBuilder.cs
- DataGridCell.cs
- WindowsToolbarAsMenu.cs
- WsiProfilesElementCollection.cs
- X509Extension.cs
- CalendarDesigner.cs
- TextTreeInsertElementUndoUnit.cs
- XmlSchemaInfo.cs
- FreeFormDragDropManager.cs
- ScriptMethodAttribute.cs
- TextWriterEngine.cs
- AddInActivator.cs
- RadioButtonAutomationPeer.cs
- HwndStylusInputProvider.cs
- SortFieldComparer.cs
- ObjectStateFormatter.cs
- AsymmetricCryptoHandle.cs
- MatrixTransform.cs
- SignatureGenerator.cs
- PropagatorResult.cs