Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / Data / System / Data / Filter / ZeroOpNode.cs / 1 / ZeroOpNode.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //[....] //[....] //----------------------------------------------------------------------------- namespace System.Data { using System; using System.Collections.Generic; using System.Diagnostics; internal sealed class ZeroOpNode : ExpressionNode { internal readonly int op; internal const int zop_True = 1; internal const int zop_False = 0; internal const int zop_Null = -1; internal ZeroOpNode(int op) : base((DataTable)null) { this.op = op; Debug.Assert(op == Operators.True || op == Operators.False || op == Operators.Null, "Invalid zero-op"); } internal override void Bind(DataTable table, Listlist) { } internal override object Eval() { switch (op) { case Operators.True: return true; case Operators.False: return false; case Operators.Null: return DBNull.Value; default: Debug.Assert(op == Operators.True || op == Operators.False || op == Operators.Null, "Invalid zero-op"); return DBNull.Value; } } internal override object Eval(DataRow row, DataRowVersion version) { return Eval(); } internal override object Eval(int[] recordNos) { return Eval(); } internal override bool IsConstant() { return true; } internal override bool IsTableConstant() { return true; } internal override bool HasLocalAggregate() { return false; } internal override bool HasRemoteAggregate() { return false; } internal override ExpressionNode Optimize() { return this; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ // // Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //[....] //[....] //----------------------------------------------------------------------------- namespace System.Data { using System; using System.Collections.Generic; using System.Diagnostics; internal sealed class ZeroOpNode : ExpressionNode { internal readonly int op; internal const int zop_True = 1; internal const int zop_False = 0; internal const int zop_Null = -1; internal ZeroOpNode(int op) : base((DataTable)null) { this.op = op; Debug.Assert(op == Operators.True || op == Operators.False || op == Operators.Null, "Invalid zero-op"); } internal override void Bind(DataTable table, Listlist) { } internal override object Eval() { switch (op) { case Operators.True: return true; case Operators.False: return false; case Operators.Null: return DBNull.Value; default: Debug.Assert(op == Operators.True || op == Operators.False || op == Operators.Null, "Invalid zero-op"); return DBNull.Value; } } internal override object Eval(DataRow row, DataRowVersion version) { return Eval(); } internal override object Eval(int[] recordNos) { return Eval(); } internal override bool IsConstant() { return true; } internal override bool IsTableConstant() { return true; } internal override bool HasLocalAggregate() { return false; } internal override bool HasRemoteAggregate() { return false; } internal override ExpressionNode Optimize() { return this; } } } // 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
- TableLayoutRowStyleCollection.cs
- WorkflowOperationFault.cs
- OrthographicCamera.cs
- WizardSideBarListControlItemEventArgs.cs
- TextUtf8RawTextWriter.cs
- StringUtil.cs
- XpsPackagingException.cs
- securestring.cs
- While.cs
- HandlerFactoryWrapper.cs
- DataSourceHelper.cs
- TagNameToTypeMapper.cs
- ParameterCollection.cs
- VisualStyleRenderer.cs
- RegexMatchCollection.cs
- Set.cs
- ProtocolViolationException.cs
- SynchronizationContext.cs
- Debug.cs
- SiteIdentityPermission.cs
- BinaryUtilClasses.cs
- BuildResult.cs
- Overlapped.cs
- MimeMultiPart.cs
- MemberDomainMap.cs
- DocumentViewerHelper.cs
- Journaling.cs
- linebase.cs
- ServiceSettingsResponseInfo.cs
- QilValidationVisitor.cs
- XmlSchemaGroupRef.cs
- ReliabilityContractAttribute.cs
- SwitchLevelAttribute.cs
- HttpCachePolicyElement.cs
- ReliabilityContractAttribute.cs
- CodeTypeParameter.cs
- HttpListenerContext.cs
- CodeAccessSecurityEngine.cs
- LayoutExceptionEventArgs.cs
- ImageConverter.cs
- log.cs
- DesignerLoader.cs
- ValidationContext.cs
- RNGCryptoServiceProvider.cs
- PageBuildProvider.cs
- iisPickupDirectory.cs
- OleAutBinder.cs
- StringHandle.cs
- Brushes.cs
- InputScopeNameConverter.cs
- BoundingRectTracker.cs
- BamlResourceDeserializer.cs
- PropertyChangedEventArgs.cs
- ShaderRenderModeValidation.cs
- DelegateSerializationHolder.cs
- RootBuilder.cs
- SchemaNamespaceManager.cs
- Delegate.cs
- WindowsStatic.cs
- TextAutomationPeer.cs
- TreeNodeBinding.cs
- Base64Decoder.cs
- ContainerParaClient.cs
- XmlSchemaCompilationSettings.cs
- Assign.cs
- DiscoveryClientChannelBase.cs
- StorageScalarPropertyMapping.cs
- ObjRef.cs
- ParameterBuilder.cs
- Span.cs
- QuaternionKeyFrameCollection.cs
- HttpCacheParams.cs
- RadioButtonList.cs
- ResourceSet.cs
- ProcessStartInfo.cs
- ResXResourceWriter.cs
- DataRelationCollection.cs
- IItemContainerGenerator.cs
- SplashScreenNativeMethods.cs
- DependentList.cs
- _OverlappedAsyncResult.cs
- GridViewUpdatedEventArgs.cs
- StatusBarAutomationPeer.cs
- PrtTicket_Public.cs
- RemotingAttributes.cs
- CustomAttributeFormatException.cs
- UnsafeNativeMethods.cs
- NamespaceListProperty.cs
- ExpanderAutomationPeer.cs
- RequestCachingSection.cs
- Attributes.cs
- Int32Converter.cs
- Int32.cs
- MsmqTransportReceiveParameters.cs
- AdRotator.cs
- DataBindingCollection.cs
- SqlDependency.cs
- Matrix3DConverter.cs
- DocumentAutomationPeer.cs
- WindowsListViewScroll.cs