Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- StrongNameKeyPair.cs
- Font.cs
- DataServiceSaveChangesEventArgs.cs
- PkcsMisc.cs
- XmlWriterSettings.cs
- CompositeKey.cs
- SafeNativeMethods.cs
- StringUtil.cs
- SharedUtils.cs
- TraceFilter.cs
- GradientStopCollection.cs
- WCFModelStrings.Designer.cs
- SpotLight.cs
- DirectoryNotFoundException.cs
- GridToolTip.cs
- MemberPath.cs
- IdentityReference.cs
- ValidationPropertyAttribute.cs
- DataSetUtil.cs
- BooleanToVisibilityConverter.cs
- PerformanceCounters.cs
- WizardStepBase.cs
- DBCSCodePageEncoding.cs
- DesignTimeTemplateParser.cs
- MailSettingsSection.cs
- BlurBitmapEffect.cs
- ComEventsMethod.cs
- Main.cs
- AppPool.cs
- RoleGroup.cs
- StringUtil.cs
- OletxDependentTransaction.cs
- ByteStreamMessageEncoder.cs
- PasswordBoxAutomationPeer.cs
- MailFileEditor.cs
- HorizontalAlignConverter.cs
- Page.cs
- MatrixAnimationUsingKeyFrames.cs
- baseaxisquery.cs
- HttpProcessUtility.cs
- LayoutManager.cs
- SqlClientFactory.cs
- ResourcesChangeInfo.cs
- PageAsyncTask.cs
- HebrewNumber.cs
- MenuEventArgs.cs
- SystemFonts.cs
- HostSecurityManager.cs
- String.cs
- SingleObjectCollection.cs
- NativeMethods.cs
- RegistryExceptionHelper.cs
- RequiredFieldValidator.cs
- InfoCardProofToken.cs
- NavigatingCancelEventArgs.cs
- MobileControlsSection.cs
- AQNBuilder.cs
- EmissiveMaterial.cs
- HttpCachePolicy.cs
- FixedSOMTextRun.cs
- Activation.cs
- EmptyStringExpandableObjectConverter.cs
- XmlSubtreeReader.cs
- ExpressionDumper.cs
- PersonalizationStateQuery.cs
- WebPartMenu.cs
- FrameworkReadOnlyPropertyMetadata.cs
- MailWriter.cs
- ZipIORawDataFileBlock.cs
- InvalidateEvent.cs
- OracleMonthSpan.cs
- OutputCacheSection.cs
- SplitterPanelDesigner.cs
- VideoDrawing.cs
- RestHandlerFactory.cs
- AppLevelCompilationSectionCache.cs
- KeyValueConfigurationCollection.cs
- EndpointAddressElementBase.cs
- Guid.cs
- SqlUserDefinedAggregateAttribute.cs
- SettingsPropertyValueCollection.cs
- Random.cs
- CustomErrorCollection.cs
- ChannelManager.cs
- XmlHelper.cs
- ScopeElementCollection.cs
- Highlights.cs
- CookielessHelper.cs
- FormsIdentity.cs
- DataGridViewRowHeaderCell.cs
- ToolStripDropDownButton.cs
- WindowVisualStateTracker.cs
- FacetDescription.cs
- PixelFormat.cs
- PropertyValueUIItem.cs
- ToolStripPanelSelectionGlyph.cs
- ValidateNames.cs
- NonParentingControl.cs
- DetailsViewInsertEventArgs.cs
- BindingExpressionUncommonField.cs