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
- _LocalDataStoreMgr.cs
- PeerNameRegistration.cs
- Rotation3DAnimationUsingKeyFrames.cs
- CodeNamespace.cs
- ContextConfiguration.cs
- SmiSettersStream.cs
- TypeHelper.cs
- BitmapDecoder.cs
- CuspData.cs
- OutOfMemoryException.cs
- CookieHandler.cs
- GeometryDrawing.cs
- BindUriHelper.cs
- webproxy.cs
- ProcessThreadCollection.cs
- HtmlInputButton.cs
- BuildManager.cs
- JsonEnumDataContract.cs
- GatewayIPAddressInformationCollection.cs
- Pair.cs
- WebEventTraceProvider.cs
- SByte.cs
- SingleBodyParameterMessageFormatter.cs
- ToolStripDropDown.cs
- AbstractDataSvcMapFileLoader.cs
- TraceRecord.cs
- ResourceAssociationSetEnd.cs
- RegexFCD.cs
- _NTAuthentication.cs
- DataGridViewCellValueEventArgs.cs
- ServiceObjectContainer.cs
- GPPOINT.cs
- Keyboard.cs
- ScriptManagerProxy.cs
- XmlSchemaAnyAttribute.cs
- CoTaskMemHandle.cs
- KeyConverter.cs
- ZipArchive.cs
- XPathAncestorQuery.cs
- WindowsFormsSynchronizationContext.cs
- ConfigXmlElement.cs
- QuaternionValueSerializer.cs
- SmiGettersStream.cs
- ArrayList.cs
- CrossAppDomainChannel.cs
- EnumMember.cs
- CodePropertyReferenceExpression.cs
- _TransmitFileOverlappedAsyncResult.cs
- RequestQueue.cs
- SafeEventLogWriteHandle.cs
- HttpServerVarsCollection.cs
- XmlEncoding.cs
- MetadataCacheItem.cs
- TcpAppDomainProtocolHandler.cs
- BuildProvider.cs
- ExpressionEditorAttribute.cs
- SqlAliaser.cs
- CfgRule.cs
- JumpPath.cs
- ListComponentEditorPage.cs
- AxHost.cs
- IisTraceWebEventProvider.cs
- HtmlTextArea.cs
- StyleModeStack.cs
- _BasicClient.cs
- Metafile.cs
- Line.cs
- Timeline.cs
- SubMenuStyle.cs
- MaskedTextBox.cs
- DataGridAddNewRow.cs
- ReferenceSchema.cs
- Splitter.cs
- WhitespaceRuleReader.cs
- HttpListener.cs
- FilteredAttributeCollection.cs
- LoginUtil.cs
- WebDisplayNameAttribute.cs
- LocationEnvironment.cs
- TextInfo.cs
- DataStorage.cs
- WebEventTraceProvider.cs
- baseshape.cs
- StyleModeStack.cs
- DataControlReference.cs
- StdValidatorsAndConverters.cs
- QueryResponse.cs
- TextBoxLine.cs
- CrossContextChannel.cs
- XamlPointCollectionSerializer.cs
- SpecularMaterial.cs
- ContentWrapperAttribute.cs
- SyndicationSerializer.cs
- SecurityMessageProperty.cs
- LogFlushAsyncResult.cs
- DbProviderManifest.cs
- Rotation3D.cs
- SecuritySessionServerSettings.cs
- CodeAttributeArgumentCollection.cs
- AudioFormatConverter.cs