Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WF / Common / AuthoringOM / Compiler / CodeGeneration / CodeGenerationManager.cs / 1305376 / CodeGenerationManager.cs
namespace System.Workflow.ComponentModel.Compiler { using System; using System.ComponentModel.Design.Serialization; using System.Collections; using System.Collections.Generic; #region CodeGenerationManager public sealed class CodeGenerationManager : IServiceProvider { private Hashtable hashOfGenerators = new Hashtable(); private IServiceProvider serviceProvider = null; private ContextStack context = null; public CodeGenerationManager(IServiceProvider serviceProvider) { this.serviceProvider = serviceProvider; } public ContextStack Context { get { if (this.context == null) this.context = new ContextStack(); return this.context; } } #region IServiceProvider Members public object GetService(Type serviceType) { if (this.serviceProvider == null) return null; return this.serviceProvider.GetService(serviceType); } #endregion public ActivityCodeGenerator[] GetCodeGenerators(Type type) { if (type == null) throw new ArgumentNullException("type"); if (this.hashOfGenerators.Contains(type)) return ((List)this.hashOfGenerators[type]).ToArray(); List generators = new List (); // Return validators for other types such as Bind, XmolDocument, etc. foreach (ActivityCodeGenerator generator in ComponentDispenser.CreateComponents(type, typeof(ActivityCodeGeneratorAttribute))) { generators.Add(generator); } this.hashOfGenerators[type] = generators; return generators.ToArray(); } } #endregion } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. namespace System.Workflow.ComponentModel.Compiler { using System; using System.ComponentModel.Design.Serialization; using System.Collections; using System.Collections.Generic; #region CodeGenerationManager public sealed class CodeGenerationManager : IServiceProvider { private Hashtable hashOfGenerators = new Hashtable(); private IServiceProvider serviceProvider = null; private ContextStack context = null; public CodeGenerationManager(IServiceProvider serviceProvider) { this.serviceProvider = serviceProvider; } public ContextStack Context { get { if (this.context == null) this.context = new ContextStack(); return this.context; } } #region IServiceProvider Members public object GetService(Type serviceType) { if (this.serviceProvider == null) return null; return this.serviceProvider.GetService(serviceType); } #endregion public ActivityCodeGenerator[] GetCodeGenerators(Type type) { if (type == null) throw new ArgumentNullException("type"); if (this.hashOfGenerators.Contains(type)) return ((List )this.hashOfGenerators[type]).ToArray(); List generators = new List (); // Return validators for other types such as Bind, XmolDocument, etc. foreach (ActivityCodeGenerator generator in ComponentDispenser.CreateComponents(type, typeof(ActivityCodeGeneratorAttribute))) { generators.Add(generator); } this.hashOfGenerators[type] = generators; return generators.ToArray(); } } #endregion } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Transform3DGroup.cs
- WebPartDescriptionCollection.cs
- RayHitTestParameters.cs
- Timeline.cs
- DataGridViewColumnCollection.cs
- ListBoxItem.cs
- TransformValueSerializer.cs
- ParserOptions.cs
- X509Certificate2.cs
- QueryComponents.cs
- TextEditorCharacters.cs
- CacheAxisQuery.cs
- ValueExpressions.cs
- COM2IDispatchConverter.cs
- ObjectKeyFrameCollection.cs
- ListBindableAttribute.cs
- ECDiffieHellmanCng.cs
- DataGridCellInfo.cs
- ButtonPopupAdapter.cs
- TextSelectionProcessor.cs
- DataGridViewRowConverter.cs
- MatcherBuilder.cs
- CursorConverter.cs
- TextEditorLists.cs
- WsatServiceAddress.cs
- SqlCommandBuilder.cs
- XamlToRtfParser.cs
- StorageFunctionMapping.cs
- ExtendedTransformFactory.cs
- XmlUtilWriter.cs
- PersonalizationStateInfoCollection.cs
- BackgroundFormatInfo.cs
- ColumnWidthChangedEvent.cs
- SafeViewOfFileHandle.cs
- OutputWindow.cs
- SynchronizationLockException.cs
- SiteMapProvider.cs
- odbcmetadatafactory.cs
- EntityDataSourceWizardForm.cs
- EncoderParameters.cs
- TraceEventCache.cs
- DataGridViewColumnConverter.cs
- SqlClientFactory.cs
- Baml2006KnownTypes.cs
- Accessible.cs
- PiiTraceSource.cs
- Panel.cs
- ContractBase.cs
- Int32Rect.cs
- webeventbuffer.cs
- SqlTriggerContext.cs
- ObfuscationAttribute.cs
- DoubleCollectionValueSerializer.cs
- ProgressBarBrushConverter.cs
- WebPartMovingEventArgs.cs
- AppDomainGrammarProxy.cs
- SizeAnimationClockResource.cs
- XmlTextReaderImplHelpers.cs
- SafeNativeMethods.cs
- RightsManagementPermission.cs
- HotSpot.cs
- EventLogWatcher.cs
- SqlConnection.cs
- BodyWriter.cs
- FunctionQuery.cs
- RelationshipFixer.cs
- Button.cs
- ContentValidator.cs
- SmtpException.cs
- EntityDataSourceDataSelectionPanel.cs
- OracleCommandSet.cs
- TargetConverter.cs
- InternalResources.cs
- BadImageFormatException.cs
- SafeHandles.cs
- Vector3dCollection.cs
- DbParameterHelper.cs
- DBAsyncResult.cs
- SqlCacheDependencyDatabaseCollection.cs
- ExtensibleSyndicationObject.cs
- FloaterBaseParagraph.cs
- MessageAction.cs
- WebPartsPersonalization.cs
- DataBoundControlParameterTarget.cs
- ReachDocumentReferenceSerializer.cs
- RouteData.cs
- configsystem.cs
- OrderByBuilder.cs
- SqlConnectionPoolGroupProviderInfo.cs
- MonthCalendar.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- FigureParagraph.cs
- TableProvider.cs
- MessageBox.cs
- DefaultSerializationProviderAttribute.cs
- EnumerableRowCollection.cs
- ToolCreatedEventArgs.cs
- SessionEndingEventArgs.cs
- AudioSignalProblemOccurredEventArgs.cs
- WebResponse.cs