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
- PersonalizationAdministration.cs
- RtfNavigator.cs
- TabControlEvent.cs
- TheQuery.cs
- FixedSOMGroup.cs
- MdImport.cs
- CommandDevice.cs
- ControlPersister.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- XsltLoader.cs
- AdCreatedEventArgs.cs
- DurationConverter.cs
- FixedPage.cs
- ExpressionDumper.cs
- SqlServices.cs
- StylusEventArgs.cs
- StringInfo.cs
- SessionEndingEventArgs.cs
- MsmqReceiveParameters.cs
- DataGridCell.cs
- ExpressionSelection.cs
- CodeAttributeArgumentCollection.cs
- ChildDocumentBlock.cs
- XmlSchemaAppInfo.cs
- InnerItemCollectionView.cs
- DataRecordInternal.cs
- FigureParagraph.cs
- remotingproxy.cs
- Line.cs
- ProviderConnectionPoint.cs
- OleDbPermission.cs
- SHA384.cs
- UserPreferenceChangedEventArgs.cs
- SubMenuStyleCollection.cs
- MouseGestureConverter.cs
- XmlLanguageConverter.cs
- Separator.cs
- XmlSchemaSimpleType.cs
- CustomCredentialPolicy.cs
- TextContainer.cs
- TypeToArgumentTypeConverter.cs
- DefinitionBase.cs
- ResizeBehavior.cs
- Sorting.cs
- CurrentTimeZone.cs
- UnknownWrapper.cs
- HtmlInputFile.cs
- SerializationSectionGroup.cs
- externdll.cs
- AuthenticatedStream.cs
- TreeNodeEventArgs.cs
- NodeInfo.cs
- PointConverter.cs
- StylusEventArgs.cs
- WebServiceHandlerFactory.cs
- MouseGestureConverter.cs
- KeyedCollection.cs
- GridViewColumnCollectionChangedEventArgs.cs
- HtmlHistory.cs
- UnknownBitmapEncoder.cs
- TaiwanCalendar.cs
- InternalCompensate.cs
- XPathItem.cs
- Maps.cs
- SmtpNtlmAuthenticationModule.cs
- HttpPostLocalhostServerProtocol.cs
- RouteValueExpressionBuilder.cs
- Context.cs
- DataTemplateSelector.cs
- AffineTransform3D.cs
- XpsResourceDictionary.cs
- BindingSource.cs
- ContainerVisual.cs
- UnsignedPublishLicense.cs
- BinaryConverter.cs
- ContentTextAutomationPeer.cs
- SiteMapSection.cs
- ProxyWebPartConnectionCollection.cs
- LifetimeServices.cs
- HttpInputStream.cs
- FacetEnabledSchemaElement.cs
- RuntimeResourceSet.cs
- RemoteCryptoRsaServiceProvider.cs
- assertwrapper.cs
- ImageListStreamer.cs
- ScriptControlManager.cs
- OletxResourceManager.cs
- EntityDataSourceDataSelection.cs
- InstanceCompleteException.cs
- TextEditorCopyPaste.cs
- LoginDesigner.cs
- BaseCAMarshaler.cs
- BitmapMetadata.cs
- AffineTransform3D.cs
- AtomServiceDocumentSerializer.cs
- FormsAuthenticationCredentials.cs
- HttpCapabilitiesEvaluator.cs
- WmlFormAdapter.cs
- SectionVisual.cs
- WebPartEventArgs.cs