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
- EpmCustomContentSerializer.cs
- CheckBox.cs
- DrawingGroupDrawingContext.cs
- SettingsPropertyValue.cs
- ClusterSafeNativeMethods.cs
- ColumnCollection.cs
- DataObject.cs
- FramingChannels.cs
- FrameworkReadOnlyPropertyMetadata.cs
- TimeZoneNotFoundException.cs
- XmlValueConverter.cs
- ListView.cs
- ICspAsymmetricAlgorithm.cs
- FillRuleValidation.cs
- UIElement.cs
- Property.cs
- ProcessThread.cs
- PingReply.cs
- XAMLParseException.cs
- EmptyStringExpandableObjectConverter.cs
- TypeDefinition.cs
- GeometryHitTestResult.cs
- SystemNetworkInterface.cs
- DataGridViewCellPaintingEventArgs.cs
- X509Utils.cs
- TextLineBreak.cs
- ProxyGenerationError.cs
- SerializationObjectManager.cs
- CalendarDataBindingHandler.cs
- BookmarkScopeHandle.cs
- ConstraintManager.cs
- Int32Rect.cs
- PersistenceTypeAttribute.cs
- NotifyIcon.cs
- DataGridViewColumnStateChangedEventArgs.cs
- CryptoApi.cs
- ValidationHelper.cs
- HtmlTernaryTree.cs
- SqlDataSourceConnectionPanel.cs
- PropertyEmitter.cs
- SimpleHandlerFactory.cs
- QueryCacheEntry.cs
- PasswordBox.cs
- ZipFileInfo.cs
- LocatorManager.cs
- BamlResourceContent.cs
- WindowsTab.cs
- OpacityConverter.cs
- Operator.cs
- SinglePageViewer.cs
- CompareValidator.cs
- Base64Decoder.cs
- DataGridHeaderBorder.cs
- ChangeDirector.cs
- C14NUtil.cs
- MarkupWriter.cs
- XmlDataSourceView.cs
- TypeBuilder.cs
- GenericPrincipal.cs
- XPathAncestorQuery.cs
- WebBrowserSiteBase.cs
- XamlStream.cs
- DoubleCollectionValueSerializer.cs
- StylusPointProperty.cs
- AppDomainResourcePerfCounters.cs
- BaseParser.cs
- ITextView.cs
- COM2ExtendedTypeConverter.cs
- TraceFilter.cs
- SafeMarshalContext.cs
- UnsafeNativeMethods.cs
- PointLightBase.cs
- EventMappingSettings.cs
- ToRequest.cs
- AutomationPattern.cs
- WindowsSlider.cs
- File.cs
- ISFTagAndGuidCache.cs
- TemplateEditingService.cs
- SupportingTokenParameters.cs
- IndexedString.cs
- DataGridViewRowPrePaintEventArgs.cs
- FlowLayoutSettings.cs
- SeparatorAutomationPeer.cs
- ListBox.cs
- XmlDataFileEditor.cs
- UnsafeNativeMethods.cs
- TextProviderWrapper.cs
- QuaternionAnimation.cs
- TriggerActionCollection.cs
- SqlDataReaderSmi.cs
- IntegerValidatorAttribute.cs
- XmlAttributeCache.cs
- CompilerLocalReference.cs
- StateManagedCollection.cs
- DataRelationPropertyDescriptor.cs
- LinkUtilities.cs
- QilScopedVisitor.cs
- NGCSerializationManagerAsync.cs
- XmlUtil.cs