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
- TypeConverterValueSerializer.cs
- SqlTrackingQuery.cs
- DeleteCardRequest.cs
- CodeAccessPermission.cs
- PerformanceCounterPermissionAttribute.cs
- SafeLibraryHandle.cs
- _SSPIWrapper.cs
- GcHandle.cs
- ReflectPropertyDescriptor.cs
- SortDescriptionCollection.cs
- InstanceContextManager.cs
- TreeNodeStyleCollection.cs
- SamlSecurityToken.cs
- CombinedGeometry.cs
- SqlBinder.cs
- EventToken.cs
- RawMouseInputReport.cs
- InternalControlCollection.cs
- SecurityTraceRecordHelper.cs
- _SpnDictionary.cs
- MessageFilter.cs
- ApplicationHost.cs
- PackWebRequest.cs
- DataGridViewComboBoxEditingControl.cs
- ADRoleFactoryConfiguration.cs
- SoapCommonClasses.cs
- SQLUtility.cs
- EdmMember.cs
- AdornerDecorator.cs
- BCryptNative.cs
- Header.cs
- TdsValueSetter.cs
- FreezableDefaultValueFactory.cs
- StylusPointPropertyInfo.cs
- DragDeltaEventArgs.cs
- XmlWrappingReader.cs
- XhtmlBasicImageAdapter.cs
- TraceInternal.cs
- Vector.cs
- TableItemStyle.cs
- SendMailErrorEventArgs.cs
- RuntimeConfigLKG.cs
- XmlNodeComparer.cs
- ColorMatrix.cs
- QueryGenerator.cs
- BitmapFrameEncode.cs
- PropertyGridCommands.cs
- GenericPrincipal.cs
- InfoCardService.cs
- IconBitmapDecoder.cs
- HttpBrowserCapabilitiesWrapper.cs
- BufferedGraphicsContext.cs
- NetStream.cs
- DataSourceCacheDurationConverter.cs
- SolidColorBrush.cs
- VectorCollectionValueSerializer.cs
- _LocalDataStoreMgr.cs
- LoadWorkflowCommand.cs
- FontFaceLayoutInfo.cs
- TripleDESCryptoServiceProvider.cs
- VarRefManager.cs
- WebPartVerbsEventArgs.cs
- Soap.cs
- LOSFormatter.cs
- ResponseBodyWriter.cs
- TTSEvent.cs
- WmpBitmapEncoder.cs
- TextFormatterImp.cs
- ToolStripOverflowButton.cs
- PropertyManager.cs
- CompilerError.cs
- EventsTab.cs
- PresentationUIStyleResources.cs
- InkCanvasSelection.cs
- DoubleLink.cs
- Zone.cs
- KeyManager.cs
- WeakEventManager.cs
- ClientSection.cs
- ListViewDataItem.cs
- XmlQueryCardinality.cs
- ScriptDescriptor.cs
- ChainOfResponsibility.cs
- EncoderParameters.cs
- Cloud.cs
- DataSourceView.cs
- SplitterEvent.cs
- DoubleAnimationUsingKeyFrames.cs
- GridViewRow.cs
- Span.cs
- PenCursorManager.cs
- SpoolingTaskBase.cs
- XXXOnTypeBuilderInstantiation.cs
- ToolboxItemAttribute.cs
- WindowsToolbarItemAsMenuItem.cs
- Accessible.cs
- mactripleDES.cs
- FlowDocument.cs
- KeyGesture.cs
- SecurityStandardsManager.cs