Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / Regex / System / Text / RegularExpressions / CompiledRegexRunner.cs / 1 / CompiledRegexRunner.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
using System;
using System.Diagnostics;
using System.Reflection.Emit;
namespace System.Text.RegularExpressions {
internal sealed class CompiledRegexRunner : RegexRunner {
NoParamDelegate goMethod;
FindFirstCharDelegate findFirstCharMethod;
NoParamDelegate initTrackCountMethod;
internal CompiledRegexRunner() {}
internal void SetDelegates(NoParamDelegate go, FindFirstCharDelegate firstChar, NoParamDelegate trackCount) {
goMethod = go;
findFirstCharMethod = firstChar;
initTrackCountMethod = trackCount;
}
protected override void Go() {
goMethod(this);
}
protected override bool FindFirstChar() {
return findFirstCharMethod(this);
}
protected override void InitTrackCount() {
initTrackCountMethod(this);
}
}
internal delegate void NoParamDelegate(RegexRunner r);
internal delegate bool FindFirstCharDelegate(RegexRunner r);
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
using System;
using System.Diagnostics;
using System.Reflection.Emit;
namespace System.Text.RegularExpressions {
internal sealed class CompiledRegexRunner : RegexRunner {
NoParamDelegate goMethod;
FindFirstCharDelegate findFirstCharMethod;
NoParamDelegate initTrackCountMethod;
internal CompiledRegexRunner() {}
internal void SetDelegates(NoParamDelegate go, FindFirstCharDelegate firstChar, NoParamDelegate trackCount) {
goMethod = go;
findFirstCharMethod = firstChar;
initTrackCountMethod = trackCount;
}
protected override void Go() {
goMethod(this);
}
protected override bool FindFirstChar() {
return findFirstCharMethod(this);
}
protected override void InitTrackCount() {
initTrackCountMethod(this);
}
}
internal delegate void NoParamDelegate(RegexRunner r);
internal delegate bool FindFirstCharDelegate(RegexRunner r);
}
// 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
- SchemaAttDef.cs
- MessageSecurityOverHttp.cs
- MemberDomainMap.cs
- VsPropertyGrid.cs
- TCPListener.cs
- TextDecoration.cs
- MsmqAuthenticationMode.cs
- PolicyVersionConverter.cs
- TrackingStringDictionary.cs
- TileModeValidation.cs
- DesignerSerializationVisibilityAttribute.cs
- BStrWrapper.cs
- CompiledELinqQueryState.cs
- GlobalizationAssembly.cs
- MailHeaderInfo.cs
- _IPv6Address.cs
- NativeMethods.cs
- SequenceDesigner.cs
- Expander.cs
- CalendarDesigner.cs
- AppliedDeviceFiltersEditor.cs
- BulletedListDesigner.cs
- AttributeEmitter.cs
- HttpApplicationStateBase.cs
- GeneratedCodeAttribute.cs
- HttpModulesSection.cs
- VBCodeProvider.cs
- WebCategoryAttribute.cs
- CheckBox.cs
- TextElementCollection.cs
- CultureData.cs
- EndpointAddressMessageFilterTable.cs
- TdsParserStateObject.cs
- CharAnimationBase.cs
- ResponseBodyWriter.cs
- SqlDataSource.cs
- GridViewColumn.cs
- NetCodeGroup.cs
- DataColumnChangeEvent.cs
- PageParserFilter.cs
- RectValueSerializer.cs
- Property.cs
- MemberRelationshipService.cs
- ToolTipAutomationPeer.cs
- RequestTimeoutManager.cs
- HttpListenerException.cs
- ArrayConverter.cs
- StreamGeometry.cs
- MimeFormatExtensions.cs
- FaultDesigner.cs
- EpmContentDeSerializer.cs
- TempFiles.cs
- TextDecorationCollection.cs
- DataSetMappper.cs
- SchemaNames.cs
- DataGridItem.cs
- Pair.cs
- UIElementCollection.cs
- KeyGesture.cs
- WebPartsPersonalizationAuthorization.cs
- HandleExceptionArgs.cs
- PrinterUnitConvert.cs
- HttpPostProtocolReflector.cs
- SID.cs
- NamespaceCollection.cs
- PropertyPathConverter.cs
- SqlReorderer.cs
- XmlSchemaNotation.cs
- XmlSerializationReader.cs
- ForwardPositionQuery.cs
- ConnectionPoint.cs
- _NegotiateClient.cs
- StdValidatorsAndConverters.cs
- EntityExpressionVisitor.cs
- ScriptResourceInfo.cs
- ButtonDesigner.cs
- NullableLongMinMaxAggregationOperator.cs
- RewritingPass.cs
- StringBuilder.cs
- StyleSheet.cs
- Pair.cs
- DataSourceGroupCollection.cs
- Helper.cs
- CornerRadiusConverter.cs
- ExtractedStateEntry.cs
- Calendar.cs
- ScrollViewer.cs
- Crc32.cs
- Vector3DAnimation.cs
- PropertyEmitterBase.cs
- ListContractAdapter.cs
- TextBoxLine.cs
- Int32Rect.cs
- SymbolMethod.cs
- IndexerNameAttribute.cs
- SecurityState.cs
- NewArray.cs
- HelpInfo.cs
- CommentEmitter.cs
- StorageBasedPackageProperties.cs