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
- PropertyReferenceSerializer.cs
- webeventbuffer.cs
- HtmlWindowCollection.cs
- TextTreeUndo.cs
- XamlInt32CollectionSerializer.cs
- TypeResolvingOptionsAttribute.cs
- DataGridViewCellValueEventArgs.cs
- AccessibleObject.cs
- ContainerParaClient.cs
- LineBreak.cs
- FormViewUpdateEventArgs.cs
- DesignTableCollection.cs
- XmlCDATASection.cs
- LogicalExpr.cs
- WindowsUpDown.cs
- HtmlInputFile.cs
- AnnotationService.cs
- SqlUDTStorage.cs
- TextServicesPropertyRanges.cs
- DiscoveryClientProtocol.cs
- XPathNodeHelper.cs
- XmlCharacterData.cs
- RuntimeConfig.cs
- SymbolPair.cs
- RegexInterpreter.cs
- MenuAutomationPeer.cs
- MenuBase.cs
- ContainerActivationHelper.cs
- StringUtil.cs
- ipaddressinformationcollection.cs
- StateRuntime.cs
- AspNetHostingPermission.cs
- TextRunTypographyProperties.cs
- SQLGuid.cs
- EventItfInfo.cs
- ServiceKnownTypeAttribute.cs
- IEnumerable.cs
- UnmanagedHandle.cs
- ResetableIterator.cs
- ContractNamespaceAttribute.cs
- ApplicationHost.cs
- StickyNoteHelper.cs
- ReceiveMessageAndVerifySecurityAsyncResultBase.cs
- EntityFunctions.cs
- SafeThreadHandle.cs
- HttpListenerTimeoutManager.cs
- Page.cs
- ConstructorBuilder.cs
- TripleDES.cs
- DrawItemEvent.cs
- ThicknessAnimationUsingKeyFrames.cs
- TextSearch.cs
- Thread.cs
- PersonalizableTypeEntry.cs
- DateTimeConverter.cs
- XPathException.cs
- DataGridViewLinkCell.cs
- GridSplitterAutomationPeer.cs
- VectorAnimationBase.cs
- xmlNames.cs
- NeutralResourcesLanguageAttribute.cs
- XmlDocumentSerializer.cs
- StylusPointProperty.cs
- FormatterConverter.cs
- GeneralTransform3DTo2D.cs
- IndexerNameAttribute.cs
- SafeFindHandle.cs
- EntityDataSourceViewSchema.cs
- SignatureToken.cs
- Rotation3DKeyFrameCollection.cs
- EntityContainerRelationshipSet.cs
- ExplicitDiscriminatorMap.cs
- TrustManager.cs
- HtmlTableCell.cs
- UpDownBase.cs
- CategoryNameCollection.cs
- CharConverter.cs
- ScriptModule.cs
- BamlTreeNode.cs
- _IPv4Address.cs
- TypeValidationEventArgs.cs
- NamespaceQuery.cs
- ToolStripPanelDesigner.cs
- ObjectNotFoundException.cs
- DataGridCaption.cs
- WebDescriptionAttribute.cs
- DataChangedEventManager.cs
- TriggerBase.cs
- QilStrConcat.cs
- DesignerAttributeInfo.cs
- BevelBitmapEffect.cs
- QilStrConcat.cs
- BrowserCapabilitiesFactoryBase.cs
- NativeWindow.cs
- StyleXamlParser.cs
- TextMarkerSource.cs
- CompositeDuplexBindingElementImporter.cs
- CompositeControl.cs
- IfAction.cs
- EmptyQuery.cs