Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Regex / System / Text / RegularExpressions / CompiledRegexRunner.cs / 1305376 / CompiledRegexRunner.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
using System;
using System.Diagnostics;
using System.Reflection.Emit;
#if !SILVERLIGHT
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);
}
#endif
// 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;
#if !SILVERLIGHT
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);
}
#endif
// 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
- DataGridViewDesigner.cs
- OrderedDictionaryStateHelper.cs
- EntityDataSourceColumn.cs
- PointLightBase.cs
- TextViewBase.cs
- ReservationNotFoundException.cs
- CalendarItem.cs
- WebPartDescription.cs
- SeparatorAutomationPeer.cs
- HtmlToClrEventProxy.cs
- SystemBrushes.cs
- oledbmetadatacollectionnames.cs
- TreeView.cs
- AssemblyBuilder.cs
- SettingsPropertyCollection.cs
- CultureInfoConverter.cs
- DataGridViewBand.cs
- CalendarDateRangeChangingEventArgs.cs
- DriveNotFoundException.cs
- HtmlPanelAdapter.cs
- RegexCompiler.cs
- NavigationFailedEventArgs.cs
- ReverseQueryOperator.cs
- Variable.cs
- TextLineBreak.cs
- SecUtil.cs
- ParseHttpDate.cs
- DiscoveryService.cs
- ComponentResourceManager.cs
- WindowsSlider.cs
- IResourceProvider.cs
- GridViewRowEventArgs.cs
- FileUtil.cs
- MILUtilities.cs
- SqlIdentifier.cs
- BindingNavigatorDesigner.cs
- NonVisualControlAttribute.cs
- Size.cs
- ScriptControlManager.cs
- MediaContext.cs
- TypeSystem.cs
- ProxyWebPart.cs
- ForeignKeyConstraint.cs
- CodeDomConfigurationHandler.cs
- CachingHintValidation.cs
- PassportAuthentication.cs
- CommandTreeTypeHelper.cs
- SystemDiagnosticsSection.cs
- ValuePattern.cs
- DrawingImage.cs
- ImageButton.cs
- SecurityUtils.cs
- EntityDataSourceColumn.cs
- StylusPointCollection.cs
- ResourceDictionary.cs
- TextTreeUndoUnit.cs
- CodeMemberMethod.cs
- httpserverutility.cs
- EventWaitHandle.cs
- XD.cs
- ThousandthOfEmRealPoints.cs
- XmlDataSource.cs
- XmlWrappingReader.cs
- XhtmlBasicSelectionListAdapter.cs
- MembershipSection.cs
- MeasureData.cs
- BeginStoryboard.cs
- DataPager.cs
- XmlElementAttributes.cs
- OptimisticConcurrencyException.cs
- Track.cs
- XmlRootAttribute.cs
- FigureParagraph.cs
- CustomErrorsSectionWrapper.cs
- AnimationClockResource.cs
- QilExpression.cs
- SqlDataReader.cs
- Polygon.cs
- HybridCollection.cs
- ScrollItemProviderWrapper.cs
- DecoderBestFitFallback.cs
- LinearGradientBrush.cs
- ConnectionDemuxer.cs
- CodeBlockBuilder.cs
- SequenceDesigner.cs
- Number.cs
- DoubleCollectionValueSerializer.cs
- SiteMapDataSource.cs
- ListGeneralPage.cs
- PointLight.cs
- GlyphInfoList.cs
- FigureParagraph.cs
- X509SecurityTokenProvider.cs
- basevalidator.cs
- XmlUTF8TextWriter.cs
- safemediahandle.cs
- WindowsFormsSynchronizationContext.cs
- HandlerBase.cs
- ReadWriteControlDesigner.cs
- ColorPalette.cs