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
- MessagePropertyVariants.cs
- DataBoundLiteralControl.cs
- XamlSerializationHelper.cs
- JulianCalendar.cs
- EmptyEnumerator.cs
- ElapsedEventArgs.cs
- ReflectionUtil.cs
- GlobalItem.cs
- DataPager.cs
- DocumentEventArgs.cs
- XmlStringTable.cs
- X509ChainElement.cs
- GridViewColumnHeaderAutomationPeer.cs
- XamlWrappingReader.cs
- LogicalMethodInfo.cs
- BitmapEffectInputData.cs
- initElementDictionary.cs
- SweepDirectionValidation.cs
- XmlReaderSettings.cs
- WebResourceAttribute.cs
- ContainsRowNumberChecker.cs
- StylusCaptureWithinProperty.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- DelegateSerializationHolder.cs
- TypeDefinition.cs
- WebPartCancelEventArgs.cs
- WinCategoryAttribute.cs
- FlatButtonAppearance.cs
- RowBinding.cs
- InvalidProgramException.cs
- _BasicClient.cs
- MetadataPropertyvalue.cs
- XmlChildNodes.cs
- BehaviorEditorPart.cs
- RuntimeHandles.cs
- ColumnClickEvent.cs
- XmlSchemaComplexContent.cs
- AppearanceEditorPart.cs
- _LocalDataStore.cs
- MasterPageCodeDomTreeGenerator.cs
- CommonObjectSecurity.cs
- CodeSubDirectory.cs
- FlowDocumentFormatter.cs
- EventToken.cs
- ArraySegment.cs
- _ProxyRegBlob.cs
- TabletDevice.cs
- AccessKeyManager.cs
- Condition.cs
- EntityEntry.cs
- DataSourceConverter.cs
- Cursor.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- AuthenticationSection.cs
- _ListenerAsyncResult.cs
- EastAsianLunisolarCalendar.cs
- PassportAuthentication.cs
- SmtpCommands.cs
- PrintEvent.cs
- CryptoHandle.cs
- RectConverter.cs
- SafeNativeMethodsCLR.cs
- PenThread.cs
- Instrumentation.cs
- Image.cs
- BitmapData.cs
- Attributes.cs
- SoundPlayerAction.cs
- BooleanAnimationUsingKeyFrames.cs
- Parsers.cs
- RequestValidator.cs
- __Error.cs
- ScrollPattern.cs
- ToolboxItemAttribute.cs
- DBConcurrencyException.cs
- ClientFormsIdentity.cs
- PathFigureCollectionConverter.cs
- TextPenaltyModule.cs
- CreateUserWizardStep.cs
- KeyFrames.cs
- ModelServiceImpl.cs
- IconEditor.cs
- X509CertificateValidator.cs
- WebBaseEventKeyComparer.cs
- UpDownEvent.cs
- PathGeometry.cs
- LongSumAggregationOperator.cs
- Membership.cs
- EntityStoreSchemaFilterEntry.cs
- MergeFilterQuery.cs
- TextServicesPropertyRanges.cs
- PersonalizationEntry.cs
- DbParameterHelper.cs
- HwndKeyboardInputProvider.cs
- CrossSiteScriptingValidation.cs
- ControlBuilderAttribute.cs
- WebBrowserProgressChangedEventHandler.cs
- AppDomainAttributes.cs
- CollectionChangeEventArgs.cs
- Stroke.cs