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, List list) {
}
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
- RawStylusInputReport.cs
- PersianCalendar.cs
- DataGridViewRowsAddedEventArgs.cs
- ToolStripSplitStackLayout.cs
- XmlMessageFormatter.cs
- HashJoinQueryOperatorEnumerator.cs
- SystemResourceKey.cs
- QilNode.cs
- FixedSOMPage.cs
- HttpRequest.cs
- AspCompat.cs
- Size3DConverter.cs
- IntPtr.cs
- HttpConfigurationContext.cs
- SrgsOneOf.cs
- LogConverter.cs
- JumpItem.cs
- CaseExpr.cs
- Command.cs
- X509SecurityTokenParameters.cs
- TextParaLineResult.cs
- PointConverter.cs
- ClockGroup.cs
- DependencyObject.cs
- StyleXamlParser.cs
- SqlTypesSchemaImporter.cs
- DataStreamFromComStream.cs
- ImageClickEventArgs.cs
- FrameworkEventSource.cs
- XmlDocumentFragment.cs
- SecurityDocument.cs
- BaseProcessor.cs
- WizardDesigner.cs
- LocalizableAttribute.cs
- EventDescriptorCollection.cs
- UnsafeCollabNativeMethods.cs
- ComponentFactoryHelpers.cs
- StringDictionary.cs
- RouteUrlExpressionBuilder.cs
- PropertyGridEditorPart.cs
- IconConverter.cs
- DurableEnlistmentState.cs
- FrameworkContextData.cs
- WebPartManager.cs
- Rect3D.cs
- SqlCachedBuffer.cs
- SSmlParser.cs
- UTF8Encoding.cs
- HttpServerUtilityBase.cs
- MetroSerializationManager.cs
- TableRowCollection.cs
- EventArgs.cs
- MobileResource.cs
- SchemaSetCompiler.cs
- MetafileHeader.cs
- BuilderPropertyEntry.cs
- Error.cs
- TextServicesDisplayAttribute.cs
- InvalidateEvent.cs
- InvokeMethod.cs
- Point.cs
- CaseInsensitiveHashCodeProvider.cs
- XpsSerializationManagerAsync.cs
- SerializationException.cs
- WebPartDisplayMode.cs
- CharEnumerator.cs
- errorpatternmatcher.cs
- ExpressionEditorAttribute.cs
- DesignerTransaction.cs
- ResourceProviderFactory.cs
- Serializer.cs
- XPathQilFactory.cs
- BreakRecordTable.cs
- TypeExtension.cs
- DBSqlParserColumnCollection.cs
- SurrogateEncoder.cs
- DbUpdateCommandTree.cs
- MimeMapping.cs
- ChannelSinkStacks.cs
- DeviceSpecificChoice.cs
- HandleCollector.cs
- TypographyProperties.cs
- RemotingConfigParser.cs
- HttpHandlerActionCollection.cs
- MetadataArtifactLoaderFile.cs
- VerifyHashRequest.cs
- httpserverutility.cs
- ExtendedPropertyCollection.cs
- util.cs
- PrePrepareMethodAttribute.cs
- SqlDataSourceSummaryPanel.cs
- FileDetails.cs
- PointAnimationClockResource.cs
- ParseNumbers.cs
- FixUpCollection.cs
- FrugalList.cs
- TemplateColumn.cs
- FactoryId.cs
- AxHost.cs
- NonVisualControlAttribute.cs