Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- SettingsPropertyValueCollection.cs
- MsmqMessageProperty.cs
- SchemaInfo.cs
- StaticExtension.cs
- SqlCacheDependencyDatabaseCollection.cs
- QueryExpr.cs
- Type.cs
- TriggerCollection.cs
- InvalidFilterCriteriaException.cs
- ToolStripGripRenderEventArgs.cs
- ConfigXmlText.cs
- SHA512.cs
- ExpandedWrapper.cs
- MatrixStack.cs
- ObjectHelper.cs
- ChildTable.cs
- PasswordBoxAutomationPeer.cs
- WebPartConnectionsCancelEventArgs.cs
- SourceElementsCollection.cs
- Graphics.cs
- OverflowException.cs
- ToolStripSystemRenderer.cs
- ResourceProviderFactory.cs
- HtmlInputRadioButton.cs
- ReadWriteSpinLock.cs
- DeferredTextReference.cs
- WindowsGraphicsWrapper.cs
- AudioFileOut.cs
- MethodAccessException.cs
- DataGridViewTextBoxCell.cs
- URIFormatException.cs
- ColumnResizeAdorner.cs
- Triplet.cs
- GridItemPatternIdentifiers.cs
- StringResourceManager.cs
- StorageMappingItemLoader.cs
- QueryServiceConfigHandle.cs
- HtmlDocument.cs
- EventProviderWriter.cs
- StreamGeometryContext.cs
- MetadataItemEmitter.cs
- RelationshipManager.cs
- NativeWindow.cs
- WindowsSecurityTokenAuthenticator.cs
- InvokeBinder.cs
- ReflectionUtil.cs
- WmfPlaceableFileHeader.cs
- LinkUtilities.cs
- PageCatalogPart.cs
- SQLChars.cs
- MemoryFailPoint.cs
- GeometryCombineModeValidation.cs
- UserInitiatedNavigationPermission.cs
- TokenBasedSet.cs
- SafeFileMappingHandle.cs
- SystemEvents.cs
- HwndHostAutomationPeer.cs
- WindowsRegion.cs
- PagedDataSource.cs
- XmlTypeAttribute.cs
- TextTreeTextBlock.cs
- HandleRef.cs
- SoapSchemaMember.cs
- ImportContext.cs
- Util.cs
- WsatProxy.cs
- LocalizationParserHooks.cs
- UnsafeNativeMethods.cs
- EncryptedHeaderXml.cs
- ReferencedCategoriesDocument.cs
- OracleCommand.cs
- ProjectionCamera.cs
- CryptoHelper.cs
- SystemEvents.cs
- HttpCookieCollection.cs
- FilteredDataSetHelper.cs
- DictionaryManager.cs
- XmlTypeMapping.cs
- ReadOnlyAttribute.cs
- RegexStringValidatorAttribute.cs
- CryptoApi.cs
- MarkupCompilePass1.cs
- BitmapCodecInfo.cs
- PeerCollaborationPermission.cs
- SystemWebSectionGroup.cs
- NetworkStream.cs
- InfoCard.cs
- SelectionRangeConverter.cs
- NetSectionGroup.cs
- BulletedListEventArgs.cs
- DbExpressionVisitor_TResultType.cs
- ResourceReferenceExpressionConverter.cs
- DockEditor.cs
- Table.cs
- ArgumentNullException.cs
- XPathScanner.cs
- GeneratedCodeAttribute.cs
- WebPartEditorOkVerb.cs
- EntityDataSourceDesigner.cs
- RuleSetDialog.Designer.cs