Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / System.Activities / System / Activities / ActivityBuilder.cs / 1407647 / ActivityBuilder.cs
//---------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //--------------------------------------------------------------- namespace System.Activities { using System.Activities.Debugger; using System.Activities.Validation; using System.Collections.ObjectModel; using System.ComponentModel; using System.Windows.Markup; using System.Xaml; [ContentProperty("Implementation")] public sealed class ActivityBuilder : IDebuggableWorkflowTree { // defines an attached property that will identify PropertyReferenceExtension-based // object properties static AttachableMemberIdentifier propertyReferencePropertyID = new AttachableMemberIdentifier(typeof(ActivityBuilder), "PropertyReference"); KeyedCollectionproperties; Collection constraints; Collection attributes; public ActivityBuilder() { } public string Name { get; set; } [DependsOn("Name")] public Collection Attributes { get { if (this.attributes == null) { this.attributes = new Collection (); } return this.attributes; } } [Browsable(false)] [DependsOn("Attributes")] public KeyedCollection Properties { get { if (this.properties == null) { this.properties = new ActivityPropertyCollection(); } return this.properties; } } [DependsOn("Properties")] [Browsable(false)] public Collection Constraints { get { if (this.constraints == null) { this.constraints = new Collection (); } return this.constraints; } } [DefaultValue(null)] [Browsable(false)] [DependsOn("Constraints")] public Activity Implementation { get; set; } // activity property name public static ActivityPropertyReference GetPropertyReference(object target) { ActivityPropertyReference value; return AttachablePropertyServices.TryGetProperty(target, propertyReferencePropertyID, out value) ? value : null; } //activity property name public static void SetPropertyReference(object target, ActivityPropertyReference value) { AttachablePropertyServices.SetProperty(target, propertyReferencePropertyID, value); } Activity IDebuggableWorkflowTree.GetWorkflowRoot() { return this.Implementation; } internal static KeyedCollectionCreateActivityPropertyCollection() { return new ActivityPropertyCollection(); } class ActivityPropertyCollection : KeyedCollection { protected override string GetKeyForItem(DynamicActivityProperty item) { return item.Name; } } } [ContentProperty("Implementation")] public sealed class ActivityBuilder : IDebuggableWorkflowTree { KeyedCollection properties; Collection constraints; Collection attributes; public ActivityBuilder() { } public string Name { get; set; } [DependsOn("Name")] public Collection Attributes { get { if (this.attributes == null) { this.attributes = new Collection (); } return this.attributes; } } [Browsable(false)] [DependsOn("Attributes")] public KeyedCollection Properties { get { if (this.properties == null) { this.properties = ActivityBuilder.CreateActivityPropertyCollection(); } return this.properties; } } [DependsOn("Properties")] [Browsable(false)] public Collection Constraints { get { if (this.constraints == null) { this.constraints = new Collection (); } return this.constraints; } } [DefaultValue(null)] [Browsable(false)] [DependsOn("Constraints")] public Activity Implementation { get; set; } Activity IDebuggableWorkflowTree.GetWorkflowRoot() { return this.Implementation; } } } // 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
- DelimitedListTraceListener.cs
- CustomErrorCollection.cs
- DocumentViewerAutomationPeer.cs
- StructuralCache.cs
- SqlTrackingWorkflowInstance.cs
- ListBindingHelper.cs
- UriTemplateDispatchFormatter.cs
- ScaleTransform3D.cs
- GlyphInfoList.cs
- SHA256.cs
- CodeAccessPermission.cs
- SelectorAutomationPeer.cs
- FixedTextBuilder.cs
- TextServicesDisplayAttribute.cs
- WebBodyFormatMessageProperty.cs
- CallbackValidator.cs
- CustomLineCap.cs
- ConnectionStringSettings.cs
- DataContractJsonSerializerOperationBehavior.cs
- ModifierKeysConverter.cs
- ExportOptions.cs
- ListItemsCollectionEditor.cs
- RowUpdatedEventArgs.cs
- LinqDataSourceStatusEventArgs.cs
- DataTableReader.cs
- InheritanceAttribute.cs
- DescriptionAttribute.cs
- ChineseLunisolarCalendar.cs
- DataSourceProvider.cs
- securestring.cs
- ThicknessAnimation.cs
- EmissiveMaterial.cs
- MessageBox.cs
- RSAPKCS1SignatureFormatter.cs
- NavigationPropertyEmitter.cs
- XmlHierarchicalEnumerable.cs
- QueryConverter.cs
- IntSecurity.cs
- ConsumerConnectionPointCollection.cs
- SchemaConstraints.cs
- PasswordTextNavigator.cs
- GradientBrush.cs
- InternalPermissions.cs
- ChainedAsyncResult.cs
- InkPresenterAutomationPeer.cs
- ThreadExceptionDialog.cs
- ObjectKeyFrameCollection.cs
- SystemIcons.cs
- ButtonRenderer.cs
- MatrixStack.cs
- RawKeyboardInputReport.cs
- ExecutionEngineException.cs
- FieldBuilder.cs
- DataGridPageChangedEventArgs.cs
- MetadataItem_Static.cs
- WmlMobileTextWriter.cs
- XmlLinkedNode.cs
- DataGridViewRowCancelEventArgs.cs
- odbcmetadatacollectionnames.cs
- DataGridCell.cs
- ParserStack.cs
- SecurityRuntime.cs
- MethodAccessException.cs
- SingleResultAttribute.cs
- FileDataSourceCache.cs
- ConfigurationErrorsException.cs
- BitmapInitialize.cs
- GroupBox.cs
- TrustSection.cs
- UnmanagedBitmapWrapper.cs
- StringSource.cs
- EmbeddedObject.cs
- NumericUpDown.cs
- RoutedEventValueSerializer.cs
- TabRenderer.cs
- PolygonHotSpot.cs
- DocumentAutomationPeer.cs
- LockCookie.cs
- QueryOptionExpression.cs
- QilUnary.cs
- InputLanguageEventArgs.cs
- WebPartAuthorizationEventArgs.cs
- ExtendedProtectionPolicyTypeConverter.cs
- TagMapCollection.cs
- PolyQuadraticBezierSegment.cs
- AssemblyCache.cs
- Descriptor.cs
- WebPartMovingEventArgs.cs
- DocumentScope.cs
- XmlBufferReader.cs
- ServiceReference.cs
- WindowVisualStateTracker.cs
- WizardStepBase.cs
- NetMsmqBinding.cs
- ManagementEventWatcher.cs
- WebPermission.cs
- OleDbErrorCollection.cs
- SiteMembershipCondition.cs
- HealthMonitoringSection.cs
- processwaithandle.cs