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
- InheritedPropertyDescriptor.cs
- EraserBehavior.cs
- ProvidersHelper.cs
- ObjectDataSourceView.cs
- ConfigurationException.cs
- SynchronizedInputProviderWrapper.cs
- Pts.cs
- ArrayTypeMismatchException.cs
- CacheSection.cs
- TrackPointCollection.cs
- XmlUtf8RawTextWriter.cs
- base64Transforms.cs
- ButtonPopupAdapter.cs
- PolicyLevel.cs
- DataObject.cs
- IisTraceWebEventProvider.cs
- _LocalDataStoreMgr.cs
- ReferencedType.cs
- X509Certificate.cs
- ButtonAutomationPeer.cs
- ReadOnlyPermissionSet.cs
- OdbcCommandBuilder.cs
- TableLayoutSettings.cs
- MediaElement.cs
- LambdaCompiler.Lambda.cs
- HtmlInputText.cs
- ContentOperations.cs
- SByteConverter.cs
- Timeline.cs
- PositiveTimeSpanValidatorAttribute.cs
- CodeEntryPointMethod.cs
- RadialGradientBrush.cs
- TraceLevelStore.cs
- WindowsGrip.cs
- XPathQueryGenerator.cs
- KernelTypeValidation.cs
- XmlElementCollection.cs
- TargetPerspective.cs
- ListSortDescription.cs
- TextTreeDeleteContentUndoUnit.cs
- IPEndPoint.cs
- XhtmlBasicImageAdapter.cs
- CheckBox.cs
- ValueSerializerAttribute.cs
- RuntimeHelpers.cs
- ToolStripControlHost.cs
- MsmqIntegrationAppDomainProtocolHandler.cs
- SamlAdvice.cs
- DiscoveryClientBindingElement.cs
- ListBox.cs
- ModifierKeysConverter.cs
- IndexingContentUnit.cs
- LaxModeSecurityHeaderElementInferenceEngine.cs
- TextTreeInsertUndoUnit.cs
- RtfToken.cs
- XamlReaderConstants.cs
- ManualWorkflowSchedulerService.cs
- DbConnectionPoolOptions.cs
- Point3DCollection.cs
- Triangle.cs
- ErrorLog.cs
- DataSourceXmlSerializer.cs
- StylusPointDescription.cs
- SizeFConverter.cs
- DeviceFilterDictionary.cs
- __Filters.cs
- DataGridTextBoxColumn.cs
- HierarchicalDataSourceConverter.cs
- XmlSchemaComplexContentRestriction.cs
- ValueOfAction.cs
- SoapReflectionImporter.cs
- PeerNameRecord.cs
- DataServiceHost.cs
- ObjectTokenCategory.cs
- SmiRecordBuffer.cs
- ForeignKeyConstraint.cs
- DataControlFieldCollection.cs
- Matrix3D.cs
- Debug.cs
- Effect.cs
- SizeFConverter.cs
- SynchronizationContext.cs
- BindingExpressionBase.cs
- SafeFileMappingHandle.cs
- HuffmanTree.cs
- RectConverter.cs
- ObjectContext.cs
- DataGridViewSelectedRowCollection.cs
- CodeBlockBuilder.cs
- RuntimeEnvironment.cs
- WindowsIdentity.cs
- DefaultEventAttribute.cs
- SystemWebCachingSectionGroup.cs
- TopClause.cs
- XmlTextAttribute.cs
- FileDialogCustomPlaces.cs
- ViewCellRelation.cs
- EmissiveMaterial.cs
- Token.cs
- PrincipalPermission.cs