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
- OleDbTransaction.cs
- SamlAction.cs
- ValueSerializerAttribute.cs
- EntityDataSourceDesigner.cs
- ScriptIgnoreAttribute.cs
- DefaultObjectMappingItemCollection.cs
- OleDbCommandBuilder.cs
- XmlLanguageConverter.cs
- HealthMonitoringSection.cs
- DesignerResources.cs
- SchemaNamespaceManager.cs
- SqlFormatter.cs
- OptimalTextSource.cs
- FixedSOMPageElement.cs
- DoubleCollectionConverter.cs
- safemediahandle.cs
- FloaterParaClient.cs
- ExpressionNormalizer.cs
- EncodingInfo.cs
- MultiAsyncResult.cs
- SmiRecordBuffer.cs
- DockPattern.cs
- MyContact.cs
- AutoResetEvent.cs
- EventBindingService.cs
- Section.cs
- TemplateParser.cs
- DataStreams.cs
- InvokePatternIdentifiers.cs
- HttpsTransportElement.cs
- X509CertificateEndpointIdentity.cs
- EdmRelationshipNavigationPropertyAttribute.cs
- XomlCompilerHelpers.cs
- BamlLocalizer.cs
- RemoteWebConfigurationHostServer.cs
- SecurityState.cs
- WaitHandleCannotBeOpenedException.cs
- ToolbarAUtomationPeer.cs
- FileChangesMonitor.cs
- TriState.cs
- HttpHostedTransportConfiguration.cs
- SortDescriptionCollection.cs
- UnSafeCharBuffer.cs
- MetadataUtilsSmi.cs
- Set.cs
- MatrixConverter.cs
- SerializationHelper.cs
- OpacityConverter.cs
- MarginCollapsingState.cs
- ThemeDirectoryCompiler.cs
- CryptoApi.cs
- CompositeDataBoundControl.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- InputDevice.cs
- RectAnimationClockResource.cs
- EventDescriptorCollection.cs
- MetadataCacheItem.cs
- XLinq.cs
- ScriptManager.cs
- DecimalAnimation.cs
- EntityDataSourceView.cs
- InstanceKeyNotReadyException.cs
- MonthCalendar.cs
- TableLayoutSettings.cs
- WindowInteractionStateTracker.cs
- XXXOnTypeBuilderInstantiation.cs
- ByteRangeDownloader.cs
- PersistChildrenAttribute.cs
- ProfileEventArgs.cs
- DataSourceDescriptorCollection.cs
- Activator.cs
- DataGridViewCellToolTipTextNeededEventArgs.cs
- AdornerLayer.cs
- FolderLevelBuildProvider.cs
- DesignTableCollection.cs
- ComEventsHelper.cs
- CommonObjectSecurity.cs
- Vector3dCollection.cs
- ValueUnavailableException.cs
- TableLayoutStyle.cs
- SQLInt64.cs
- HtmlSelect.cs
- Geometry3D.cs
- ToolboxComponentsCreatingEventArgs.cs
- SingleConverter.cs
- lengthconverter.cs
- ProcessThreadCollection.cs
- RelationshipType.cs
- sqlnorm.cs
- ResourceKey.cs
- iisPickupDirectory.cs
- OutputCacheSettingsSection.cs
- InfoCardRSAOAEPKeyExchangeFormatter.cs
- TextEditorMouse.cs
- COM2ExtendedUITypeEditor.cs
- DNS.cs
- SoundPlayer.cs
- HashMembershipCondition.cs
- MimeTypeMapper.cs
- WindowsAuthenticationEventArgs.cs