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
- ObservableCollection.cs
- DisplayInformation.cs
- PrinterSettings.cs
- TypedDataSourceCodeGenerator.cs
- CommunicationException.cs
- FontNamesConverter.cs
- OperationPerformanceCounters.cs
- ValidationErrorCollection.cs
- EntitySqlQueryBuilder.cs
- TableItemPattern.cs
- GraphicsPathIterator.cs
- DataGridCellClipboardEventArgs.cs
- StyleModeStack.cs
- ColorConvertedBitmap.cs
- ConnectionsZone.cs
- DesignerActionListCollection.cs
- XPathEmptyIterator.cs
- XmlSchemaCompilationSettings.cs
- MeasureItemEvent.cs
- DataViewSetting.cs
- ParallelTimeline.cs
- BindableTemplateBuilder.cs
- VerificationAttribute.cs
- CollectionBase.cs
- CallbackValidator.cs
- ExpressionNormalizer.cs
- MetadataWorkspace.cs
- DefaultPropertiesToSend.cs
- OdbcError.cs
- Rect3DValueSerializer.cs
- FormatterConverter.cs
- ButtonBase.cs
- RoleManagerSection.cs
- SecurityKeyType.cs
- DataObject.cs
- IntegrationExceptionEventArgs.cs
- ComponentCommands.cs
- DesignerDataParameter.cs
- TypeConverterAttribute.cs
- ArrayHelper.cs
- NamespaceEmitter.cs
- XmlFormatWriterGenerator.cs
- NamespaceEmitter.cs
- PassportAuthenticationModule.cs
- Timer.cs
- StringCollection.cs
- RemoteWebConfigurationHostServer.cs
- DynamicRouteExpression.cs
- UserControl.cs
- Light.cs
- ObjectResult.cs
- BindingExpression.cs
- MimeTypeMapper.cs
- StrongNameIdentityPermission.cs
- loginstatus.cs
- SqlBuilder.cs
- ToolBarTray.cs
- InArgument.cs
- TimeSpanValidator.cs
- Trigger.cs
- RightsManagementEncryptionTransform.cs
- GridEntryCollection.cs
- ObjectFullSpanRewriter.cs
- RoleGroupCollection.cs
- Perspective.cs
- Mutex.cs
- Delegate.cs
- SemanticBasicElement.cs
- ServiceParser.cs
- OutputScope.cs
- InputLanguage.cs
- DropShadowBitmapEffect.cs
- FilterQuery.cs
- ResourceIDHelper.cs
- PrefixQName.cs
- FrameworkElementFactoryMarkupObject.cs
- SqlLiftWhereClauses.cs
- DataColumnCollection.cs
- Deflater.cs
- BinaryKeyIdentifierClause.cs
- OdbcParameter.cs
- DateTimeHelper.cs
- TextPointer.cs
- GroupQuery.cs
- CmsUtils.cs
- RecognizerInfo.cs
- LoginUtil.cs
- PKCS1MaskGenerationMethod.cs
- CustomCategoryAttribute.cs
- X509ChainPolicy.cs
- Addressing.cs
- HttpAsyncResult.cs
- PageParser.cs
- SecurityManager.cs
- ColorPalette.cs
- EventListenerClientSide.cs
- TextBoxBase.cs
- Drawing.cs
- SqlWorkflowPersistenceService.cs
- TransformPattern.cs