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
- DbConnectionClosed.cs
- TreeViewAutomationPeer.cs
- ScrollViewer.cs
- _NetworkingPerfCounters.cs
- XmlUnspecifiedAttribute.cs
- DataFormats.cs
- Positioning.cs
- Certificate.cs
- securitycriticaldataformultiplegetandset.cs
- SerialStream.cs
- ReadOnlyObservableCollection.cs
- ObjectStateFormatter.cs
- ImportOptions.cs
- streamingZipPartStream.cs
- VisualStyleInformation.cs
- DefaultDialogButtons.cs
- Rect3DValueSerializer.cs
- SafeCoTaskMem.cs
- FontConverter.cs
- SR.cs
- FilterException.cs
- XPathNode.cs
- SimpleType.cs
- SqlUdtInfo.cs
- TreePrinter.cs
- DataTableReader.cs
- DataGridViewColumnCollectionEditor.cs
- XmlEncodedRawTextWriter.cs
- WeakHashtable.cs
- FileUtil.cs
- TabItemAutomationPeer.cs
- MapPathBasedVirtualPathProvider.cs
- Regex.cs
- XPathAncestorQuery.cs
- FunctionMappingTranslator.cs
- AdPostCacheSubstitution.cs
- NullableDecimalAverageAggregationOperator.cs
- AttributeEmitter.cs
- BamlResourceDeserializer.cs
- QueryActivatableWorkflowsCommand.cs
- StorageModelBuildProvider.cs
- TextElementAutomationPeer.cs
- TypeConverterAttribute.cs
- SelectionItemProviderWrapper.cs
- AssociationSet.cs
- SystemIcmpV6Statistics.cs
- UserNamePasswordValidator.cs
- HtmlEncodedRawTextWriter.cs
- ProgressiveCrcCalculatingStream.cs
- InternalConfigConfigurationFactory.cs
- WindowsUpDown.cs
- UpdateCompiler.cs
- InstanceDescriptor.cs
- GenericIdentity.cs
- ViewCellSlot.cs
- XmlDigitalSignatureProcessor.cs
- TogglePattern.cs
- WebRequestModulesSection.cs
- HierarchicalDataBoundControlAdapter.cs
- TextEffect.cs
- NetworkInterface.cs
- FormViewDeletedEventArgs.cs
- BulletChrome.cs
- MatrixAnimationUsingPath.cs
- HijriCalendar.cs
- CriticalFinalizerObject.cs
- ObjectConverter.cs
- SecurityHelper.cs
- ImageList.cs
- sqlstateclientmanager.cs
- SecurityCredentialsManager.cs
- PipeSecurity.cs
- RegexTree.cs
- ProcessHostConfigUtils.cs
- ComponentSerializationService.cs
- EffectiveValueEntry.cs
- OpenFileDialog.cs
- ByteStack.cs
- BuildProviderAppliesToAttribute.cs
- HwndSubclass.cs
- FloaterParaClient.cs
- UnmanagedHandle.cs
- ListMarkerSourceInfo.cs
- FileReservationCollection.cs
- HandleExceptionArgs.cs
- ConfigurationSectionGroup.cs
- Stopwatch.cs
- CompositeActivityTypeDescriptorProvider.cs
- ButtonPopupAdapter.cs
- BitmapData.cs
- PageParserFilter.cs
- SinglePageViewer.cs
- ImageConverter.cs
- ListManagerBindingsCollection.cs
- StorageEntityTypeMapping.cs
- UnitySerializationHolder.cs
- MarkupCompilePass2.cs
- LayoutSettings.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- Parser.cs