Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / System.Activities / System / Activities / Expressions / AndAlso.cs / 1305376 / AndAlso.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 [AndAlso])")] public sealed class AndAlso : Activity{ public AndAlso() : 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 = new InArgument (this.Right) }, Else = new Assign { To = new OutArgument (context => this.Result.Get(context)), Value = false, } }; } 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", "AndAlso", this.DisplayName)); } if (this.Right == null) { metadata.AddValidationError(SR.BinaryExpressionActivityRequiresArgument("Right", "AndAlso", 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
- NamedPipeDuplicateContext.cs
- FtpCachePolicyElement.cs
- OleDbReferenceCollection.cs
- FillErrorEventArgs.cs
- PreviewKeyDownEventArgs.cs
- InternalControlCollection.cs
- DropSource.cs
- ExpressionBindingCollection.cs
- DesignerSerializationOptionsAttribute.cs
- PropertyTabAttribute.cs
- UserMapPath.cs
- __Error.cs
- COM2IPerPropertyBrowsingHandler.cs
- IBuiltInEvidence.cs
- JsonStringDataContract.cs
- LinkButton.cs
- ElementMarkupObject.cs
- RayHitTestParameters.cs
- MutableAssemblyCacheEntry.cs
- HtmlHistory.cs
- WebPartMenuStyle.cs
- SplayTreeNode.cs
- ColumnResizeUndoUnit.cs
- SqlDataReader.cs
- SiteMembershipCondition.cs
- ImageDrawing.cs
- SwitchAttribute.cs
- BezierSegment.cs
- UserControlParser.cs
- SqlParameterCollection.cs
- DesignerAttribute.cs
- KeyValueInternalCollection.cs
- IntermediatePolicyValidator.cs
- WebMessageEncodingBindingElement.cs
- Size.cs
- XmlDictionary.cs
- StateRuntime.cs
- Boolean.cs
- HttpListenerRequest.cs
- Italic.cs
- Int16.cs
- WrapPanel.cs
- TableItemPatternIdentifiers.cs
- SizeFConverter.cs
- TextServicesContext.cs
- ImageField.cs
- DataServiceHostFactory.cs
- _ConnectionGroup.cs
- RSAOAEPKeyExchangeFormatter.cs
- CombinedGeometry.cs
- PixelFormat.cs
- WorkflowInstanceSuspendedRecord.cs
- UntypedNullExpression.cs
- SqlCachedBuffer.cs
- UnsignedPublishLicense.cs
- WindowsStartMenu.cs
- BuilderPropertyEntry.cs
- AnnotationDocumentPaginator.cs
- GreaterThan.cs
- SqlNotificationEventArgs.cs
- IItemContainerGenerator.cs
- DataSourceControlBuilder.cs
- MatrixUtil.cs
- InvalidFilterCriteriaException.cs
- IsolationInterop.cs
- GraphicsContainer.cs
- LicFileLicenseProvider.cs
- CheckBoxFlatAdapter.cs
- InkCanvas.cs
- XhtmlTextWriter.cs
- KeyTime.cs
- AuthenticationManager.cs
- DriveInfo.cs
- ToolStripSettings.cs
- ConfigXmlText.cs
- TypeConverter.cs
- FacetDescriptionElement.cs
- AtomServiceDocumentSerializer.cs
- PropertyToken.cs
- ActivityCodeDomSerializationManager.cs
- DataKeyArray.cs
- cookiecontainer.cs
- DesignerActionHeaderItem.cs
- SelectionWordBreaker.cs
- StylesEditorDialog.cs
- LocatorPart.cs
- SrgsDocument.cs
- _ProxyChain.cs
- UnsafeNativeMethodsMilCoreApi.cs
- InkPresenter.cs
- ConfigXmlAttribute.cs
- QueryResults.cs
- TimeBoundedCache.cs
- BuilderPropertyEntry.cs
- CheckBox.cs
- UIElementPropertyUndoUnit.cs
- MailSettingsSection.cs
- DependencyObject.cs
- DataBoundControl.cs
- RootCodeDomSerializer.cs