Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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;
}
}
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ListViewGroup.cs
- FileDialogPermission.cs
- HttpCachePolicyElement.cs
- CancelRequestedQuery.cs
- OleDbInfoMessageEvent.cs
- UserInitiatedRoutedEventPermissionAttribute.cs
- StorageBasedPackageProperties.cs
- InternalCache.cs
- ToolBarButtonClickEvent.cs
- CollectionChangeEventArgs.cs
- RoleServiceManager.cs
- DoubleAnimationClockResource.cs
- Cursor.cs
- SubstitutionList.cs
- FileRegion.cs
- BinHexEncoder.cs
- MediaTimeline.cs
- ApplicationId.cs
- HScrollProperties.cs
- XmlElementAttribute.cs
- DefaultProxySection.cs
- ValuePatternIdentifiers.cs
- TcpConnectionPoolSettings.cs
- Helper.cs
- InstanceCreationEditor.cs
- CachedPathData.cs
- QilVisitor.cs
- AttributeData.cs
- MetadataPropertyCollection.cs
- BindingExpressionUncommonField.cs
- Point3D.cs
- QueryPageSettingsEventArgs.cs
- Rotation3D.cs
- BoolExpr.cs
- FlagPanel.cs
- PropertyBuilder.cs
- WebPartVerbCollection.cs
- OutKeywords.cs
- FontStretch.cs
- HtmlSelect.cs
- XmlAnyElementAttributes.cs
- Vector3dCollection.cs
- XmlSchemaAnyAttribute.cs
- ProvidersHelper.cs
- AnonymousIdentificationModule.cs
- AttachInfo.cs
- XmlSchemaChoice.cs
- BackStopAuthenticationModule.cs
- InfoCardClaim.cs
- LockCookie.cs
- XamlGridLengthSerializer.cs
- ButtonBase.cs
- SecurityHelper.cs
- XmlSchemaInfo.cs
- RelationshipSet.cs
- PermissionListSet.cs
- Window.cs
- NativeMethods.cs
- JoinTreeSlot.cs
- XmlCharCheckingReader.cs
- MsmqSecureHashAlgorithm.cs
- TrustLevel.cs
- SettingsAttributes.cs
- NullableDecimalAverageAggregationOperator.cs
- OleDbEnumerator.cs
- RectangleF.cs
- InputEventArgs.cs
- EntityKeyElement.cs
- StickyNote.cs
- RootAction.cs
- Parser.cs
- NTAccount.cs
- UnlockInstanceCommand.cs
- ShaderEffect.cs
- JsonFormatGeneratorStatics.cs
- MoveSizeWinEventHandler.cs
- sqlpipe.cs
- DerivedKeySecurityToken.cs
- Normalization.cs
- WindowsComboBox.cs
- DropSource.cs
- RijndaelManaged.cs
- Label.cs
- EventProviderWriter.cs
- ModuleConfigurationInfo.cs
- TimeSpan.cs
- CategoryAttribute.cs
- HttpPostedFileBase.cs
- SByteStorage.cs
- DependencyObject.cs
- KnownTypes.cs
- AuthenticationConfig.cs
- CqlBlock.cs
- VirtualizedContainerService.cs
- SystemIPInterfaceProperties.cs
- HeaderCollection.cs
- LineBreakRecord.cs
- AssemblyHelper.cs
- ConfigXmlSignificantWhitespace.cs
- RoleGroupCollection.cs