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
- DoubleCollectionValueSerializer.cs
- SymmetricAlgorithm.cs
- HttpCapabilitiesBase.cs
- XmlSchemaComplexContent.cs
- MailAddressCollection.cs
- TextLineBreak.cs
- DrawingCollection.cs
- _NetworkingPerfCounters.cs
- Debug.cs
- DefaultAssemblyResolver.cs
- XmlArrayItemAttributes.cs
- TcpStreams.cs
- TrustLevelCollection.cs
- Hashtable.cs
- MultiTouchSystemGestureLogic.cs
- OuterGlowBitmapEffect.cs
- ExecutionEngineException.cs
- XPathDocumentNavigator.cs
- AxHost.cs
- WebPartExportVerb.cs
- LineMetrics.cs
- Win32SafeHandles.cs
- Matrix3DConverter.cs
- DataSourceGroupCollection.cs
- ByteStream.cs
- NameSpaceExtractor.cs
- PropVariant.cs
- SystemColorTracker.cs
- XmlnsPrefixAttribute.cs
- SeparatorAutomationPeer.cs
- CounterCreationData.cs
- DrawListViewItemEventArgs.cs
- Win32MouseDevice.cs
- TrackingCondition.cs
- WebUtil.cs
- MissingFieldException.cs
- PositiveTimeSpanValidator.cs
- FrameworkContentElementAutomationPeer.cs
- PersonalizationProvider.cs
- JulianCalendar.cs
- ReachIDocumentPaginatorSerializer.cs
- GB18030Encoding.cs
- ScriptingWebServicesSectionGroup.cs
- Visitor.cs
- XomlSerializationHelpers.cs
- SqlXmlStorage.cs
- CacheManager.cs
- PrtCap_Builder.cs
- ResizeGrip.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- ResolvedKeyFrameEntry.cs
- IconHelper.cs
- IUnknownConstantAttribute.cs
- XmlSchemaDatatype.cs
- XDeferredAxisSource.cs
- EditorServiceContext.cs
- ProviderSettingsCollection.cs
- XmlDataDocument.cs
- PropertyItem.cs
- TextStore.cs
- Point4DValueSerializer.cs
- HwndSourceKeyboardInputSite.cs
- EdmFunctions.cs
- ServiceModelInstallComponent.cs
- EmptyCollection.cs
- TextEditorCopyPaste.cs
- _UncName.cs
- RecognizeCompletedEventArgs.cs
- FlowNode.cs
- Socket.cs
- ButtonFlatAdapter.cs
- OdbcStatementHandle.cs
- ExplicitDiscriminatorMap.cs
- DataServiceKeyAttribute.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- DataGridViewComboBoxColumn.cs
- FontWeightConverter.cs
- AbstractExpressions.cs
- Decorator.cs
- BookmarkScopeInfo.cs
- CqlGenerator.cs
- PagesSection.cs
- CommonXSendMessage.cs
- Variant.cs
- DecoderFallbackWithFailureFlag.cs
- SapiRecognizer.cs
- HttpValueCollection.cs
- ZoomPercentageConverter.cs
- LayoutTableCell.cs
- ObjectMaterializedEventArgs.cs
- TransformedBitmap.cs
- DetailsViewPageEventArgs.cs
- EntityAdapter.cs
- NamespaceQuery.cs
- LoaderAllocator.cs
- ContextMenuStrip.cs
- MessageDecoder.cs
- UIElementParaClient.cs
- SelectionPatternIdentifiers.cs
- NativeMethodsOther.cs