Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XMLUtil.cs
- StorageRoot.cs
- CodeAttributeArgument.cs
- COAUTHIDENTITY.cs
- WebPartMinimizeVerb.cs
- GridView.cs
- TextContainerChangeEventArgs.cs
- SafeHandle.cs
- MessageSecurityVersionConverter.cs
- Attributes.cs
- Matrix3D.cs
- ListViewInsertionMark.cs
- SchemaImporterExtensionElement.cs
- BaseDataBoundControl.cs
- XsdDuration.cs
- LinkLabelLinkClickedEvent.cs
- StylusEditingBehavior.cs
- DrawingCollection.cs
- FontFamilyIdentifier.cs
- EventMappingSettings.cs
- Synchronization.cs
- PtsCache.cs
- EqualityComparer.cs
- __ConsoleStream.cs
- XmlAttributeHolder.cs
- Normalization.cs
- RotateTransform3D.cs
- SharingService.cs
- TcpActivation.cs
- OrderedDictionaryStateHelper.cs
- HttpListenerRequestUriBuilder.cs
- KeyMatchBuilder.cs
- AdornerLayer.cs
- BridgeDataRecord.cs
- Trigger.cs
- ButtonBaseDesigner.cs
- EventHandlersStore.cs
- Convert.cs
- UserControl.cs
- BStrWrapper.cs
- DesignerOptionService.cs
- ListViewItem.cs
- EdmRelationshipNavigationPropertyAttribute.cs
- CreateUserWizard.cs
- ContractMapping.cs
- HttpBrowserCapabilitiesBase.cs
- CapabilitiesState.cs
- ColorConvertedBitmap.cs
- BaseResourcesBuildProvider.cs
- DataControlCommands.cs
- DuplexChannel.cs
- QilParameter.cs
- Rotation3DKeyFrameCollection.cs
- Matrix3DConverter.cs
- NativeMethods.cs
- ViewKeyConstraint.cs
- PrimaryKeyTypeConverter.cs
- InheritablePropertyChangeInfo.cs
- SqlFlattener.cs
- MachineKeySection.cs
- TreePrinter.cs
- SafeRightsManagementPubHandle.cs
- XmlWriterSettings.cs
- WindowsScrollBarBits.cs
- XmlConvert.cs
- DataContractAttribute.cs
- ServerIdentity.cs
- SystemInformation.cs
- TextEffect.cs
- ConfigLoader.cs
- TextTreeRootNode.cs
- AttributeAction.cs
- ClientRuntimeConfig.cs
- Oci.cs
- EasingKeyFrames.cs
- ModelUIElement3D.cs
- ControlEvent.cs
- Panel.cs
- XPathParser.cs
- UnicastIPAddressInformationCollection.cs
- SmiRequestExecutor.cs
- LinqDataSourceDisposeEventArgs.cs
- DictionaryManager.cs
- EventWaitHandle.cs
- ResourceDescriptionAttribute.cs
- ScrollItemPatternIdentifiers.cs
- ScaleTransform3D.cs
- TableRow.cs
- MethodExpr.cs
- CodeGeneratorAttribute.cs
- XmlUTF8TextReader.cs
- DataGridCommandEventArgs.cs
- TypeNameConverter.cs
- sortedlist.cs
- TableLayoutPanelBehavior.cs
- CommandSet.cs
- UInt16.cs
- XamlPointCollectionSerializer.cs
- UnsafeCollabNativeMethods.cs
- RulePatternOps.cs