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
- ImageClickEventArgs.cs
- MissingFieldException.cs
- SQLResource.cs
- IdentitySection.cs
- PageStatePersister.cs
- BuilderInfo.cs
- SoapTypeAttribute.cs
- VSWCFServiceContractGenerator.cs
- SimpleHandlerFactory.cs
- SqlIdentifier.cs
- SqlUserDefinedAggregateAttribute.cs
- SqlDataSourceCache.cs
- DbgUtil.cs
- Visual3D.cs
- ProfilePropertyNameValidator.cs
- filewebrequest.cs
- SamlAssertion.cs
- StringConcat.cs
- AutomationPeer.cs
- StrokeNodeEnumerator.cs
- WaitHandle.cs
- SqlAliasesReferenced.cs
- ButtonPopupAdapter.cs
- BitmapCodecInfo.cs
- SourceFileBuildProvider.cs
- WindowPattern.cs
- XpsPartBase.cs
- Clock.cs
- TTSEngineTypes.cs
- DrawTreeNodeEventArgs.cs
- RuleAttributes.cs
- ValidationVisibilityAttribute.cs
- ComponentCommands.cs
- EventLogHandle.cs
- DataGridViewUtilities.cs
- AttachedAnnotation.cs
- TcpStreams.cs
- Vector3DKeyFrameCollection.cs
- SplitterCancelEvent.cs
- Inflater.cs
- Control.cs
- IPEndPoint.cs
- TableLayoutPanelBehavior.cs
- TreeNode.cs
- PairComparer.cs
- MatrixStack.cs
- DataSourceBooleanViewSchemaConverter.cs
- Pair.cs
- KeyTimeConverter.cs
- IsolatedStoragePermission.cs
- ImageAutomationPeer.cs
- SoapAttributeAttribute.cs
- ExpanderAutomationPeer.cs
- VariableQuery.cs
- Certificate.cs
- RangeValuePattern.cs
- ProjectionPruner.cs
- ConnectionManagementElementCollection.cs
- PackageStore.cs
- ObjectNavigationPropertyMapping.cs
- ServicePoint.cs
- BlurBitmapEffect.cs
- WebServiceParameterData.cs
- SignatureConfirmations.cs
- DropShadowBitmapEffect.cs
- MediaPlayer.cs
- _OSSOCK.cs
- CriticalExceptions.cs
- PhoneCallDesigner.cs
- XamlFrame.cs
- DirtyTextRange.cs
- WindowsFormsLinkLabel.cs
- RenderOptions.cs
- ImageClickEventArgs.cs
- CompiledQuery.cs
- ColorTransform.cs
- SecureUICommand.cs
- SupportsEventValidationAttribute.cs
- HMAC.cs
- ParentUndoUnit.cs
- ComboBoxDesigner.cs
- OutputCacheSettings.cs
- UnsafeMethods.cs
- CompilerCollection.cs
- PopOutPanel.cs
- ToolStripCodeDomSerializer.cs
- GenericTypeParameterBuilder.cs
- Endpoint.cs
- IgnoreFileBuildProvider.cs
- SrgsDocument.cs
- QuaternionAnimationBase.cs
- ActionFrame.cs
- MenuBase.cs
- SettingsPropertyValue.cs
- DataGridHyperlinkColumn.cs
- DelegatingTypeDescriptionProvider.cs
- RangeValueProviderWrapper.cs
- MethodBuilder.cs
- StylusEventArgs.cs
- PointAnimationUsingPath.cs