Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / Tools / System.Activities.Core.Presentation / System / Activities / Core / Presentation / DesignerMetadata.cs / 1305376 / DesignerMetadata.cs
//---------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //--------------------------------------------------------------- namespace System.Activities.Core.Presentation { using System.Activities.Presentation; using System.Activities.Presentation.PropertyEditing; using System.Activities.Presentation.Metadata; using System.Activities.Statements; using System.Activities.Validation; using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; using System.ServiceModel; using System.ServiceModel.Activities; using System.ServiceModel.Activities.Presentation; using System.ServiceModel.Presentation; using System.Workflow.Runtime; using System.Xml.Linq; using System.Activities.Presentation.Model; public class DesignerMetadata : IRegisterMetadata { // Called by the designer to register any design-time metadata. public void Register() { AttributeTableBuilder builder = new AttributeTableBuilder(); //shared component builder.AddCustomAttributes(typeof(Collection), new BrowsableAttribute(false)); builder.AddCustomAttributes(typeof(string), new EditorReuseAttribute(false)); builder.AddCustomAttributes(typeof(ActivityAction), new EditorReuseAttribute(false)); builder.AddCustomAttributes(typeof(XName), new EditorReuseAttribute(false)); //Flowchart activities FlowchartDesigner.RegisterMetadata(builder); FlowSwitchDesigner.RegisterMetadata(builder); FlowDecisionDesigner.RegisterMetadata(builder); //Messaging activities ServiceDesigner.RegisterMetadata(builder); builder.AddCustomAttributes(typeof(InArgument ), new EditorReuseAttribute(false)); builder.AddCustomAttributes(typeof(InArgument ), new EditorReuseAttribute(false)); builder.AddCustomAttributes(typeof(MessageQuerySet), PropertyValueEditor.CreateEditorAttribute(typeof(CorrelatesOnValueEditor))); //Registering inline for designers for InitializeCorrelation, Send, Receive, SendReply, ReceiveReply activities to avoid calling //their static constructors. This will avoid instantiating the ResourceDictionary for their PropertyValueEditors during designer load. builder.AddCustomAttributes(typeof(Send), new DesignerAttribute(typeof(SendDesigner))); builder.AddCustomAttributes(typeof(Send), new ActivityDesignerOptionsAttribute { AllowDrillIn = false }); builder.AddCustomAttributes(typeof(Receive), new DesignerAttribute(typeof(ReceiveDesigner))); builder.AddCustomAttributes(typeof(Receive), new ActivityDesignerOptionsAttribute { AllowDrillIn = false }); builder.AddCustomAttributes(typeof(SendReply), new FeatureAttribute(typeof(SendReplyValidationFeature))); builder.AddCustomAttributes(typeof(SendReply), new DesignerAttribute(typeof(SendReplyDesigner))); builder.AddCustomAttributes(typeof(SendReply), new ActivityDesignerOptionsAttribute { AllowDrillIn = false }); CutCopyPasteHelper.AddDisallowedTypeForCopy(typeof(SendReply)); builder.AddCustomAttributes(typeof(ReceiveReply), new FeatureAttribute(typeof(ReceiveReplyValidationFeature))); builder.AddCustomAttributes(typeof(ReceiveReply), new DesignerAttribute(typeof(ReceiveReplyDesigner))); builder.AddCustomAttributes(typeof(ReceiveReply), new ActivityDesignerOptionsAttribute { AllowDrillIn = false }); CutCopyPasteHelper.AddDisallowedTypeForCopy(typeof(ReceiveReply)); builder.AddCustomAttributes(typeof(InitializeCorrelation), new DesignerAttribute(typeof(InitializeCorrelationDesigner))); builder.AddCustomAttributes(typeof(InitializeCorrelation), new ActivityDesignerOptionsAttribute { AllowDrillIn = false }); EndpointDesigner.RegisterMetadata(builder); TransactedReceiveScopeDesigner.RegisterMetadata(builder); CorrelationScopeDesigner.RegisterMetadata(builder); //Procedural activities AssignDesigner.RegisterMetadata(builder); IfElseDesigner.RegisterMetadata(builder); InvokeMethodDesigner.RegisterMetadata(builder); DoWhileDesigner.RegisterMetadata(builder); WhileDesigner.RegisterMetadata(builder); ForEachDesigner.RegisterMetadata(builder); TryCatchDesigner.RegisterMetadata(builder); CatchDesigner.RegisterMetadata(builder); ParallelDesigner.RegisterMetadata(builder); SequenceDesigner.RegisterMetadata(builder); SwitchDesigner.RegisterMetadata(builder); CaseDesigner.RegisterMetadata(builder); //Compensation/Transaction CancellationScopeDesigner.RegisterMetadata(builder); CompensableActivityDesigner.RegisterMetadata(builder); TransactionScopeDesigner.RegisterMetadata(builder); //Misc activities InteropDesigner.RegisterMetadataDelayed(); PickDesigner.RegisterMetadata(builder); PickBranchDesigner.RegisterMetadata(builder); WriteLineDesigner.RegisterMetadata(builder); builder.AddCustomAttributes(typeof(AddToCollection<>), new FeatureAttribute(typeof(UpdatableGenericArgumentsFeature))); builder.AddCustomAttributes(typeof(RemoveFromCollection<>), new FeatureAttribute(typeof(UpdatableGenericArgumentsFeature))); builder.AddCustomAttributes(typeof(ClearCollection<>), new FeatureAttribute(typeof(UpdatableGenericArgumentsFeature))); builder.AddCustomAttributes(typeof(ExistsInCollection<>), new FeatureAttribute(typeof(UpdatableGenericArgumentsFeature))); builder.AddCustomAttributes(typeof(AddToCollection<>), new DefaultTypeArgumentAttribute(typeof(int))); builder.AddCustomAttributes(typeof(RemoveFromCollection<>), new DefaultTypeArgumentAttribute(typeof(int))); builder.AddCustomAttributes(typeof(ClearCollection<>), new DefaultTypeArgumentAttribute(typeof(int))); builder.AddCustomAttributes(typeof(ExistsInCollection<>), new DefaultTypeArgumentAttribute(typeof(int))); MetadataStore.AddAttributeTable(builder.CreateTable()); MorphHelper.AddPropertyValueMorphHelper(typeof(InArgument<>), MorphHelpers.ArgumentMorphHelper); MorphHelper.AddPropertyValueMorphHelper(typeof(OutArgument<>), MorphHelpers.ArgumentMorphHelper); MorphHelper.AddPropertyValueMorphHelper(typeof(InOutArgument<>), MorphHelpers.ArgumentMorphHelper); MorphHelper.AddPropertyValueMorphHelper(typeof(ActivityAction<>), MorphHelpers.ActivityActionMorphHelper); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Rotation3DKeyFrameCollection.cs
- PictureBox.cs
- Point3DAnimationBase.cs
- OrderedDictionary.cs
- RuleSettingsCollection.cs
- ActivityInterfaces.cs
- DataException.cs
- ObjectDataSourceWizardForm.cs
- WebPartActionVerb.cs
- AppendHelper.cs
- CellCreator.cs
- ToolStripProgressBar.cs
- FastEncoderWindow.cs
- StructuredTypeEmitter.cs
- DataContractSerializerFaultFormatter.cs
- StyleCollectionEditor.cs
- BamlResourceDeserializer.cs
- FormClosedEvent.cs
- MsmqInputMessage.cs
- GenericTextProperties.cs
- UserPersonalizationStateInfo.cs
- Cast.cs
- NameObjectCollectionBase.cs
- CustomErrorCollection.cs
- ProfileWorkflowElement.cs
- MimeBasePart.cs
- AuthenticationModulesSection.cs
- GeometryHitTestParameters.cs
- ListItemsPage.cs
- LoginUtil.cs
- ValidatedControlConverter.cs
- TemplateEditingVerb.cs
- UrlAuthFailedErrorFormatter.cs
- DefaultTraceListener.cs
- TabItemAutomationPeer.cs
- _StreamFramer.cs
- AudioException.cs
- PublishLicense.cs
- Point.cs
- Wow64ConfigurationLoader.cs
- StreamedWorkflowDefinitionContext.cs
- RSAOAEPKeyExchangeFormatter.cs
- FormViewInsertedEventArgs.cs
- PageAdapter.cs
- ServiceProviders.cs
- TextRangeProviderWrapper.cs
- DynamicMetaObjectBinder.cs
- StandardTransformFactory.cs
- XsltInput.cs
- XmlReflectionImporter.cs
- ComponentEvent.cs
- RSACryptoServiceProvider.cs
- FormsAuthenticationCredentials.cs
- XmlDataSource.cs
- ColorBlend.cs
- HttpServerUtilityBase.cs
- DebuggerAttributes.cs
- TextRunTypographyProperties.cs
- GlobalAllocSafeHandle.cs
- QueryValue.cs
- TaiwanCalendar.cs
- BinHexEncoding.cs
- QueryContinueDragEvent.cs
- Literal.cs
- ZoneIdentityPermission.cs
- DataStreamFromComStream.cs
- StrokeSerializer.cs
- XmlSerializerVersionAttribute.cs
- Transform3D.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- Thumb.cs
- CoTaskMemSafeHandle.cs
- GeneralTransform2DTo3DTo2D.cs
- XPathNavigator.cs
- UriSection.cs
- DataGridViewTextBoxCell.cs
- Misc.cs
- CollectionChangeEventArgs.cs
- TextParaLineResult.cs
- CssTextWriter.cs
- Utils.cs
- SafeEventLogReadHandle.cs
- PasswordRecovery.cs
- ToolStripComboBox.cs
- DataGridViewColumnCollectionEditor.cs
- RuntimeIdentifierPropertyAttribute.cs
- WizardStepBase.cs
- Inline.cs
- Descriptor.cs
- ScopedKnownTypes.cs
- RenderData.cs
- ScriptingProfileServiceSection.cs
- TreeViewDesigner.cs
- DocumentSequenceHighlightLayer.cs
- metadatamappinghashervisitor.hashsourcebuilder.cs
- XmlNullResolver.cs
- EventLogEntry.cs
- TdsRecordBufferSetter.cs
- AutoCompleteStringCollection.cs
- SingleKeyFrameCollection.cs