Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / System.Activities / System / Activities / Statements / FlowDecision.cs / 1305376 / FlowDecision.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.Activities.Statements { using System; using System.Activities; using System.Activities.Expressions; using System.Collections.Generic; using System.ComponentModel; using System.Linq.Expressions; using System.Windows.Markup; public sealed class FlowDecision : FlowNode { public FlowDecision() { } public FlowDecision(Expression> condition) : this() { if (condition == null) { throw FxTrace.Exception.ArgumentNull("condition"); } this.Condition = new LambdaValue (condition); } public FlowDecision(Activity condition) : this() { if (condition == null) { throw FxTrace.Exception.ArgumentNull("condition"); } this.Condition = condition; } [DefaultValue(null)] public Activity Condition { get; set; } [DefaultValue(null)] [DependsOn("Condition")] public FlowNode True { get; set; } [DefaultValue(null)] [DependsOn("True")] public FlowNode False { get; set; } internal override void OnOpen(Flowchart owner, NativeActivityMetadata metadata) { if (this.Condition == null) { metadata.AddValidationError(SR.FlowDecisionRequiresCondition(owner.DisplayName)); } } internal override void GetConnectedNodes(IList connections) { if (True != null) { connections.Add(True); } if (False != null) { connections.Add(False); } } internal override void GetChildActivities(ICollection children) { if (Condition != null) { children.Add(Condition); } } internal bool Execute(NativeActivityContext context, CompletionCallback onConditionCompleted) { context.ScheduleActivity(Condition, onConditionCompleted); return false; } } } // 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
- LineGeometry.cs
- ICspAsymmetricAlgorithm.cs
- EncryptionUtility.cs
- _SslStream.cs
- InputScopeManager.cs
- ExpressionWriter.cs
- httpapplicationstate.cs
- Aes.cs
- CannotUnloadAppDomainException.cs
- RequiredAttributeAttribute.cs
- XmlUtil.cs
- XPathAncestorQuery.cs
- MsmqException.cs
- SrgsOneOf.cs
- FilteredReadOnlyMetadataCollection.cs
- ResourcesBuildProvider.cs
- PackageDigitalSignature.cs
- ModuleBuilder.cs
- xmlglyphRunInfo.cs
- X509UI.cs
- Size3D.cs
- WebBrowserBase.cs
- BinaryObjectReader.cs
- SafeNativeMemoryHandle.cs
- BinHexEncoder.cs
- SqlCachedBuffer.cs
- Internal.cs
- GroupStyle.cs
- ServiceTimeoutsElement.cs
- HttpCacheVaryByContentEncodings.cs
- CookieProtection.cs
- InkCanvasAutomationPeer.cs
- PersonalizationProvider.cs
- Hash.cs
- FullTrustAssembly.cs
- ObjectItemNoOpAssemblyLoader.cs
- ContentElement.cs
- PointIndependentAnimationStorage.cs
- QilChoice.cs
- XmlSchemaComplexType.cs
- SpotLight.cs
- ZipIOExtraFieldZip64Element.cs
- PackageFilter.cs
- RuntimeArgumentHandle.cs
- CacheMemory.cs
- XmlDocumentType.cs
- Table.cs
- DataRowCollection.cs
- DbProviderSpecificTypePropertyAttribute.cs
- SqlDataSourceFilteringEventArgs.cs
- OverflowException.cs
- CustomAssemblyResolver.cs
- ApplicationServiceManager.cs
- ContentPosition.cs
- CssStyleCollection.cs
- ReservationCollection.cs
- DocComment.cs
- CounterSampleCalculator.cs
- ADConnectionHelper.cs
- Bitmap.cs
- InputProviderSite.cs
- BitmapDecoder.cs
- Error.cs
- ObfuscateAssemblyAttribute.cs
- XmlTypeAttribute.cs
- RegisteredHiddenField.cs
- ReflectionServiceProvider.cs
- WebPartExportVerb.cs
- RtfNavigator.cs
- AmbientLight.cs
- DbMetaDataColumnNames.cs
- Int64Animation.cs
- InputElement.cs
- BamlVersionHeader.cs
- EntityDesignerDataSourceView.cs
- BitmapEffectCollection.cs
- ColorConverter.cs
- _LoggingObject.cs
- AsyncCompletedEventArgs.cs
- DocumentSequence.cs
- Type.cs
- InvalidFilterCriteriaException.cs
- cookiecollection.cs
- ThreadInterruptedException.cs
- File.cs
- NameScopePropertyAttribute.cs
- ComplusEndpointConfigContainer.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- XmlDesignerDataSourceView.cs
- Floater.cs
- control.ime.cs
- WasAdminWrapper.cs
- FileDialog.cs
- Border.cs
- DataServiceQueryException.cs
- Win32Exception.cs
- CompModSwitches.cs
- LinkUtilities.cs
- HtmlTable.cs
- RelatedImageListAttribute.cs