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
- PointConverter.cs
- XamlGridLengthSerializer.cs
- ComboBox.cs
- WizardPanelChangingEventArgs.cs
- ICspAsymmetricAlgorithm.cs
- Schema.cs
- RepeatInfo.cs
- UserControlCodeDomTreeGenerator.cs
- Msmq3PoisonHandler.cs
- LinkClickEvent.cs
- SimpleTextLine.cs
- SerialErrors.cs
- HtmlValidationSummaryAdapter.cs
- ThemeConfigurationDialog.cs
- XmlNodeChangedEventManager.cs
- XmlWriterSettings.cs
- WebPartCloseVerb.cs
- ScriptingJsonSerializationSection.cs
- FieldNameLookup.cs
- log.cs
- CodeSubDirectory.cs
- IpcChannel.cs
- BatchParser.cs
- RowToParametersTransformer.cs
- CharacterHit.cs
- ControlDesigner.cs
- IntegerFacetDescriptionElement.cs
- HttpFileCollectionWrapper.cs
- invalidudtexception.cs
- ServiceManager.cs
- ConnectionStringSettings.cs
- ToolStripGrip.cs
- ReceiveReply.cs
- ActivityDesignerLayoutSerializers.cs
- WindowsFont.cs
- CircleHotSpot.cs
- XmlDownloadManager.cs
- TextTreeUndoUnit.cs
- DataTableReaderListener.cs
- HttpCapabilitiesBase.cs
- ListControl.cs
- CacheVirtualItemsEvent.cs
- MasterPageParser.cs
- KeyMatchBuilder.cs
- EntityDataSourceConfigureObjectContext.cs
- FontUnitConverter.cs
- SqlDataReader.cs
- ContentDisposition.cs
- ImplicitInputBrush.cs
- Convert.cs
- VerticalAlignConverter.cs
- WebPageTraceListener.cs
- XmlIterators.cs
- EmissiveMaterial.cs
- EndpointAddressMessageFilter.cs
- CodeObjectCreateExpression.cs
- WebContext.cs
- CategoryList.cs
- RoutedEventConverter.cs
- ForwardPositionQuery.cs
- ByteFacetDescriptionElement.cs
- SmtpReplyReader.cs
- DoubleCollectionConverter.cs
- XmlSchemaSimpleType.cs
- BuildProvider.cs
- XmlTextAttribute.cs
- SqlBulkCopy.cs
- MarshalByRefObject.cs
- BooleanFunctions.cs
- ViewBox.cs
- TypeUtil.cs
- NativeMethods.cs
- NamespaceInfo.cs
- MatrixUtil.cs
- RecognizerStateChangedEventArgs.cs
- XmlConvert.cs
- SettingsBindableAttribute.cs
- Decorator.cs
- SecurityRuntime.cs
- MergePropertyDescriptor.cs
- Nodes.cs
- Operators.cs
- Base64Stream.cs
- MsiStyleLogWriter.cs
- Interlocked.cs
- DefinitionUpdate.cs
- GatewayDefinition.cs
- Axis.cs
- HttpDigestClientCredential.cs
- BinaryWriter.cs
- Light.cs
- Nullable.cs
- WebPartMenu.cs
- SecureStringHasher.cs
- SqlDataSourceFilteringEventArgs.cs
- HybridObjectCache.cs
- Border.cs
- MsmqBindingFilter.cs
- Brush.cs
- X509ServiceCertificateAuthentication.cs