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
- EdgeModeValidation.cs
- ChangeNode.cs
- ParameterCollection.cs
- ReturnValue.cs
- ContainerCodeDomSerializer.cs
- Collection.cs
- ClientApiGenerator.cs
- CollectionViewGroupInternal.cs
- WindowsGraphicsCacheManager.cs
- _Events.cs
- CopyOnWriteList.cs
- EdmMember.cs
- ClientApiGenerator.cs
- PersonalizationProviderCollection.cs
- ExpressionsCollectionConverter.cs
- FindCriteriaApril2005.cs
- webclient.cs
- ClientSettingsProvider.cs
- ParentQuery.cs
- OrderByQueryOptionExpression.cs
- HttpCookie.cs
- TCEAdapterGenerator.cs
- MimeXmlReflector.cs
- EventBindingService.cs
- UiaCoreProviderApi.cs
- CardSpaceShim.cs
- ValidatorCollection.cs
- CatalogPartCollection.cs
- FixedTextBuilder.cs
- CssClassPropertyAttribute.cs
- CustomServiceCredentials.cs
- PolygonHotSpot.cs
- XNodeValidator.cs
- NameNode.cs
- IgnoreDataMemberAttribute.cs
- CodeTypeParameter.cs
- CompositeFontFamily.cs
- Ipv6Element.cs
- TreeView.cs
- SecurityException.cs
- SimpleExpression.cs
- XmlBinaryReader.cs
- FormatStringEditor.cs
- TableRow.cs
- RequestCache.cs
- diagnosticsswitches.cs
- SmiGettersStream.cs
- InvokeWebServiceDesigner.cs
- ErrorFormatterPage.cs
- SpecialFolderEnumConverter.cs
- InvokePatternIdentifiers.cs
- RegistryKey.cs
- UshortList2.cs
- TransformedBitmap.cs
- ObjectPersistData.cs
- SystemWebCachingSectionGroup.cs
- ToolStripPanelCell.cs
- XmlAttributes.cs
- CodeTypeMemberCollection.cs
- ScrollPattern.cs
- AsymmetricKeyExchangeDeformatter.cs
- RTLAwareMessageBox.cs
- AnnotationAdorner.cs
- DataGridHeaderBorder.cs
- OdbcConnectionString.cs
- DependencyObjectPropertyDescriptor.cs
- CapabilitiesState.cs
- Event.cs
- ResXDataNode.cs
- ZipIOLocalFileBlock.cs
- GridViewSelectEventArgs.cs
- FormViewPagerRow.cs
- webbrowsersite.cs
- DataGridRowsPresenter.cs
- SynchronizationLockException.cs
- followingsibling.cs
- MeasureItemEvent.cs
- ThicknessAnimationBase.cs
- PngBitmapEncoder.cs
- InternalConfigSettingsFactory.cs
- SqlNotificationRequest.cs
- SurrogateEncoder.cs
- BindingBase.cs
- CancellationToken.cs
- SQLConvert.cs
- CompositeFontFamily.cs
- PasswordRecovery.cs
- DrawingAttributes.cs
- XPathItem.cs
- ChineseLunisolarCalendar.cs
- LinqExpressionNormalizer.cs
- HiddenFieldPageStatePersister.cs
- MsmqInputChannel.cs
- XmlDocumentSchema.cs
- SortDescriptionCollection.cs
- TransactionContextValidator.cs
- DataTableMapping.cs
- InstanceView.cs
- CompilerGeneratedAttribute.cs
- Enumerable.cs