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
- SqlTriggerContext.cs
- ToolboxItemCollection.cs
- TextTreeRootNode.cs
- BamlTreeNode.cs
- sqlstateclientmanager.cs
- DefaultShape.cs
- PermissionSet.cs
- ActiveXContainer.cs
- AudioBase.cs
- NameValueSectionHandler.cs
- MetafileHeaderEmf.cs
- MessageQueueAccessControlEntry.cs
- EditingCommands.cs
- DbProviderServices.cs
- FileUtil.cs
- LookupBindingPropertiesAttribute.cs
- XPathNodeIterator.cs
- PeerNearMe.cs
- EmptyQuery.cs
- VisualBrush.cs
- SortQueryOperator.cs
- XmlAggregates.cs
- OutputChannel.cs
- ClientConfigPaths.cs
- Panel.cs
- WeakRefEnumerator.cs
- ClaimSet.cs
- MenuItemAutomationPeer.cs
- hebrewshape.cs
- dataprotectionpermission.cs
- ObjectKeyFrameCollection.cs
- ApplicationBuildProvider.cs
- Menu.cs
- FlowDecisionLabelFeature.cs
- __Filters.cs
- SymmetricKey.cs
- IdentitySection.cs
- BaseComponentEditor.cs
- IndentTextWriter.cs
- HuffCodec.cs
- ShutDownListener.cs
- datacache.cs
- HttpRequest.cs
- SafeCryptoHandles.cs
- smtpconnection.cs
- ConfigXmlComment.cs
- PointAnimation.cs
- _LoggingObject.cs
- HyperLinkColumn.cs
- SqlCacheDependencySection.cs
- HierarchicalDataTemplate.cs
- PropertyEntry.cs
- TokenCreationException.cs
- DeploymentExceptionMapper.cs
- SessionStateItemCollection.cs
- Tablet.cs
- SymLanguageType.cs
- InstancePersistenceCommand.cs
- WriteStateInfoBase.cs
- ShutDownListener.cs
- ConfigXmlSignificantWhitespace.cs
- StorageAssociationTypeMapping.cs
- ProgressChangedEventArgs.cs
- TableLayoutPanelCellPosition.cs
- TagMapCollection.cs
- DynamicResourceExtension.cs
- PathSegment.cs
- SmiRecordBuffer.cs
- QueueProcessor.cs
- ButtonField.cs
- FactoryGenerator.cs
- BuildProviderUtils.cs
- ExceptionRoutedEventArgs.cs
- HostingEnvironment.cs
- StrokeNodeOperations2.cs
- Speller.cs
- CircleHotSpot.cs
- ConfigurationLocation.cs
- IdleTimeoutMonitor.cs
- TextTreeExtractElementUndoUnit.cs
- PolicyManager.cs
- BamlLocalizer.cs
- TcpWorkerProcess.cs
- EventManager.cs
- ContextTokenTypeConverter.cs
- Point3DCollection.cs
- QilTernary.cs
- DataIdProcessor.cs
- ThreadAttributes.cs
- _SafeNetHandles.cs
- CacheSection.cs
- namescope.cs
- OleDbMetaDataFactory.cs
- TypeBuilderInstantiation.cs
- LogPolicy.cs
- PageEventArgs.cs
- ADMembershipProvider.cs
- InvalidComObjectException.cs
- ControlBuilderAttribute.cs
- cookie.cs