Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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(); } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// 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(); } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- MobileResource.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- BufferedStream.cs
- WinFormsUtils.cs
- LogReserveAndAppendState.cs
- DefaultPrintController.cs
- PlainXmlDeserializer.cs
- ConfigurationException.cs
- BuildProvidersCompiler.cs
- Module.cs
- ToolboxDataAttribute.cs
- Transactions.cs
- ResXResourceSet.cs
- XsdBuildProvider.cs
- HttpBufferlessInputStream.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- DuplexChannelFactory.cs
- PeerInvitationResponse.cs
- TextReader.cs
- __ConsoleStream.cs
- ConnectivityStatus.cs
- XmlWhitespace.cs
- URLString.cs
- ThrowHelper.cs
- ReplyChannel.cs
- AspNetHostingPermission.cs
- ArrayConverter.cs
- BaseParaClient.cs
- PerfCounters.cs
- GenericAuthenticationEventArgs.cs
- PhysicalAddress.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- ToolboxCategoryItems.cs
- SystemIPInterfaceProperties.cs
- WindowsTab.cs
- WebConfigurationHostFileChange.cs
- TypeConverterAttribute.cs
- InternalPolicyElement.cs
- DataRelationCollection.cs
- SiteMapNodeCollection.cs
- Compensation.cs
- XmlIgnoreAttribute.cs
- ImageIndexConverter.cs
- UserControlParser.cs
- ProgressiveCrcCalculatingStream.cs
- RegexWorker.cs
- PtsContext.cs
- XpsLiterals.cs
- DirectoryGroupQuery.cs
- XpsFixedDocumentSequenceReaderWriter.cs
- ReflectTypeDescriptionProvider.cs
- NativeDirectoryServicesQueryAPIs.cs
- ContainerVisual.cs
- DataTableMappingCollection.cs
- BeginCreateSecurityTokenRequest.cs
- XmlDataSourceView.cs
- ObjectDataSourceView.cs
- CanonicalFontFamilyReference.cs
- X509ChainElement.cs
- SettingsPropertyIsReadOnlyException.cs
- ScrollableControl.cs
- ToolbarAUtomationPeer.cs
- DataBindingHandlerAttribute.cs
- PeerName.cs
- wmiprovider.cs
- PropertyMapper.cs
- RoleGroup.cs
- DescendantBaseQuery.cs
- ExtendedPropertyCollection.cs
- SmtpFailedRecipientException.cs
- KeyEventArgs.cs
- NavigateEvent.cs
- MiniMapControl.xaml.cs
- TextRange.cs
- LogArchiveSnapshot.cs
- SR.cs
- RouteData.cs
- CachedPathData.cs
- DataGridViewCellToolTipTextNeededEventArgs.cs
- SecurityListenerSettingsLifetimeManager.cs
- MetaType.cs
- Pair.cs
- XsltLibrary.cs
- DataObjectPastingEventArgs.cs
- InvariantComparer.cs
- LiteralLink.cs
- RuleSetDialog.Designer.cs
- FunctionCommandText.cs
- CommandDesigner.cs
- ArrangedElement.cs
- DeviceContext2.cs
- AssemblyBuilderData.cs
- BeginStoryboard.cs
- DynamicDiscoveryDocument.cs
- WSTrustDec2005.cs
- ManagementQuery.cs
- CatalogZoneBase.cs
- Shape.cs
- ToggleButtonAutomationPeer.cs
- InheritanceService.cs