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
- Byte.cs
- Point3DIndependentAnimationStorage.cs
- TypeInitializationException.cs
- ResourceAttributes.cs
- ConfigsHelper.cs
- SerializationHelper.cs
- StateDesignerConnector.cs
- TextEditorThreadLocalStore.cs
- EllipseGeometry.cs
- AsymmetricKeyExchangeDeformatter.cs
- SelectorAutomationPeer.cs
- ChooseAction.cs
- SecurityResources.cs
- DataGridPagingPage.cs
- ObjectListCommandsPage.cs
- HttpHandler.cs
- RequestUriProcessor.cs
- CompositeTypefaceMetrics.cs
- ScrollBarRenderer.cs
- ProgressBar.cs
- CancelEventArgs.cs
- FixedSchema.cs
- elementinformation.cs
- TreeNodeCollection.cs
- IncrementalReadDecoders.cs
- RSAOAEPKeyExchangeDeformatter.cs
- BoundPropertyEntry.cs
- PublisherMembershipCondition.cs
- CacheAxisQuery.cs
- CreateUserErrorEventArgs.cs
- MediaScriptCommandRoutedEventArgs.cs
- JumpTask.cs
- DecimalConverter.cs
- JoinGraph.cs
- SymmetricKeyWrap.cs
- DataServiceRequestArgs.cs
- XmlElementAttribute.cs
- MetafileHeaderEmf.cs
- DataTemplateKey.cs
- BooleanAnimationBase.cs
- MostlySingletonList.cs
- StreamGeometryContext.cs
- PingReply.cs
- ResourceReader.cs
- FixedMaxHeap.cs
- UpdateCommand.cs
- Parsers.cs
- DbMetaDataColumnNames.cs
- ClientSettingsSection.cs
- InvariantComparer.cs
- FixedFlowMap.cs
- XmlArrayAttribute.cs
- ProjectionPathSegment.cs
- LinkDescriptor.cs
- ProcessHostConfigUtils.cs
- SendingRequestEventArgs.cs
- DbParameterCollection.cs
- SizeF.cs
- SynchronizedDispatch.cs
- CursorInteropHelper.cs
- SectionRecord.cs
- SessionState.cs
- InvalidFilterCriteriaException.cs
- PairComparer.cs
- WS2007HttpBindingCollectionElement.cs
- DrawingImage.cs
- PropertyValue.cs
- HandlerFactoryWrapper.cs
- DragDrop.cs
- BuildDependencySet.cs
- EventDescriptor.cs
- MarshalByRefObject.cs
- ToolStripSplitStackLayout.cs
- BamlLocalizabilityResolver.cs
- RNGCryptoServiceProvider.cs
- VersionPair.cs
- SQLString.cs
- ControlParameter.cs
- XslTransform.cs
- OracleConnectionFactory.cs
- DataTableMappingCollection.cs
- Highlights.cs
- CategoryGridEntry.cs
- StorageMappingFragment.cs
- NewArrayExpression.cs
- TypeExtensionSerializer.cs
- ManagedFilter.cs
- WsdlInspector.cs
- MultiBindingExpression.cs
- AsyncDataRequest.cs
- StorageScalarPropertyMapping.cs
- StrongNameUtility.cs
- SoundPlayerAction.cs
- ImageDesigner.cs
- MenuItemCollection.cs
- SymbolResolver.cs
- InProcStateClientManager.cs
- PrimitiveType.cs
- ProfileGroupSettings.cs
- ToolStripInSituService.cs