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
- DataRowComparer.cs
- SynchronizedDispatch.cs
- PerspectiveCamera.cs
- InstancePersistence.cs
- WorkflowDesignerColors.cs
- Canvas.cs
- CompiledIdentityConstraint.cs
- Fonts.cs
- SamlAssertionKeyIdentifierClause.cs
- HttpCookiesSection.cs
- OdbcReferenceCollection.cs
- SiteMapNodeItemEventArgs.cs
- ViewLoader.cs
- ConnectionManagementElementCollection.cs
- _SpnDictionary.cs
- AssemblyName.cs
- Menu.cs
- SHA384.cs
- SqlCommand.cs
- FactoryRecord.cs
- ObsoleteAttribute.cs
- LinqDataSource.cs
- CodeArrayCreateExpression.cs
- WMIGenerator.cs
- DataGridViewLinkCell.cs
- FreeIndexList.cs
- SemaphoreFullException.cs
- ToggleButtonAutomationPeer.cs
- DataSourceXmlSerializationAttribute.cs
- InvalidPropValue.cs
- ListDesigner.cs
- ValidatorCollection.cs
- StringExpressionSet.cs
- ToolstripProfessionalRenderer.cs
- Page.cs
- DefaultValueAttribute.cs
- SpeechRecognizer.cs
- QueryContinueDragEventArgs.cs
- IntPtr.cs
- TreeChangeInfo.cs
- XmlNodeComparer.cs
- TableLayoutSettingsTypeConverter.cs
- XPathNodeList.cs
- ChooseAction.cs
- CollectionViewProxy.cs
- OracleFactory.cs
- GetImportFileNameRequest.cs
- CommentAction.cs
- ToolStripSeparatorRenderEventArgs.cs
- BufferedGraphics.cs
- DebugController.cs
- VisualBrush.cs
- DataGridPageChangedEventArgs.cs
- SequentialOutput.cs
- SqlUnionizer.cs
- BamlResourceDeserializer.cs
- DSASignatureDeformatter.cs
- XomlCompilerError.cs
- SignatureToken.cs
- ArgumentsParser.cs
- ComboBox.cs
- CodeDOMUtility.cs
- Activity.cs
- CloudCollection.cs
- SoapObjectInfo.cs
- BuiltInExpr.cs
- FontCacheUtil.cs
- MouseButtonEventArgs.cs
- MetadataProperty.cs
- GeneralTransform2DTo3D.cs
- CreateParams.cs
- XmlSerializer.cs
- XslCompiledTransform.cs
- EntityRecordInfo.cs
- DataColumn.cs
- Int64Storage.cs
- printdlgexmarshaler.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- ToolStripTextBox.cs
- XmlDataSource.cs
- WebSysDescriptionAttribute.cs
- ColorConvertedBitmapExtension.cs
- AttributeEmitter.cs
- OpenCollectionAsyncResult.cs
- FamilyCollection.cs
- WebSysDescriptionAttribute.cs
- VectorAnimationBase.cs
- BaseValidator.cs
- ClientProxyGenerator.cs
- SecureUICommand.cs
- EntityDataSourceSelectingEventArgs.cs
- TraceListener.cs
- PolicyException.cs
- MultiSelectRootGridEntry.cs
- FixedTextContainer.cs
- AnimationException.cs
- ProgressBarHighlightConverter.cs
- FtpCachePolicyElement.cs
- InstancePersistenceContext.cs
- CellQuery.cs