Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- XmlCustomFormatter.cs
- InternalConfigEventArgs.cs
- WmfPlaceableFileHeader.cs
- Options.cs
- MaskDescriptors.cs
- NativeMethods.cs
- CodeDirectoryCompiler.cs
- WebPartTransformer.cs
- XmlDigitalSignatureProcessor.cs
- DataSourceListEditor.cs
- DataControlLinkButton.cs
- EventDescriptor.cs
- WebSysDefaultValueAttribute.cs
- AnonymousIdentificationModule.cs
- QueryableFilterUserControl.cs
- Vector3DAnimationBase.cs
- ThicknessAnimationUsingKeyFrames.cs
- XmlTypeMapping.cs
- CorruptingExceptionCommon.cs
- DefaultMemberAttribute.cs
- ToolStripGripRenderEventArgs.cs
- SettingsSavedEventArgs.cs
- NativeMethods.cs
- PageRequestManager.cs
- DataGridViewRowCancelEventArgs.cs
- WinFormsUtils.cs
- TransactionState.cs
- TypeNameConverter.cs
- StorageMappingItemCollection.cs
- TextTreeUndo.cs
- UserInitiatedNavigationPermission.cs
- NameGenerator.cs
- SchemaTableColumn.cs
- DataSourceView.cs
- SqlException.cs
- QuadraticBezierSegment.cs
- PersistenceTypeAttribute.cs
- CacheMemory.cs
- StorageRoot.cs
- HttpCacheVary.cs
- MexNamedPipeBindingElement.cs
- InputBinding.cs
- SHA1.cs
- MatchAttribute.cs
- PathFigureCollectionConverter.cs
- DNS.cs
- ToggleProviderWrapper.cs
- WindowHideOrCloseTracker.cs
- HtmlHead.cs
- ZoomPercentageConverter.cs
- _TransmitFileOverlappedAsyncResult.cs
- TypeLibConverter.cs
- ImportContext.cs
- EdmComplexPropertyAttribute.cs
- Activity.cs
- FormattedTextSymbols.cs
- SystemColors.cs
- ClientScriptManager.cs
- CancellationTokenRegistration.cs
- PageAsyncTask.cs
- DetailsViewPageEventArgs.cs
- ListenerConfig.cs
- AccessDataSource.cs
- ProcessHost.cs
- IxmlLineInfo.cs
- MemberNameValidator.cs
- BitmapImage.cs
- ComplexObject.cs
- ProviderIncompatibleException.cs
- ColorBuilder.cs
- ClassGenerator.cs
- FilteredDataSetHelper.cs
- OdbcRowUpdatingEvent.cs
- DocumentXPathNavigator.cs
- TimeoutHelper.cs
- PackagingUtilities.cs
- ResourceWriter.cs
- SqlTopReducer.cs
- DerivedKeySecurityToken.cs
- MarshalByRefObject.cs
- Base64Decoder.cs
- XXXInfos.cs
- WorkflowApplicationException.cs
- ArgumentException.cs
- CodeDomConfigurationHandler.cs
- HotSpotCollection.cs
- AsyncDataRequest.cs
- TraceHandler.cs
- ArrayListCollectionBase.cs
- Int64.cs
- ExecutionPropertyManager.cs
- OutgoingWebRequestContext.cs
- IUnknownConstantAttribute.cs
- ConnectionStringSettings.cs
- DataGridPageChangedEventArgs.cs
- serverconfig.cs
- TemplateEditingService.cs
- ListViewAutomationPeer.cs
- DataBindingList.cs
- UnSafeCharBuffer.cs