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
- TagPrefixCollection.cs
- PageRequestManager.cs
- followingquery.cs
- FontStretch.cs
- DSGeneratorProblem.cs
- CultureTableRecord.cs
- Assert.cs
- JsonQNameDataContract.cs
- TextServicesDisplayAttribute.cs
- DataGridViewAutoSizeModeEventArgs.cs
- ControlParameter.cs
- MethodRental.cs
- ModelTreeEnumerator.cs
- StreamWriter.cs
- MsmqProcessProtocolHandler.cs
- ModelTypeConverter.cs
- CodeSnippetCompileUnit.cs
- AmbientProperties.cs
- UIElementParagraph.cs
- UpdateException.cs
- EdmPropertyAttribute.cs
- X509CertificateStore.cs
- Dynamic.cs
- CompositeActivityDesigner.cs
- TableRow.cs
- ContainerTracking.cs
- securitymgrsite.cs
- SQLDoubleStorage.cs
- CanonicalFontFamilyReference.cs
- PowerModeChangedEventArgs.cs
- Cursors.cs
- TextBoxAutomationPeer.cs
- ThumbAutomationPeer.cs
- ClientOptions.cs
- ContainerControl.cs
- CollectionContainer.cs
- HMACSHA384.cs
- AliasedSlot.cs
- InternalDispatchObject.cs
- TypeUsageBuilder.cs
- QuaternionValueSerializer.cs
- EpmCustomContentWriterNodeData.cs
- ClipboardData.cs
- SqlRowUpdatedEvent.cs
- EncoderExceptionFallback.cs
- IImplicitResourceProvider.cs
- HttpModuleAction.cs
- SpellerHighlightLayer.cs
- DataGridViewCellToolTipTextNeededEventArgs.cs
- CroppedBitmap.cs
- CollectionViewProxy.cs
- AssemblyBuilder.cs
- SystemTcpConnection.cs
- DataComponentNameHandler.cs
- DefinitionBase.cs
- BrowserCapabilitiesCompiler.cs
- DockingAttribute.cs
- LockRecoveryTask.cs
- WrappedKeySecurityToken.cs
- StringHandle.cs
- MsmqIntegrationInputMessage.cs
- DataGridViewTextBoxColumn.cs
- ConfigViewGenerator.cs
- InputLanguageCollection.cs
- COM2ColorConverter.cs
- TraceHandler.cs
- InvalidFilterCriteriaException.cs
- SecurityValidationBehavior.cs
- PeerNameRecord.cs
- UnsafeNativeMethods.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- XmlSchemaValidationException.cs
- DrawingContextWalker.cs
- AliasedExpr.cs
- InProcStateClientManager.cs
- TouchesCapturedWithinProperty.cs
- BoundColumn.cs
- PointLight.cs
- ImageDrawing.cs
- OutputWindow.cs
- NativeMethodsOther.cs
- HttpCookiesSection.cs
- ServiceReference.cs
- ConfigXmlAttribute.cs
- UInt16Converter.cs
- Link.cs
- CompoundFileIOPermission.cs
- DecoderNLS.cs
- RuntimeConfigLKG.cs
- GeneralTransform3D.cs
- DataTrigger.cs
- ExpandSegment.cs
- DocumentXPathNavigator.cs
- ClientRolePrincipal.cs
- Pkcs9Attribute.cs
- KeyedHashAlgorithm.cs
- SqlTriggerContext.cs
- Input.cs
- BindingWorker.cs
- ScrollChangedEventArgs.cs