Code:
/ DotNET / DotNET / 8.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
- IPEndPointCollection.cs
- CompoundFileStreamReference.cs
- AuthenticatedStream.cs
- PasswordBox.cs
- SQLInt16Storage.cs
- UnsafeNativeMethods.cs
- webclient.cs
- EditorPart.cs
- PrimitiveXmlSerializers.cs
- MetadataFile.cs
- PerformanceCounterPermissionEntry.cs
- CodeParameterDeclarationExpression.cs
- InitialServerConnectionReader.cs
- DataControlCommands.cs
- activationcontext.cs
- Win32.cs
- ByteAnimation.cs
- SelfIssuedAuthRSAPKCS1SignatureDeformatter.cs
- RemotingConfiguration.cs
- OperatorExpressions.cs
- ListBoxChrome.cs
- XmlSchemaSimpleContent.cs
- ImageDrawing.cs
- XmlReflectionImporter.cs
- GenericTypeParameterBuilder.cs
- OperatingSystemVersionCheck.cs
- OperationResponse.cs
- DataControlImageButton.cs
- TransformerTypeCollection.cs
- OutOfProcStateClientManager.cs
- InnerItemCollectionView.cs
- DataPagerFieldItem.cs
- FamilyTypeface.cs
- TextSegment.cs
- Resources.Designer.cs
- Expression.cs
- NumberSubstitution.cs
- BlurEffect.cs
- DbgUtil.cs
- httpapplicationstate.cs
- HtmlEncodedRawTextWriter.cs
- TextProperties.cs
- ListManagerBindingsCollection.cs
- BulletChrome.cs
- DataControlReference.cs
- brushes.cs
- RegexTree.cs
- WorkflowMarkupElementEventArgs.cs
- TemplateKeyConverter.cs
- Splitter.cs
- DataGridView.cs
- ImpersonationContext.cs
- CommandID.cs
- ActiveXSite.cs
- WebPartZone.cs
- SqlDataSourceQueryEditorForm.cs
- HostingPreferredMapPath.cs
- WebPart.cs
- TrustSection.cs
- IList.cs
- MarshalByValueComponent.cs
- PropertyTab.cs
- WinFormsSpinner.cs
- _NativeSSPI.cs
- DrawingBrush.cs
- UInt32Converter.cs
- MetabaseSettings.cs
- ZipArchive.cs
- XmlTypeMapping.cs
- AsyncResult.cs
- MetafileHeaderWmf.cs
- unitconverter.cs
- WebServiceResponseDesigner.cs
- SimpleHandlerBuildProvider.cs
- webclient.cs
- ImageMap.cs
- SmtpClient.cs
- StylusPoint.cs
- WebConfigurationFileMap.cs
- LZCodec.cs
- DocobjHost.cs
- OracleParameterBinding.cs
- COM2PictureConverter.cs
- webbrowsersite.cs
- Reference.cs
- FatalException.cs
- Decoder.cs
- SystemInfo.cs
- DropAnimation.xaml.cs
- WhitespaceRuleLookup.cs
- StructuredTypeEmitter.cs
- Literal.cs
- BamlLocalizationDictionary.cs
- MouseEvent.cs
- FlowDocumentView.cs
- TriggerActionCollection.cs
- HttpBrowserCapabilitiesBase.cs
- TextEditorMouse.cs
- SmiContext.cs
- EncoderReplacementFallback.cs