Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- IArgumentProvider.cs
- XmlElement.cs
- ComponentCollection.cs
- tooltip.cs
- TextCompositionEventArgs.cs
- JavaScriptSerializer.cs
- SessionStateUtil.cs
- PageBorderless.cs
- UIElement.cs
- AQNBuilder.cs
- BlurEffect.cs
- SparseMemoryStream.cs
- RowCache.cs
- XmlFormatExtensionPointAttribute.cs
- WindowsGraphics.cs
- BaseDataBoundControl.cs
- JoinQueryOperator.cs
- DataObjectEventArgs.cs
- OLEDB_Util.cs
- Rectangle.cs
- Attributes.cs
- AsyncOperation.cs
- String.cs
- CodeTypeConstructor.cs
- DocumentSequenceHighlightLayer.cs
- TriggerBase.cs
- WebPartHeaderCloseVerb.cs
- FileDialog_Vista_Interop.cs
- ISessionStateStore.cs
- SchemaLookupTable.cs
- PropertyRecord.cs
- FrameworkElementFactoryMarkupObject.cs
- SoapServerMessage.cs
- PermissionSetEnumerator.cs
- SQLSingle.cs
- PropertyValue.cs
- SafeHandle.cs
- ThreadAbortException.cs
- StringResourceManager.cs
- ButtonChrome.cs
- CompressStream.cs
- TagMapCollection.cs
- CompilationRelaxations.cs
- CheckBoxDesigner.cs
- SafeRightsManagementSessionHandle.cs
- ThreadAttributes.cs
- TextDecorationCollection.cs
- _BufferOffsetSize.cs
- ResourceWriter.cs
- Activator.cs
- XmlElementCollection.cs
- SafeSecurityHandles.cs
- Subtree.cs
- sqlstateclientmanager.cs
- ListComponentEditor.cs
- RtfToXamlReader.cs
- XsltLibrary.cs
- TextSearch.cs
- SinglePageViewer.cs
- ManagedIStream.cs
- PathData.cs
- DbDataAdapter.cs
- Cell.cs
- HebrewCalendar.cs
- UriGenerator.cs
- MailDefinition.cs
- XmlDigitalSignatureProcessor.cs
- Context.cs
- TraceListeners.cs
- CodeChecksumPragma.cs
- Atom10FormatterFactory.cs
- XPathCompileException.cs
- RectangleGeometry.cs
- TextServicesCompartment.cs
- TiffBitmapDecoder.cs
- KeyInterop.cs
- HostedBindingBehavior.cs
- XPathArrayIterator.cs
- Number.cs
- TextServicesProperty.cs
- ActivityWithResultWrapper.cs
- DbMetaDataCollectionNames.cs
- SplitterCancelEvent.cs
- ParameterModifier.cs
- _TimerThread.cs
- ByteStack.cs
- AppDomainShutdownMonitor.cs
- RadioButtonPopupAdapter.cs
- DateTimeFormatInfoScanner.cs
- ShowExpandedMultiValueConverter.cs
- HighlightComponent.cs
- TableCellCollection.cs
- IBuiltInEvidence.cs
- TextWriterTraceListener.cs
- DeviceContexts.cs
- RowSpanVector.cs
- SqlServer2KCompatibilityAnnotation.cs
- TabPanel.cs
- PrinterSettings.cs
- WebPartVerbCollection.cs