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

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- AvTraceFormat.cs
- ValueChangedEventManager.cs
- StorageMappingFragment.cs
- ImageCollectionEditor.cs
- EditorPartCollection.cs
- MatrixKeyFrameCollection.cs
- AtlasWeb.Designer.cs
- FontStyles.cs
- SByteStorage.cs
- ResourceIDHelper.cs
- InvokeMemberBinder.cs
- TableLayoutRowStyleCollection.cs
- Console.cs
- WithStatement.cs
- HelpInfo.cs
- XsltSettings.cs
- DefaultMemberAttribute.cs
- XmlCharCheckingWriter.cs
- CommandEventArgs.cs
- Point4D.cs
- XmlHierarchyData.cs
- DefaultWorkflowLoaderService.cs
- CodeBinaryOperatorExpression.cs
- LabelExpression.cs
- List.cs
- HtmlInputButton.cs
- WebPartMenuStyle.cs
- CatalogPartChrome.cs
- UpdateCommandGenerator.cs
- Viewport2DVisual3D.cs
- PerspectiveCamera.cs
- OracleParameterCollection.cs
- SEHException.cs
- TextEvent.cs
- OnOperation.cs
- RuntimeIdentifierPropertyAttribute.cs
- __Filters.cs
- MediaTimeline.cs
- RuntimeCompatibilityAttribute.cs
- LineGeometry.cs
- MissingFieldException.cs
- ClientSideProviderDescription.cs
- WebPartsSection.cs
- DecoderExceptionFallback.cs
- Script.cs
- TemplateBamlRecordReader.cs
- XhtmlConformanceSection.cs
- TraceRecords.cs
- _ProxyRegBlob.cs
- VariableBinder.cs
- reliableinputsessionchannel.cs
- ExceptionNotification.cs
- ContentPropertyAttribute.cs
- RayHitTestParameters.cs
- ObjectDataSourceView.cs
- DropShadowEffect.cs
- TextBoxView.cs
- ValidatorCollection.cs
- HtmlInputText.cs
- InternalBufferManager.cs
- WebReferenceOptions.cs
- PnrpPermission.cs
- ListViewSelectEventArgs.cs
- UrlMapping.cs
- XmlILCommand.cs
- Button.cs
- DesignerActionListCollection.cs
- CodeAttributeArgument.cs
- ThreadSafeList.cs
- CollectionBase.cs
- InvokeHandlers.cs
- EraserBehavior.cs
- ServiceOperationWrapper.cs
- NonVisualControlAttribute.cs
- CookieParameter.cs
- RequestCachePolicy.cs
- DataGridRowsPresenter.cs
- CheckBoxRenderer.cs
- pingexception.cs
- PersonalizationEntry.cs
- BoolExpressionVisitors.cs
- WorkItem.cs
- ToolConsole.cs
- InitializationEventAttribute.cs
- HuffCodec.cs
- VolatileEnlistmentState.cs
- DecoderFallback.cs
- ProfileWorkflowElement.cs
- ImpersonateTokenRef.cs
- ExtensionWindowHeader.cs
- SortQuery.cs
- FrameworkContextData.cs
- XsdDuration.cs
- XmlAnyAttributeAttribute.cs
- EntityContainerEntitySet.cs
- FloaterBaseParaClient.cs
- CategoryAttribute.cs
- JsonGlobals.cs
- ListArgumentProvider.cs
- EventData.cs