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
- DataObjectAttribute.cs
- CompiledIdentityConstraint.cs
- Literal.cs
- DocumentPageHost.cs
- XmlWriterDelegator.cs
- LexicalChunk.cs
- DesignerTextViewAdapter.cs
- Formatter.cs
- WorkflowServiceNamespace.cs
- IImplicitResourceProvider.cs
- ClientTargetSection.cs
- WorkerRequest.cs
- StringExpressionSet.cs
- SessionPageStatePersister.cs
- JsonByteArrayDataContract.cs
- PlatformCulture.cs
- AccessibleObject.cs
- IntegerValidator.cs
- MethodRental.cs
- ObjectTag.cs
- SafeUserTokenHandle.cs
- ReflectPropertyDescriptor.cs
- SiteMapSection.cs
- DataContractAttribute.cs
- FontStyleConverter.cs
- TextEditorCopyPaste.cs
- XmlIlGenerator.cs
- DbDataReader.cs
- StylusPointPropertyInfoDefaults.cs
- Trace.cs
- EventHandlerList.cs
- PriorityQueue.cs
- X509Extension.cs
- bindurihelper.cs
- Baml2006Reader.cs
- DataGridCellsPresenter.cs
- GuidelineSet.cs
- DataGridViewSelectedRowCollection.cs
- SignedXmlDebugLog.cs
- SrgsDocumentParser.cs
- XomlCompilerError.cs
- DisableDpiAwarenessAttribute.cs
- PropertyMetadata.cs
- HashSetEqualityComparer.cs
- HelpKeywordAttribute.cs
- HttpException.cs
- ModelPerspective.cs
- FragmentQuery.cs
- ToolboxItemWrapper.cs
- ClientScriptManagerWrapper.cs
- DbProviderFactoriesConfigurationHandler.cs
- DataKeyPropertyAttribute.cs
- ScrollableControl.cs
- TextEditorTyping.cs
- CultureSpecificStringDictionary.cs
- ProcessHostFactoryHelper.cs
- ServiceProviders.cs
- IOThreadTimer.cs
- FormViewUpdatedEventArgs.cs
- CommandConverter.cs
- _Events.cs
- CollectionConverter.cs
- WorkflowViewManager.cs
- ProfileModule.cs
- Tag.cs
- TraceListener.cs
- DataServiceSaveChangesEventArgs.cs
- MsmqChannelFactory.cs
- FixedSOMTableCell.cs
- Grid.cs
- OrderPreservingSpoolingTask.cs
- SQLRoleProvider.cs
- ReadingWritingEntityEventArgs.cs
- ParseNumbers.cs
- MailDefinitionBodyFileNameEditor.cs
- Dictionary.cs
- TextFormatter.cs
- QilTargetType.cs
- DescendantOverDescendantQuery.cs
- StyleTypedPropertyAttribute.cs
- SecurityManager.cs
- XmlSchemaProviderAttribute.cs
- DataGridColumnCollection.cs
- BinaryVersion.cs
- InternalCache.cs
- HttpCachePolicy.cs
- AppDomainGrammarProxy.cs
- TraceLevelStore.cs
- CodeAttachEventStatement.cs
- SqlDataSourceCommandEventArgs.cs
- MultidimensionalArrayItemReference.cs
- InstanceCreationEditor.cs
- RuntimeHelpers.cs
- DbConvert.cs
- MessageDirection.cs
- TextOptionsInternal.cs
- InstanceData.cs
- BaseParser.cs
- NonBatchDirectoryCompiler.cs
- HttpRuntimeSection.cs