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
- LayoutSettings.cs
- FrameworkContextData.cs
- PnrpPermission.cs
- ListControlDesigner.cs
- ProtocolsSection.cs
- DesignerWebPartChrome.cs
- ApplicationInfo.cs
- ConsoleKeyInfo.cs
- GeometryDrawing.cs
- CngAlgorithmGroup.cs
- StringUtil.cs
- RectangleGeometry.cs
- MarkupExtensionParser.cs
- IISUnsafeMethods.cs
- PixelFormatConverter.cs
- Configuration.cs
- ObjectConverter.cs
- SHA512Managed.cs
- GorillaCodec.cs
- FtpWebResponse.cs
- StylusPoint.cs
- MultiBinding.cs
- MultiView.cs
- DataGridState.cs
- ScrollChrome.cs
- NumberFormatInfo.cs
- StretchValidation.cs
- METAHEADER.cs
- SoapElementAttribute.cs
- WebPartConnectionsConnectVerb.cs
- DemultiplexingClientMessageFormatter.cs
- RefreshEventArgs.cs
- TcpConnectionPoolSettingsElement.cs
- XamlSerializerUtil.cs
- FilteredSchemaElementLookUpTable.cs
- ResourceSet.cs
- Ref.cs
- Compiler.cs
- MetadataCollection.cs
- PropertyChangedEventManager.cs
- CompileXomlTask.cs
- DataSpaceManager.cs
- ReflectPropertyDescriptor.cs
- ActiveXHost.cs
- FaultPropagationQuery.cs
- CodeTypeMemberCollection.cs
- DataGridViewColumnCollection.cs
- BasicDesignerLoader.cs
- Single.cs
- VirtualizedCellInfoCollection.cs
- FacetValueContainer.cs
- SecureEnvironment.cs
- ParameterDataSourceExpression.cs
- GeneratedContractType.cs
- XmlTextAttribute.cs
- MaskedTextProvider.cs
- HttpFileCollection.cs
- SiteMapNodeItem.cs
- BroadcastEventHelper.cs
- Object.cs
- NamespaceTable.cs
- EntityTypeEmitter.cs
- ClientConfigurationSystem.cs
- DesignerUtils.cs
- ViewValidator.cs
- DataGridViewCellLinkedList.cs
- VirtualPathUtility.cs
- SQLInt64.cs
- CustomErrorCollection.cs
- GridEntry.cs
- AsymmetricSignatureDeformatter.cs
- DispatcherExceptionFilterEventArgs.cs
- LineMetrics.cs
- FloaterBaseParaClient.cs
- TextAnchor.cs
- Msec.cs
- NonBatchDirectoryCompiler.cs
- NotifyInputEventArgs.cs
- MetadataPropertyCollection.cs
- XmlILOptimizerVisitor.cs
- ContainerUtilities.cs
- DesignerActionGlyph.cs
- EntityCollection.cs
- ListViewDesigner.cs
- UserControl.cs
- TriggerBase.cs
- TitleStyle.cs
- BamlLocalizabilityResolver.cs
- WebPartDisplayMode.cs
- LogicalMethodInfo.cs
- XamlBrushSerializer.cs
- ToolStripSplitButton.cs
- FastPropertyAccessor.cs
- RuntimeUtils.cs
- UInt16.cs
- DateTimeValueSerializerContext.cs
- PropertyGeneratedEventArgs.cs
- WindowsAuthenticationEventArgs.cs
- ListBoxItem.cs
- RegionIterator.cs