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
- CalendarBlackoutDatesCollection.cs
- SafeSecurityHandles.cs
- DataGridViewCellStyleEditor.cs
- Point.cs
- FormsAuthenticationTicket.cs
- XmlReader.cs
- MatrixAnimationBase.cs
- ServicePointManager.cs
- SkinBuilder.cs
- TextRangeEdit.cs
- ActivityStatusChangeEventArgs.cs
- MemberRelationshipService.cs
- GlyphRun.cs
- BoolLiteral.cs
- Properties.cs
- AncillaryOps.cs
- HostingEnvironmentException.cs
- SafeFileHandle.cs
- KoreanLunisolarCalendar.cs
- ACL.cs
- ExpressionBuilderCollection.cs
- filewebresponse.cs
- DropDownList.cs
- Highlights.cs
- BufferedGraphicsContext.cs
- PreservationFileWriter.cs
- configsystem.cs
- SmtpClient.cs
- Rect3DConverter.cs
- StatusBar.cs
- ScriptControlManager.cs
- DetailsViewModeEventArgs.cs
- ListControlDesigner.cs
- securitycriticaldata.cs
- DataGridDesigner.cs
- CellQuery.cs
- TaiwanLunisolarCalendar.cs
- PrimitiveType.cs
- NullableLongAverageAggregationOperator.cs
- CallbackCorrelationInitializer.cs
- XhtmlTextWriter.cs
- RawAppCommandInputReport.cs
- PropertyEmitterBase.cs
- AnimationClockResource.cs
- EmptyReadOnlyDictionaryInternal.cs
- IIS7UserPrincipal.cs
- CompilationSection.cs
- CompensatableTransactionScopeActivityDesigner.cs
- ArrayItemReference.cs
- CharUnicodeInfo.cs
- CharacterMetricsDictionary.cs
- Math.cs
- EndOfStreamException.cs
- OdbcError.cs
- sqlinternaltransaction.cs
- PrintingPermission.cs
- BitmapScalingModeValidation.cs
- QuotedStringWriteStateInfo.cs
- EncoderBestFitFallback.cs
- RowBinding.cs
- Normalization.cs
- SchemaConstraints.cs
- BitConverter.cs
- Context.cs
- FigureHelper.cs
- Event.cs
- IPGlobalProperties.cs
- XmlDocumentType.cs
- PerformanceCounterPermission.cs
- Win32PrintDialog.cs
- LocalizableAttribute.cs
- EventDescriptorCollection.cs
- WindowsIdentity.cs
- StreamAsIStream.cs
- _UncName.cs
- HtmlUtf8RawTextWriter.cs
- DataPagerFieldCommandEventArgs.cs
- DrawTreeNodeEventArgs.cs
- MachinePropertyVariants.cs
- ExpandedWrapper.cs
- KeyEvent.cs
- ExecutedRoutedEventArgs.cs
- DbConnectionClosed.cs
- XmlSchemaObjectCollection.cs
- AssemblyInfo.cs
- SrgsNameValueTag.cs
- WindowsToolbarAsMenu.cs
- LogWriteRestartAreaAsyncResult.cs
- UnsafeNativeMethods.cs
- HashCodeCombiner.cs
- RangeValueProviderWrapper.cs
- PostBackOptions.cs
- FloaterParagraph.cs
- DatePickerTextBox.cs
- TraceSection.cs
- UnsafeNativeMethods.cs
- XsdSchemaFileEditor.cs
- SqlIdentifier.cs
- userdatakeys.cs
- SettingsBindableAttribute.cs