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
- CommandLibraryHelper.cs
- DefaultHttpHandler.cs
- ActivityPreviewDesigner.cs
- CommonRemoteMemoryBlock.cs
- FormViewUpdateEventArgs.cs
- FieldNameLookup.cs
- ServiceNameCollection.cs
- NamedObject.cs
- WebPartAddingEventArgs.cs
- DesignBinding.cs
- LinqDataView.cs
- linebase.cs
- SessionStateSection.cs
- CodeCatchClause.cs
- EntityProviderFactory.cs
- WebOperationContext.cs
- RenderTargetBitmap.cs
- XmlSerializationWriter.cs
- ConnectionConsumerAttribute.cs
- WebPartHeaderCloseVerb.cs
- IApplicationTrustManager.cs
- XmlNamespaceMappingCollection.cs
- TypeSemantics.cs
- SimpleRecyclingCache.cs
- ObservableDictionary.cs
- DataGridViewDataConnection.cs
- Color.cs
- MouseButton.cs
- DbConnectionPoolGroupProviderInfo.cs
- RichTextBox.cs
- InstanceDescriptor.cs
- OdbcConnectionFactory.cs
- ExpressionEditor.cs
- CodeRemoveEventStatement.cs
- EntryPointNotFoundException.cs
- DataBindingExpressionBuilder.cs
- SQLDateTime.cs
- DataGridViewRowsAddedEventArgs.cs
- ChannelServices.cs
- CheckPair.cs
- GridEntry.cs
- SafeFileHandle.cs
- IIS7UserPrincipal.cs
- ClientBuildManagerTypeDescriptionProviderBridge.cs
- EventDescriptor.cs
- XmlElementAttributes.cs
- ConsoleCancelEventArgs.cs
- DocumentSignatureManager.cs
- EdmPropertyAttribute.cs
- TreeNodeBinding.cs
- COM2Properties.cs
- QilSortKey.cs
- DocumentGridContextMenu.cs
- UserMapPath.cs
- XmlSerializerFactory.cs
- SequenceFullException.cs
- SiteMapNodeItem.cs
- EventLogTraceListener.cs
- HelpKeywordAttribute.cs
- VersionValidator.cs
- MetadataCacheItem.cs
- WindowsStartMenu.cs
- BaseConfigurationRecord.cs
- ConstructorNeedsTagAttribute.cs
- UriSection.cs
- SecurityHelper.cs
- IdentityHolder.cs
- GenericEnumConverter.cs
- NativeCppClassAttribute.cs
- Fault.cs
- ImageCreator.cs
- Identity.cs
- TreeNodeStyleCollection.cs
- ChannelSinkStacks.cs
- NetNamedPipeSecurityMode.cs
- ToggleButtonAutomationPeer.cs
- SimpleBitVector32.cs
- ThreadExceptionEvent.cs
- GradientStop.cs
- InputLanguageCollection.cs
- documentsequencetextpointer.cs
- BigIntegerStorage.cs
- TextMessageEncodingElement.cs
- RemotingClientProxy.cs
- ConfigurationValidatorAttribute.cs
- CaseInsensitiveComparer.cs
- ThrowOnMultipleAssignment.cs
- RelationshipFixer.cs
- SignatureToken.cs
- OptimizedTemplateContentHelper.cs
- ProcessProtocolHandler.cs
- TemplatedControlDesigner.cs
- Maps.cs
- OptimalBreakSession.cs
- PowerEase.cs
- CommentEmitter.cs
- ValidateNames.cs
- TextRunProperties.cs
- ResourceExpressionBuilder.cs
- DeferredReference.cs