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
- UncommonField.cs
- Soap.cs
- WindowsImpersonationContext.cs
- TypeGeneratedEventArgs.cs
- Function.cs
- XmlSubtreeReader.cs
- OracleDataAdapter.cs
- DbConvert.cs
- Paragraph.cs
- RunInstallerAttribute.cs
- HostedController.cs
- Single.cs
- TemplatePropertyEntry.cs
- DesignerTransactionCloseEvent.cs
- OutputCacheModule.cs
- XmlDataSource.cs
- PrimitiveDataContract.cs
- ColorConverter.cs
- TypeProvider.cs
- ProgressiveCrcCalculatingStream.cs
- DataContract.cs
- DataGridHelper.cs
- SafeArchiveContext.cs
- HttpRawResponse.cs
- HttpCookieCollection.cs
- LineGeometry.cs
- NativeRightsManagementAPIsStructures.cs
- DelimitedListTraceListener.cs
- EncryptedKey.cs
- EnumConverter.cs
- DbConnectionFactory.cs
- MenuItemCollectionEditor.cs
- securitycriticaldata.cs
- DependencyObjectProvider.cs
- ViewStateModeByIdAttribute.cs
- Renderer.cs
- DomainConstraint.cs
- CounterCreationDataCollection.cs
- KeyTime.cs
- ProviderConnectionPoint.cs
- ExpandoClass.cs
- WebReferenceCollection.cs
- XmlSchemaAttributeGroup.cs
- WebProxyScriptElement.cs
- ClientFormsAuthenticationMembershipProvider.cs
- NavigationHelper.cs
- FixedTextContainer.cs
- SafeHandles.cs
- CodeDOMUtility.cs
- XmlSchemaNotation.cs
- HwndAppCommandInputProvider.cs
- InternalControlCollection.cs
- EllipseGeometry.cs
- ICspAsymmetricAlgorithm.cs
- TrackingWorkflowEventArgs.cs
- BamlWriter.cs
- XmlImplementation.cs
- CanExpandCollapseAllConverter.cs
- CmsInterop.cs
- CheckBoxBaseAdapter.cs
- WinInetCache.cs
- SystemDiagnosticsSection.cs
- BitmapEffectDrawing.cs
- AsyncDataRequest.cs
- SimpleApplicationHost.cs
- OdbcError.cs
- MsmqMessageProperty.cs
- InkPresenter.cs
- Merger.cs
- UserControlBuildProvider.cs
- TemplateInstanceAttribute.cs
- Signature.cs
- TypeToStringValueConverter.cs
- RegisteredDisposeScript.cs
- ResXBuildProvider.cs
- PropertyInfoSet.cs
- SingleKeyFrameCollection.cs
- WindowsListViewGroupSubsetLink.cs
- DocumentSequence.cs
- NumberSubstitution.cs
- HitTestResult.cs
- ObjectStorage.cs
- ProcessModule.cs
- WebPartDescription.cs
- ImageListDesigner.cs
- UserPersonalizationStateInfo.cs
- PolicyStatement.cs
- SchemaNotation.cs
- EventMemberCodeDomSerializer.cs
- DateTimeSerializationSection.cs
- TextBox.cs
- clipboard.cs
- XhtmlConformanceSection.cs
- NumericPagerField.cs
- LabelAutomationPeer.cs
- Label.cs
- UnitySerializationHolder.cs
- Debug.cs
- Model3DCollection.cs
- Currency.cs