Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / System.Activities / System / Activities / Expressions / GreaterThanOrEqual.cs / 1305376 / GreaterThanOrEqual.cs
//---------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //--------------------------------------------------------------- namespace System.Activities.Expressions { using System.Activities; using System.Activities.Validation; using System.ComponentModel; using System.Linq.Expressions; using System.Runtime; public sealed class GreaterThanOrEqual: CodeActivity { //Lock is not needed for operationFunction here. The reason is that delegates for a given GreaterThanOrEqual are the same. //It's possible that 2 threads are assigning the operationFucntion at the same time. But it's okay because the compiled codes are the same. static Func operationFunction; [RequiredArgument] [DefaultValue(null)] public InArgument Left { get; set; } [RequiredArgument] [DefaultValue(null)] public InArgument Right { get; set; } protected override void CacheMetadata(CodeActivityMetadata metadata) { BinaryExpressionHelper.OnGetArguments(metadata, this.Left, this.Right); if (operationFunction == null) { ValidationError validationError; if (!BinaryExpressionHelper.TryGenerateLinqDelegate(ExpressionType.GreaterThanOrEqual, out operationFunction, out validationError)) { metadata.AddValidationError(validationError); } } } protected override TResult Execute(CodeActivityContext context) { Fx.Assert(operationFunction != null, "OperationFunction must exist."); TLeft leftValue = this.Left.Get(context); TRight rightValue = this.Right.Get(context); return operationFunction(leftValue, rightValue); } } } // 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
- XmlSchemaExternal.cs
- Lease.cs
- WebPartRestoreVerb.cs
- WinInet.cs
- StrongTypingException.cs
- Model3DGroup.cs
- StateMachineExecutionState.cs
- Helper.cs
- ConfigurationElement.cs
- StylusPointCollection.cs
- MediaTimeline.cs
- AuthenticationModuleElement.cs
- MimeTypeMapper.cs
- FlowDocumentPage.cs
- OdbcInfoMessageEvent.cs
- ControlLocalizer.cs
- SystemKeyConverter.cs
- XmlDictionaryWriter.cs
- XamlSerializer.cs
- DescendantQuery.cs
- TextElement.cs
- RNGCryptoServiceProvider.cs
- PageCache.cs
- SiteMapDesignerDataSourceView.cs
- XmlNamespaceManager.cs
- DesignerLabelAdapter.cs
- Scheduling.cs
- SmtpSection.cs
- Deserializer.cs
- ZipIOExtraFieldZip64Element.cs
- streamingZipPartStream.cs
- OutOfMemoryException.cs
- ServiceModelReg.cs
- ProtocolInformationWriter.cs
- HashStream.cs
- PageWrapper.cs
- VsPropertyGrid.cs
- DataControlImageButton.cs
- ExclusiveNamedPipeTransportManager.cs
- ProfileSettingsCollection.cs
- HtmlWindowCollection.cs
- StreamGeometry.cs
- ActivityCodeDomSerializationManager.cs
- Line.cs
- CustomAttributeFormatException.cs
- QilInvokeEarlyBound.cs
- GPPOINTF.cs
- FacetEnabledSchemaElement.cs
- StringSorter.cs
- CollectionChangeEventArgs.cs
- WebResourceUtil.cs
- RoutedPropertyChangedEventArgs.cs
- TwoPhaseCommit.cs
- SchemaImporterExtensionsSection.cs
- ItemCollection.cs
- PropertyNames.cs
- MDIClient.cs
- PersonalizationStateInfo.cs
- ActiveDocumentEvent.cs
- ApplicationProxyInternal.cs
- CodeTypeOfExpression.cs
- SystemInfo.cs
- SystemColors.cs
- CompilerGeneratedAttribute.cs
- ScrollViewerAutomationPeer.cs
- cookie.cs
- OutOfMemoryException.cs
- CustomCredentialPolicy.cs
- EmptyEnumerable.cs
- DataService.cs
- PropertyMapper.cs
- BasicBrowserDialog.cs
- ConsoleEntryPoint.cs
- ObjectSecurity.cs
- Soap11ServerProtocol.cs
- TimeSpanHelper.cs
- DoubleAnimationClockResource.cs
- ConfigurationStrings.cs
- ObjectNotFoundException.cs
- CompositeCollection.cs
- ContextQuery.cs
- Int16AnimationUsingKeyFrames.cs
- ColumnCollection.cs
- FunctionDescription.cs
- ProjectedSlot.cs
- AnnotationHighlightLayer.cs
- LayoutManager.cs
- X509Utils.cs
- IOException.cs
- BorderSidesEditor.cs
- CustomAttributeSerializer.cs
- HandledEventArgs.cs
- RMPermissions.cs
- ItemContainerProviderWrapper.cs
- TargetConverter.cs
- AlignmentXValidation.cs
- DynamicRendererThreadManager.cs
- ByteStreamGeometryContext.cs
- PersonalizationDictionary.cs
- ExpressionNode.cs