Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ModuleBuilder.cs
- TreeViewAutomationPeer.cs
- MessageHeaderDescription.cs
- ObjectStateEntryOriginalDbUpdatableDataRecord.cs
- ReadOnlyDataSource.cs
- ZoneIdentityPermission.cs
- RSAPKCS1KeyExchangeFormatter.cs
- DES.cs
- ProcessHostConfigUtils.cs
- InvalidPrinterException.cs
- XmlSerializerAssemblyAttribute.cs
- DrawingGroupDrawingContext.cs
- LoginCancelEventArgs.cs
- FormClosedEvent.cs
- FromRequest.cs
- GenericEnumerator.cs
- CacheForPrimitiveTypes.cs
- HtmlMeta.cs
- SortKey.cs
- PeerEndPoint.cs
- GenericTypeParameterBuilder.cs
- LiteralSubsegment.cs
- Drawing.cs
- DataGridViewRowCancelEventArgs.cs
- CommandExpr.cs
- ServerProtocol.cs
- CollectionViewGroupRoot.cs
- Psha1DerivedKeyGenerator.cs
- LookupTables.cs
- GlobalAllocSafeHandle.cs
- sqlnorm.cs
- HttpWebRequestElement.cs
- BlockingCollection.cs
- RadioButtonBaseAdapter.cs
- TextParagraphView.cs
- InternalCache.cs
- safex509handles.cs
- EventHandlingScope.cs
- OutputCacheProfileCollection.cs
- GenericRootAutomationPeer.cs
- SystemWebSectionGroup.cs
- TreeNode.cs
- CompilationSection.cs
- httpapplicationstate.cs
- IdentityNotMappedException.cs
- UnsafeNativeMethods.cs
- XmlMemberMapping.cs
- _HeaderInfo.cs
- VectorAnimationUsingKeyFrames.cs
- OleDbReferenceCollection.cs
- DataGridTableCollection.cs
- XmlHierarchicalDataSourceView.cs
- WindowsFormsSectionHandler.cs
- CapacityStreamGeometryContext.cs
- CodeVariableReferenceExpression.cs
- ToolStripPanelSelectionBehavior.cs
- GPPOINT.cs
- SocketInformation.cs
- WindowsSecurityToken.cs
- BooleanSwitch.cs
- FindCriteriaElement.cs
- DispatchWrapper.cs
- SecurityTokenSpecification.cs
- InitializationEventAttribute.cs
- DataGridViewCellEventArgs.cs
- InvalidPrinterException.cs
- SoapElementAttribute.cs
- NamespaceCollection.cs
- EndOfStreamException.cs
- GridViewRowEventArgs.cs
- AutomationPropertyChangedEventArgs.cs
- RuleConditionDialog.cs
- FormCollection.cs
- DescendantOverDescendantQuery.cs
- SectionXmlInfo.cs
- SQLSingle.cs
- AsymmetricCryptoHandle.cs
- AmbientValueAttribute.cs
- TabletDevice.cs
- AutoSizeToolBoxItem.cs
- SplitterCancelEvent.cs
- ConstrainedDataObject.cs
- HwndSource.cs
- InvalidPropValue.cs
- BrowserDefinitionCollection.cs
- ProtocolsConfiguration.cs
- Condition.cs
- ApplicationDirectoryMembershipCondition.cs
- WorkflowLayouts.cs
- TableLayoutCellPaintEventArgs.cs
- PageParser.cs
- QueryableDataSourceView.cs
- WebPartDisplayMode.cs
- ExpressionPrefixAttribute.cs
- DateTime.cs
- TextServicesPropertyRanges.cs
- OleDbParameter.cs
- ListItem.cs
- GenericRootAutomationPeer.cs
- CheckBox.cs