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
- ThemeDirectoryCompiler.cs
- DnsPermission.cs
- ValueSerializerAttribute.cs
- GroupItem.cs
- SiteMapHierarchicalDataSourceView.cs
- SmiEventSink_Default.cs
- TextTreeFixupNode.cs
- StringWriter.cs
- CellQuery.cs
- SchemaImporter.cs
- MarkupWriter.cs
- XmlWhitespace.cs
- contentDescriptor.cs
- Tuple.cs
- HandlerWithFactory.cs
- DeploymentSection.cs
- ObjectAnimationBase.cs
- Site.cs
- RegexWriter.cs
- CodeConstructor.cs
- DecimalStorage.cs
- RouteItem.cs
- AddInEnvironment.cs
- TextDecorationLocationValidation.cs
- ReadOnlyDictionary.cs
- SR.cs
- WorkflowService.cs
- EncoderExceptionFallback.cs
- OpenTypeCommon.cs
- HttpWebRequestElement.cs
- WebPartCatalogAddVerb.cs
- InputQueue.cs
- RawStylusInputCustomData.cs
- WindowsPen.cs
- BindingContext.cs
- EdmType.cs
- InternalConfigHost.cs
- HandledMouseEvent.cs
- ToolStripGrip.cs
- SHA384.cs
- PartialCachingControl.cs
- AuthStoreRoleProvider.cs
- IdentityNotMappedException.cs
- XmlSecureResolver.cs
- ISAPIWorkerRequest.cs
- EntitySqlQueryCacheKey.cs
- SqlConnectionPoolProviderInfo.cs
- ToolStripDropDownClosingEventArgs.cs
- PagesChangedEventArgs.cs
- IndexerNameAttribute.cs
- ZoneLinkButton.cs
- COM2Properties.cs
- MatrixTransform3D.cs
- Assembly.cs
- RowVisual.cs
- TagPrefixCollection.cs
- DrawingAttributesDefaultValueFactory.cs
- ExpressionsCollectionEditor.cs
- LinkAreaEditor.cs
- SiteMapDataSourceView.cs
- EventArgs.cs
- AsyncOperation.cs
- ClientProxyGenerator.cs
- SqlParameter.cs
- AssociationTypeEmitter.cs
- OpenFileDialog.cs
- DNS.cs
- base64Transforms.cs
- DictionaryBase.cs
- RenderCapability.cs
- HTTP_SERVICE_CONFIG_URLACL_PARAM.cs
- GcHandle.cs
- DataPointer.cs
- DrawingImage.cs
- RowUpdatingEventArgs.cs
- OpacityConverter.cs
- BitmapSource.cs
- __Filters.cs
- CaseInsensitiveHashCodeProvider.cs
- XmlNodeReader.cs
- XmlAttributeHolder.cs
- OleDbRowUpdatingEvent.cs
- ParserExtension.cs
- MergeFailedEvent.cs
- ContentDisposition.cs
- UndoUnit.cs
- FormattedText.cs
- AuthenticationException.cs
- SmtpFailedRecipientsException.cs
- BinaryConverter.cs
- XPathAxisIterator.cs
- BindingManagerDataErrorEventArgs.cs
- MediaSystem.cs
- HostedHttpContext.cs
- WindowCollection.cs
- Menu.cs
- FileCodeGroup.cs
- WebBrowserBase.cs
- Message.cs
- FamilyTypeface.cs