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
- BamlBinaryReader.cs
- NumericUpDown.cs
- PickBranch.cs
- DBConcurrencyException.cs
- ObjectPersistData.cs
- SerializationInfoEnumerator.cs
- DbDataAdapter.cs
- MasterPageCodeDomTreeGenerator.cs
- DispatchWrapper.cs
- Attributes.cs
- SqlHelper.cs
- AutomationPropertyInfo.cs
- VirtualizingStackPanel.cs
- XmlSerializerFactory.cs
- MarkupCompilePass1.cs
- PageAsyncTaskManager.cs
- GeneralTransform3DGroup.cs
- StateChangeEvent.cs
- OutputCacheSettings.cs
- XmlCharacterData.cs
- DropSourceBehavior.cs
- ConsumerConnectionPointCollection.cs
- UnhandledExceptionEventArgs.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- ChangePassword.cs
- StringBuilder.cs
- GlyphsSerializer.cs
- SectionUpdates.cs
- WindowPattern.cs
- AutomationIdentifier.cs
- DocumentEventArgs.cs
- Expression.DebuggerProxy.cs
- Compensate.cs
- CellLabel.cs
- SemanticResultKey.cs
- RSAPKCS1SignatureFormatter.cs
- StreamedFramingRequestChannel.cs
- ScriptModule.cs
- SSmlParser.cs
- PersonalizableTypeEntry.cs
- TimelineClockCollection.cs
- SystemResourceKey.cs
- WindowsStartMenu.cs
- CookielessData.cs
- ComplexLine.cs
- GridView.cs
- XmlAttributeOverrides.cs
- EraserBehavior.cs
- DesignSurfaceManager.cs
- OutputCacheSettingsSection.cs
- DataGridViewMethods.cs
- ToolBarPanel.cs
- RotateTransform.cs
- PreservationFileWriter.cs
- TransformerInfo.cs
- EntityAdapter.cs
- FlowDocumentFormatter.cs
- RoleExceptions.cs
- XmlNamespaceDeclarationsAttribute.cs
- DataServiceQueryProvider.cs
- SeverityFilter.cs
- FileDataSourceCache.cs
- SqlParameterCollection.cs
- SerialReceived.cs
- ContextProperty.cs
- XmlSchemaException.cs
- CommonDialog.cs
- XmlRawWriterWrapper.cs
- ReadOnlyActivityGlyph.cs
- SqlInternalConnectionTds.cs
- StateManagedCollection.cs
- cookiecollection.cs
- SqlEnums.cs
- URIFormatException.cs
- EventSource.cs
- wmiprovider.cs
- Crypto.cs
- PolyLineSegment.cs
- CounterCreationData.cs
- WebPartDeleteVerb.cs
- SocketAddress.cs
- AmbientEnvironment.cs
- TextEndOfLine.cs
- ZipIORawDataFileBlock.cs
- ChildTable.cs
- TransportSecurityProtocolFactory.cs
- TextCompositionManager.cs
- CompressedStack.cs
- RuntimeHandles.cs
- SiteMapHierarchicalDataSourceView.cs
- OSEnvironmentHelper.cs
- RadioButtonFlatAdapter.cs
- ObjectContext.cs
- CounterCreationDataCollection.cs
- DesignerActionItemCollection.cs
- SecurityImpersonationBehavior.cs
- ResourceProviderFactory.cs
- Parameter.cs
- MetabaseSettingsIis7.cs
- TemplateBindingExtension.cs