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
- ApplicationServicesHostFactory.cs
- PropertyGeneratedEventArgs.cs
- EditorZone.cs
- StringDictionaryEditor.cs
- InertiaExpansionBehavior.cs
- PropertyMap.cs
- RedirectionProxy.cs
- MailWebEventProvider.cs
- PlaceHolder.cs
- SizeF.cs
- Util.cs
- EtwTrackingBehaviorElement.cs
- SynchronizedReadOnlyCollection.cs
- DeploymentExceptionMapper.cs
- InputLanguageCollection.cs
- CodePrimitiveExpression.cs
- ManualResetEvent.cs
- NotifyIcon.cs
- Regex.cs
- CustomError.cs
- NameValueSectionHandler.cs
- SqlProfileProvider.cs
- ListItem.cs
- DnsPermission.cs
- KeyValuePair.cs
- CodeStatementCollection.cs
- AttributeUsageAttribute.cs
- DataGridColumnDropSeparator.cs
- ObjectListTitleAttribute.cs
- PropertyGeneratedEventArgs.cs
- ParagraphResult.cs
- Expressions.cs
- InvalidOleVariantTypeException.cs
- XPathPatternBuilder.cs
- KoreanCalendar.cs
- _SecureChannel.cs
- BindingMAnagerBase.cs
- DBDataPermissionAttribute.cs
- DesignerVerb.cs
- SwitchAttribute.cs
- ADConnectionHelper.cs
- HtmlDocument.cs
- WebPartDisplayModeCancelEventArgs.cs
- FixedSOMPageConstructor.cs
- EntityProviderServices.cs
- StringAttributeCollection.cs
- ObjectStateManagerMetadata.cs
- ToolboxItem.cs
- WpfWebRequestHelper.cs
- KeyPressEvent.cs
- XmlNamespaceMappingCollection.cs
- SymbolTable.cs
- XmlUtilWriter.cs
- NativeRightsManagementAPIsStructures.cs
- NotificationContext.cs
- UIElement3DAutomationPeer.cs
- DPTypeDescriptorContext.cs
- Vector3DKeyFrameCollection.cs
- DataTrigger.cs
- FunctionNode.cs
- XPathSelfQuery.cs
- VerificationException.cs
- SecurityTokenAuthenticator.cs
- MSHTMLHost.cs
- odbcmetadatafactory.cs
- DocumentOrderQuery.cs
- TemplateBuilder.cs
- _TransmitFileOverlappedAsyncResult.cs
- Gdiplus.cs
- MailBnfHelper.cs
- CqlWriter.cs
- HoistedLocals.cs
- storepermissionattribute.cs
- OleDbEnumerator.cs
- TextDocumentView.cs
- MenuItemBindingCollection.cs
- DefaultMemberAttribute.cs
- CommandTreeTypeHelper.cs
- DataBoundControlActionList.cs
- XmlLinkedNode.cs
- X509Certificate2Collection.cs
- serverconfig.cs
- ListenUriMode.cs
- XPathPatternBuilder.cs
- SvcMapFileSerializer.cs
- DockPanel.cs
- ScrollItemPattern.cs
- HttpGetProtocolReflector.cs
- ContactManager.cs
- RowBinding.cs
- StrokeCollectionConverter.cs
- NameValuePair.cs
- DataRelation.cs
- Point3DCollectionValueSerializer.cs
- AutoCompleteStringCollection.cs
- IndexerNameAttribute.cs
- ContextProperty.cs
- ApplicationServiceHelper.cs
- StructuredType.cs
- ToolBarButtonClickEvent.cs