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 / CompiledRegexRunnerFactory.cs / 1 / CompiledRegexRunnerFactory.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System.Reflection.Emit; using System.Diagnostics; using System.Security.Permissions; namespace System.Text.RegularExpressions { internal sealed class CompiledRegexRunnerFactory : RegexRunnerFactory { DynamicMethod goMethod; DynamicMethod findFirstCharMethod; DynamicMethod initTrackCountMethod; internal CompiledRegexRunnerFactory (DynamicMethod go, DynamicMethod firstChar, DynamicMethod trackCount) { this.goMethod = go; this.findFirstCharMethod = firstChar; this.initTrackCountMethod = trackCount; //Debug.Assert(goMethod != null && findFirstCharMethod != null && initTrackCountMethod != null, "can't be null"); } protected internal override RegexRunner CreateInstance() { CompiledRegexRunner runner = new CompiledRegexRunner(); new ReflectionPermission(PermissionState.Unrestricted).Assert(); runner.SetDelegates((NoParamDelegate) goMethod.CreateDelegate(typeof(NoParamDelegate)), (FindFirstCharDelegate) findFirstCharMethod.CreateDelegate(typeof(FindFirstCharDelegate)), (NoParamDelegate) initTrackCountMethod.CreateDelegate(typeof(NoParamDelegate))); return runner; } } internal delegate RegexRunner CreateInstanceDelegate(); } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System.Reflection.Emit; using System.Diagnostics; using System.Security.Permissions; namespace System.Text.RegularExpressions { internal sealed class CompiledRegexRunnerFactory : RegexRunnerFactory { DynamicMethod goMethod; DynamicMethod findFirstCharMethod; DynamicMethod initTrackCountMethod; internal CompiledRegexRunnerFactory (DynamicMethod go, DynamicMethod firstChar, DynamicMethod trackCount) { this.goMethod = go; this.findFirstCharMethod = firstChar; this.initTrackCountMethod = trackCount; //Debug.Assert(goMethod != null && findFirstCharMethod != null && initTrackCountMethod != null, "can't be null"); } protected internal override RegexRunner CreateInstance() { CompiledRegexRunner runner = new CompiledRegexRunner(); new ReflectionPermission(PermissionState.Unrestricted).Assert(); runner.SetDelegates((NoParamDelegate) goMethod.CreateDelegate(typeof(NoParamDelegate)), (FindFirstCharDelegate) findFirstCharMethod.CreateDelegate(typeof(FindFirstCharDelegate)), (NoParamDelegate) initTrackCountMethod.CreateDelegate(typeof(NoParamDelegate))); return runner; } } internal delegate RegexRunner CreateInstanceDelegate(); } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ScopeElementCollection.cs
- WorkflowCreationContext.cs
- DescendantQuery.cs
- KoreanCalendar.cs
- CodeMethodInvokeExpression.cs
- CatalogPartCollection.cs
- ComponentDispatcherThread.cs
- PathGradientBrush.cs
- TextEditorThreadLocalStore.cs
- PrintPageEvent.cs
- IPCCacheManager.cs
- DiagnosticsConfiguration.cs
- MasterPageBuildProvider.cs
- GiveFeedbackEvent.cs
- TextServicesHost.cs
- CorrelationManager.cs
- ActivityScheduledRecord.cs
- FormViewRow.cs
- Visitors.cs
- xmlfixedPageInfo.cs
- RectAnimationBase.cs
- UrlPropertyAttribute.cs
- ProfileProvider.cs
- RegexCompiler.cs
- ProjectionCamera.cs
- securitycriticaldataformultiplegetandset.cs
- RenderTargetBitmap.cs
- ValidationRuleCollection.cs
- DrawingContext.cs
- ComponentResourceKeyConverter.cs
- TTSEvent.cs
- OrderingExpression.cs
- ToolStripOverflowButton.cs
- ValidationSummaryDesigner.cs
- DocumentAutomationPeer.cs
- odbcmetadatacollectionnames.cs
- StrokeDescriptor.cs
- EntityDataSourceDesigner.cs
- SmtpTransport.cs
- BooleanConverter.cs
- TextCharacters.cs
- HtmlElement.cs
- ExtendedPropertyDescriptor.cs
- WorkflowApplicationCompletedException.cs
- EnumerationRangeValidationUtil.cs
- RightNameExpirationInfoPair.cs
- UrlPath.cs
- WindowsTitleBar.cs
- ZoneButton.cs
- PropertyAccessVisitor.cs
- DataSet.cs
- AlphaSortedEnumConverter.cs
- SocketSettings.cs
- ToolStripItemClickedEventArgs.cs
- HwndStylusInputProvider.cs
- ErrorLog.cs
- TripleDES.cs
- MeshGeometry3D.cs
- ValueChangedEventManager.cs
- EncoderReplacementFallback.cs
- __FastResourceComparer.cs
- FileDialog_Vista.cs
- DependentList.cs
- ProvidersHelper.cs
- XmlResolver.cs
- IChannel.cs
- XmlWriter.cs
- RegexRunner.cs
- BridgeDataReader.cs
- PageVisual.cs
- NavigationService.cs
- PolicyManager.cs
- ExceptionUtil.cs
- QueryContinueDragEventArgs.cs
- ImportFileRequest.cs
- ScrollPattern.cs
- EventManager.cs
- PrivilegeNotHeldException.cs
- AggregateNode.cs
- WebPartDescriptionCollection.cs
- SqlServices.cs
- ScrollViewer.cs
- GeometryDrawing.cs
- ReadOnlyDataSourceView.cs
- NativeCompoundFileAPIs.cs
- BaseDataList.cs
- CodeObjectCreateExpression.cs
- CircleEase.cs
- PersistenceParticipant.cs
- CanonicalizationDriver.cs
- ReadOnlyObservableCollection.cs
- XamlSerializerUtil.cs
- ConsumerConnectionPointCollection.cs
- BinaryFormatter.cs
- ToolStripSeparatorRenderEventArgs.cs
- OAVariantLib.cs
- Mappings.cs
- CodeExpressionCollection.cs
- IItemProperties.cs
- ProjectionRewriter.cs