Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / System.Activities / System / Activities / Expressions / OrElse.cs / 1305376 / OrElse.cs
//---------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //--------------------------------------------------------------- namespace System.Activities.Expressions { using System.Activities; using System.Activities.Statements; using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Runtime; [SuppressMessage(FxCop.Category.Naming, FxCop.Rule.IdentifiersShouldNotMatchKeywords, Justification = "Optimizing for XAML naming. VB imperative users will [] qualify (e.g. New [OrElse])")] public sealed class OrElse : Activity{ public OrElse() :base() { this.Implementation = () => { if (this.Left != null && this.Right != null) { return new If { Condition = this.Left, Then = new Assign { To = new OutArgument (context => this.Result.Get(context)), Value = true, }, Else = new Assign { To = new OutArgument (context => this.Result.Get(context)), Value = new InArgument (this.Right) } }; } else { return null; } }; } [DefaultValue(null)] public Activity Left { get; set; } [DefaultValue(null)] public Activity Right { get; set; } protected override void CacheMetadata(ActivityMetadata metadata) { metadata.AddImportedChild(this.Left); metadata.AddImportedChild(this.Right); if (this.Left == null) { metadata.AddValidationError(SR.BinaryExpressionActivityRequiresArgument("Left", "OrElse", this.DisplayName)); } if (this.Right == null) { metadata.AddValidationError(SR.BinaryExpressionActivityRequiresArgument("Right", "OrElse", this.DisplayName)); } } } } // 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
- StreamGeometry.cs
- CollectionConverter.cs
- TrackingMemoryStream.cs
- TempFiles.cs
- WebColorConverter.cs
- RepeaterItemEventArgs.cs
- SqlClientWrapperSmiStreamChars.cs
- SocketSettings.cs
- SqlFunctionAttribute.cs
- CultureInfo.cs
- SiteMapPath.cs
- ActiveXSite.cs
- WebEvents.cs
- FormViewCommandEventArgs.cs
- ITextView.cs
- securestring.cs
- DPAPIProtectedConfigurationProvider.cs
- PolicyStatement.cs
- CompositeDuplexBindingElement.cs
- CodeEntryPointMethod.cs
- updateconfighost.cs
- UserUseLicenseDictionaryLoader.cs
- AvTraceDetails.cs
- SynchronizationLockException.cs
- ExceptQueryOperator.cs
- ProfileService.cs
- ErrorStyle.cs
- WhereaboutsReader.cs
- DebugViewWriter.cs
- DropShadowEffect.cs
- WebConfigurationFileMap.cs
- GenericTextProperties.cs
- DocumentViewerAutomationPeer.cs
- HostingEnvironment.cs
- TreeNodeStyleCollection.cs
- X509SecurityTokenProvider.cs
- StructuredType.cs
- counter.cs
- FontUnitConverter.cs
- CompilerTypeWithParams.cs
- SerializationInfoEnumerator.cs
- AttributeConverter.cs
- ProfileInfo.cs
- Funcletizer.cs
- BoolLiteral.cs
- StartUpEventArgs.cs
- SamlSubjectStatement.cs
- RSACryptoServiceProvider.cs
- WindowsFormsHelpers.cs
- BulletChrome.cs
- DataGridViewCellCollection.cs
- CodeTypeReferenceCollection.cs
- PasswordBox.cs
- TreeChangeInfo.cs
- FullTrustAssembliesSection.cs
- CngAlgorithmGroup.cs
- ComboBox.cs
- Selection.cs
- BoundColumn.cs
- XamlInterfaces.cs
- DataGridViewDataErrorEventArgs.cs
- LabelLiteral.cs
- ReflectEventDescriptor.cs
- XmlNodeList.cs
- AssertUtility.cs
- DragCompletedEventArgs.cs
- URI.cs
- GradientStop.cs
- PersonalizationAdministration.cs
- Menu.cs
- UpdatePanelTriggerCollection.cs
- XmlQueryType.cs
- SystemThemeKey.cs
- Queue.cs
- SafeRegistryHandle.cs
- XmlQueryTypeFactory.cs
- XmlBuffer.cs
- TextRunCache.cs
- ManagementEventArgs.cs
- CharacterShapingProperties.cs
- BitmapPalette.cs
- CqlParserHelpers.cs
- HttpRuntimeSection.cs
- DesignOnlyAttribute.cs
- HtmlInputPassword.cs
- AlphaSortedEnumConverter.cs
- ObjectQueryExecutionPlan.cs
- MouseEventArgs.cs
- ErrorHandlerModule.cs
- UnionExpr.cs
- CodeAttributeDeclaration.cs
- DropShadowEffect.cs
- Color.cs
- SchemaSetCompiler.cs
- WindowsSlider.cs
- FontFamily.cs
- HttpApplicationFactory.cs
- DatagramAdapter.cs
- Lease.cs
- CounterSetInstanceCounterDataSet.cs