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
- DrawingGroup.cs
- HyperLinkField.cs
- MenuItemBinding.cs
- PersonalizableAttribute.cs
- TreeNode.cs
- clipboard.cs
- RestClientProxyHandler.cs
- DummyDataSource.cs
- Trigger.cs
- ResponseBodyWriter.cs
- SoapHttpTransportImporter.cs
- SelectionChangedEventArgs.cs
- PngBitmapEncoder.cs
- Rect.cs
- ParallelTimeline.cs
- DotNetATv1WindowsLogEntryDeserializer.cs
- DBConnectionString.cs
- PageOutputColor.cs
- UpDownEvent.cs
- ServiceHost.cs
- WindowsBrush.cs
- SignatureToken.cs
- DataListItemEventArgs.cs
- PointAnimation.cs
- InvalidComObjectException.cs
- TextTreeUndo.cs
- WebEvents.cs
- Rect3DConverter.cs
- CfgParser.cs
- XmlWriterTraceListener.cs
- DataSourceCacheDurationConverter.cs
- TimeStampChecker.cs
- TdsRecordBufferSetter.cs
- WinFormsSecurity.cs
- RuntimeHandles.cs
- InheritanceRules.cs
- RegisteredHiddenField.cs
- ControlBuilder.cs
- StreamBodyWriter.cs
- SimpleHandlerFactory.cs
- PathFigureCollection.cs
- EventLogHandle.cs
- CurrentChangingEventArgs.cs
- ExplicitDiscriminatorMap.cs
- ServiceOperationParameter.cs
- ToolZone.cs
- ToolStripTextBox.cs
- DataComponentMethodGenerator.cs
- StrongName.cs
- StrokeSerializer.cs
- Parameter.cs
- Composition.cs
- DictionaryBase.cs
- HtmlInputText.cs
- ReaderWriterLock.cs
- TaiwanLunisolarCalendar.cs
- DemultiplexingDispatchMessageFormatter.cs
- UmAlQuraCalendar.cs
- ComEventsHelper.cs
- GlyphRun.cs
- ValidationEventArgs.cs
- CodeIdentifier.cs
- ScriptControlDescriptor.cs
- DataGridViewRowConverter.cs
- DefaultPropertyAttribute.cs
- CheckBox.cs
- TimersDescriptionAttribute.cs
- RepeatBehavior.cs
- SourceFilter.cs
- AddInPipelineAttributes.cs
- LongTypeConverter.cs
- ZeroOpNode.cs
- WebPermission.cs
- DocumentPageViewAutomationPeer.cs
- Rectangle.cs
- DirectoryNotFoundException.cs
- QueryExtender.cs
- TextOutput.cs
- MemoryRecordBuffer.cs
- CharEnumerator.cs
- InheritanceAttribute.cs
- StateItem.cs
- RemotingException.cs
- QueryConverter.cs
- DataSourceCacheDurationConverter.cs
- FilterException.cs
- TreeWalker.cs
- DbgUtil.cs
- Registry.cs
- LocationSectionRecord.cs
- EntityDataSourceUtil.cs
- BindingExpression.cs
- Stream.cs
- AcceleratedTokenProvider.cs
- SmiEventSink_Default.cs
- TextDecorationLocationValidation.cs
- FieldMetadata.cs
- DataGridViewCheckBoxColumn.cs
- ControlValuePropertyAttribute.cs
- FlowDocumentScrollViewerAutomationPeer.cs