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
- XmlSchemaRedefine.cs
- TimeStampChecker.cs
- DayRenderEvent.cs
- HtmlInputFile.cs
- SqlGatherConsumedAliases.cs
- LingerOption.cs
- StdValidatorsAndConverters.cs
- LifetimeServices.cs
- GZipDecoder.cs
- SchemaElementDecl.cs
- LinkedList.cs
- HttpPostedFile.cs
- StringUtil.cs
- AuthorizationContext.cs
- NullReferenceException.cs
- XmlSchemaValidationException.cs
- SemanticBasicElement.cs
- ThousandthOfEmRealPoints.cs
- PropertyTabAttribute.cs
- GridViewUpdatedEventArgs.cs
- SplineKeyFrames.cs
- XomlCompilerError.cs
- SystemUdpStatistics.cs
- OdbcStatementHandle.cs
- PrinterUnitConvert.cs
- EasingKeyFrames.cs
- SelectedGridItemChangedEvent.cs
- SqlSupersetValidator.cs
- PropertyEmitter.cs
- SqlDataSourceConfigureSortForm.cs
- SinglePageViewer.cs
- PartialList.cs
- SafePointer.cs
- ReadContentAsBinaryHelper.cs
- Point3DAnimationBase.cs
- DataKeyCollection.cs
- METAHEADER.cs
- MeshGeometry3D.cs
- TextContainerHelper.cs
- CompiledRegexRunnerFactory.cs
- XsdValidatingReader.cs
- PropertyInformation.cs
- RegionData.cs
- NameValueCollection.cs
- DataRelationPropertyDescriptor.cs
- TcpServerChannel.cs
- NativeMethods.cs
- XmlTextAttribute.cs
- DataServiceRequestOfT.cs
- QuaternionIndependentAnimationStorage.cs
- ItemChangedEventArgs.cs
- AttributeCollection.cs
- NamedElement.cs
- NumberFunctions.cs
- ValueTable.cs
- Int16Converter.cs
- StylusPointDescription.cs
- PropertyItem.cs
- AesManaged.cs
- GlyphTypeface.cs
- SimpleHandlerBuildProvider.cs
- Point3DIndependentAnimationStorage.cs
- IPGlobalProperties.cs
- RtfControls.cs
- UInt32.cs
- PrintDocument.cs
- ImageInfo.cs
- SoapSchemaImporter.cs
- StaticDataManager.cs
- PolyBezierSegmentFigureLogic.cs
- UnsafeNativeMethods.cs
- Environment.cs
- CacheEntry.cs
- SafeRightsManagementSessionHandle.cs
- XmlILModule.cs
- StatusBarPanelClickEvent.cs
- BrushValueSerializer.cs
- DataGridViewTopRowAccessibleObject.cs
- XamlDesignerSerializationManager.cs
- X509CertificateStore.cs
- EpmSyndicationContentSerializer.cs
- BoundField.cs
- SamlAssertion.cs
- SizeAnimationUsingKeyFrames.cs
- ConfigurationStrings.cs
- WriteLineDesigner.xaml.cs
- ItemChangedEventArgs.cs
- AssertHelper.cs
- ComponentCollection.cs
- BuildProvider.cs
- CodeSnippetStatement.cs
- CqlLexer.cs
- RelationshipEntry.cs
- EdgeProfileValidation.cs
- ValidateNames.cs
- UiaCoreApi.cs
- UrlAuthorizationModule.cs
- WebPartsSection.cs
- MemoryStream.cs
- MasterPageParser.cs