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
- PingReply.cs
- loginstatus.cs
- ConfigPathUtility.cs
- FrameworkTemplate.cs
- COSERVERINFO.cs
- UpDownBase.cs
- XsdDateTime.cs
- SqlBooleanizer.cs
- Visitors.cs
- RegistryDataKey.cs
- HttpSessionStateWrapper.cs
- ReadOnlyActivityGlyph.cs
- StateDesigner.TransitionInfo.cs
- ExpressionBindingCollection.cs
- FaultCode.cs
- WebHttpSecurity.cs
- ClientTargetSection.cs
- _NegoStream.cs
- BaseCollection.cs
- WindowsIdentity.cs
- ExpressionParser.cs
- TargetException.cs
- GridItemPattern.cs
- CodeAttributeDeclaration.cs
- Point3DConverter.cs
- PageThemeBuildProvider.cs
- ScriptingJsonSerializationSection.cs
- IfElseDesigner.xaml.cs
- UserPreferenceChangedEventArgs.cs
- EventLogPermission.cs
- RelationshipConverter.cs
- NegatedCellConstant.cs
- SiteMapNodeCollection.cs
- LocationReferenceValue.cs
- GridViewEditEventArgs.cs
- XhtmlBasicPanelAdapter.cs
- QilInvokeEarlyBound.cs
- SystemNetworkInterface.cs
- InputLanguageProfileNotifySink.cs
- ConnectionOrientedTransportBindingElement.cs
- ThemeDirectoryCompiler.cs
- XmlAttributeOverrides.cs
- ErrorHandlerModule.cs
- BaseCollection.cs
- EmptyStringExpandableObjectConverter.cs
- EntitySetRetriever.cs
- NumberSubstitution.cs
- MetaModel.cs
- PartitionResolver.cs
- EntityContainer.cs
- ObjectViewQueryResultData.cs
- OleDragDropHandler.cs
- PageHandlerFactory.cs
- IgnoreDeviceFilterElementCollection.cs
- Interlocked.cs
- PeerTransportSecuritySettings.cs
- SmiRequestExecutor.cs
- AdapterUtil.cs
- DataStorage.cs
- RegexTypeEditor.cs
- UIElementIsland.cs
- PermissionAttributes.cs
- CallbackValidatorAttribute.cs
- FixedPageAutomationPeer.cs
- TabControlToolboxItem.cs
- StorageModelBuildProvider.cs
- URLEditor.cs
- MessageDescription.cs
- SQLBoolean.cs
- GridViewHeaderRowPresenterAutomationPeer.cs
- AddInActivator.cs
- XmlSchemaElement.cs
- HMACMD5.cs
- Win32.cs
- CodeMemberMethod.cs
- PointAnimationBase.cs
- SelectionProviderWrapper.cs
- MimeMultiPart.cs
- ConfigurationValidatorBase.cs
- BitmapFrame.cs
- FamilyMap.cs
- ViewDesigner.cs
- MimeTypePropertyAttribute.cs
- CodeValidator.cs
- TextLineResult.cs
- FixedFlowMap.cs
- StringWriter.cs
- Stack.cs
- NamespaceQuery.cs
- ButtonRenderer.cs
- ArrayList.cs
- SevenBitStream.cs
- RawMouseInputReport.cs
- MemoryFailPoint.cs
- SpanIndex.cs
- StateFinalizationActivity.cs
- SamlAssertionDirectKeyIdentifierClause.cs
- SessionStateUtil.cs
- SkewTransform.cs
- ActivityCodeDomSerializationManager.cs