Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- BinaryMethodMessage.cs
- DecimalFormatter.cs
- TextRangeBase.cs
- SingleTagSectionHandler.cs
- DefaultPropertiesToSend.cs
- StateChangeEvent.cs
- PageAsyncTaskManager.cs
- ChangePassword.cs
- _AutoWebProxyScriptHelper.cs
- HttpModuleAction.cs
- ActionMessageFilterTable.cs
- ZipIOBlockManager.cs
- MonitoringDescriptionAttribute.cs
- DBSchemaTable.cs
- ScrollChangedEventArgs.cs
- SQLByte.cs
- TriggerActionCollection.cs
- TextTreePropertyUndoUnit.cs
- FontDriver.cs
- Application.cs
- DataConnectionHelper.cs
- DesignerFrame.cs
- ImpersonateTokenRef.cs
- EmptyStringExpandableObjectConverter.cs
- QueryPrefixOp.cs
- AncestorChangedEventArgs.cs
- EmptyStringExpandableObjectConverter.cs
- MenuItemBindingCollection.cs
- DataSourceUtil.cs
- EdmError.cs
- CollectionConverter.cs
- ApplicationManager.cs
- DesignerInterfaces.cs
- WindowsListViewItemStartMenu.cs
- OutputCacheSettings.cs
- TextServicesManager.cs
- X509ScopedServiceCertificateElementCollection.cs
- TextParagraphView.cs
- AsyncResult.cs
- SQLMembershipProvider.cs
- Animatable.cs
- wgx_commands.cs
- DetailsViewPagerRow.cs
- KeyConstraint.cs
- BindingRestrictions.cs
- IdentifierService.cs
- diagnosticsswitches.cs
- SchemaConstraints.cs
- TrackBarRenderer.cs
- FixedPageAutomationPeer.cs
- SqlFormatter.cs
- XdrBuilder.cs
- SQLBinary.cs
- ListBox.cs
- InputProviderSite.cs
- DesignTimeParseData.cs
- RectConverter.cs
- Accessible.cs
- TargetPerspective.cs
- GPPOINTF.cs
- CodeMemberProperty.cs
- SecurityRuntime.cs
- SelectionChangedEventArgs.cs
- RotateTransform.cs
- NestedContainer.cs
- FixedSOMTable.cs
- WriteStateInfoBase.cs
- CroppedBitmap.cs
- WindowsGrip.cs
- ListSourceHelper.cs
- Header.cs
- InputQueueChannel.cs
- Triangle.cs
- Message.cs
- PerfCounters.cs
- DynamicPropertyReader.cs
- DataGridSortCommandEventArgs.cs
- DynamicRendererThreadManager.cs
- CallTemplateAction.cs
- ListViewItem.cs
- SlotInfo.cs
- ErrorFormatter.cs
- SimpleLine.cs
- GetWinFXPath.cs
- TextFormatterImp.cs
- CookieHandler.cs
- SafeNativeMethods.cs
- CheckBox.cs
- AccessDataSourceWizardForm.cs
- ModelTreeEnumerator.cs
- LinkArea.cs
- RuntimeIdentifierPropertyAttribute.cs
- PathGradientBrush.cs
- DrawingGroup.cs
- EventLogLink.cs
- DesignerAdapterUtil.cs
- SendAgentStatusRequest.cs
- MultiAsyncResult.cs
- ServiceModelSectionGroup.cs
- SoapFormatterSinks.cs