Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WF / Common / AuthoringOM / Design / ExtenderHelpers.cs / 1305376 / ExtenderHelpers.cs
#pragma warning disable 1634, 1691 namespace System.Workflow.ComponentModel.Design { using System; using System.IO; using System.Drawing; using System.CodeDom; using System.Diagnostics; using System.Collections; using System.Collections.Generic; using System.Windows.Forms; using System.ComponentModel; using System.Globalization; using System.Drawing.Design; using System.Drawing.Imaging; using System.Drawing.Drawing2D; using System.Windows.Forms.Design; using System.ComponentModel.Design; using System.Collections.Specialized; using System.ComponentModel.Design.Serialization; using System.Workflow.ComponentModel.Compiler; using System.Workflow.ComponentModel.Serialization; using System.Collections.ObjectModel; using System.Reflection; using System.Workflow.ComponentModel.Design; using System.Runtime.Serialization.Formatters.Binary; // #region Class ExtenderHelpers internal static class ExtenderHelpers { internal static void FilterDependencyProperties(IServiceProvider serviceProvider, Activity activity) { IExtenderListService extenderListService = serviceProvider.GetService(typeof(IExtenderListService)) as IExtenderListService; if (extenderListService != null) { DictionarydependencyProperyies = new Dictionary (); foreach (DependencyProperty property in activity.MetaDependencyProperties) dependencyProperyies.Add(property.Name, property); List disallowedProperties = new List (); foreach (IExtenderProvider extenderProvider in extenderListService.GetExtenderProviders()) { if (!extenderProvider.CanExtend(activity)) { ProvidePropertyAttribute[] propertyAttributes = extenderProvider.GetType().GetCustomAttributes(typeof(ProvidePropertyAttribute), true) as ProvidePropertyAttribute[]; foreach (ProvidePropertyAttribute propertyAttribute in propertyAttributes) disallowedProperties.Add(propertyAttribute.PropertyName); } } foreach (string propertyName in disallowedProperties) { if (dependencyProperyies.ContainsKey(propertyName)) activity.RemoveProperty(dependencyProperyies[propertyName]); } } } } #endregion } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. #pragma warning disable 1634, 1691 namespace System.Workflow.ComponentModel.Design { using System; using System.IO; using System.Drawing; using System.CodeDom; using System.Diagnostics; using System.Collections; using System.Collections.Generic; using System.Windows.Forms; using System.ComponentModel; using System.Globalization; using System.Drawing.Design; using System.Drawing.Imaging; using System.Drawing.Drawing2D; using System.Windows.Forms.Design; using System.ComponentModel.Design; using System.Collections.Specialized; using System.ComponentModel.Design.Serialization; using System.Workflow.ComponentModel.Compiler; using System.Workflow.ComponentModel.Serialization; using System.Collections.ObjectModel; using System.Reflection; using System.Workflow.ComponentModel.Design; using System.Runtime.Serialization.Formatters.Binary; // #region Class ExtenderHelpers internal static class ExtenderHelpers { internal static void FilterDependencyProperties(IServiceProvider serviceProvider, Activity activity) { IExtenderListService extenderListService = serviceProvider.GetService(typeof(IExtenderListService)) as IExtenderListService; if (extenderListService != null) { Dictionary dependencyProperyies = new Dictionary (); foreach (DependencyProperty property in activity.MetaDependencyProperties) dependencyProperyies.Add(property.Name, property); List disallowedProperties = new List (); foreach (IExtenderProvider extenderProvider in extenderListService.GetExtenderProviders()) { if (!extenderProvider.CanExtend(activity)) { ProvidePropertyAttribute[] propertyAttributes = extenderProvider.GetType().GetCustomAttributes(typeof(ProvidePropertyAttribute), true) as ProvidePropertyAttribute[]; foreach (ProvidePropertyAttribute propertyAttribute in propertyAttributes) disallowedProperties.Add(propertyAttribute.PropertyName); } } foreach (string propertyName in disallowedProperties) { if (dependencyProperyies.ContainsKey(propertyName)) activity.RemoveProperty(dependencyProperyies[propertyName]); } } } } #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
- DataBinding.cs
- RelativeSource.cs
- ResourceCategoryAttribute.cs
- LinkLabelLinkClickedEvent.cs
- ExpandCollapsePattern.cs
- BoundingRectTracker.cs
- VectorConverter.cs
- CharacterShapingProperties.cs
- RequestTimeoutManager.cs
- ToolStripDropDown.cs
- SessionParameter.cs
- XpsFilter.cs
- XmlSchemaGroupRef.cs
- ObjectToIdCache.cs
- OperationCanceledException.cs
- SerializationObjectManager.cs
- CompositeScriptReferenceEventArgs.cs
- WindowPattern.cs
- StaticSiteMapProvider.cs
- TaiwanCalendar.cs
- WebEncodingValidator.cs
- AuthorizationPolicyTypeElementCollection.cs
- TemporaryBitmapFile.cs
- GridViewColumnCollection.cs
- BaseCodeDomTreeGenerator.cs
- HtmlAnchor.cs
- sqlpipe.cs
- XPathNavigatorReader.cs
- SqlRetyper.cs
- ShadowGlyph.cs
- DiagnosticsConfiguration.cs
- BitmapEffectInputConnector.cs
- FileChangesMonitor.cs
- ColorDialog.cs
- BindToObject.cs
- RotateTransform3D.cs
- PolicyStatement.cs
- ServiceRoute.cs
- DefaultEvaluationContext.cs
- RangeContentEnumerator.cs
- WebPartDescriptionCollection.cs
- TraceUtils.cs
- CheckBox.cs
- DefinitionBase.cs
- RangeBaseAutomationPeer.cs
- EntityViewGenerationConstants.cs
- TTSEvent.cs
- UnsafeNativeMethods.cs
- CounterCreationDataCollection.cs
- FakeModelItemImpl.cs
- BrowsableAttribute.cs
- RawKeyboardInputReport.cs
- RealizationDrawingContextWalker.cs
- CountdownEvent.cs
- PerspectiveCamera.cs
- ScrollBar.cs
- StrongNameSignatureInformation.cs
- ListenerConfig.cs
- PagesSection.cs
- SQLDouble.cs
- WebPartHeaderCloseVerb.cs
- IndexingContentUnit.cs
- ClientType.cs
- TableAdapterManagerHelper.cs
- DataColumnMapping.cs
- RegexCode.cs
- DockPanel.cs
- XmlBinaryWriter.cs
- HttpCacheVary.cs
- IUnknownConstantAttribute.cs
- HttpRuntime.cs
- Model3DCollection.cs
- AsyncPostBackErrorEventArgs.cs
- PersonalizationProvider.cs
- GlyphManager.cs
- COM2ExtendedUITypeEditor.cs
- MeasureData.cs
- MultiSelector.cs
- TokenBasedSetEnumerator.cs
- IncrementalReadDecoders.cs
- ColorMatrix.cs
- WebBaseEventKeyComparer.cs
- CloudCollection.cs
- SocketException.cs
- Preprocessor.cs
- XmlEntity.cs
- MD5.cs
- StrongNameIdentityPermission.cs
- ToolStripScrollButton.cs
- XmlHierarchyData.cs
- MetabaseServerConfig.cs
- RandomDelayQueuedSendsAsyncResult.cs
- InkCollectionBehavior.cs
- EventLogSession.cs
- XPathParser.cs
- ActiveXContainer.cs
- UserUseLicenseDictionaryLoader.cs
- ExeContext.cs
- OAVariantLib.cs
- LongValidator.cs