Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Xml / System / Xml / XPath / Internal / Operator.cs / 1305376 / Operator.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace MS.Internal.Xml.XPath { using System; using System.Xml; using System.Xml.XPath; using System.Diagnostics; using System.Globalization; internal class Operator : AstNode { public enum Op { // order is alligned with XPathOperator INVALID, /*Logical */ OR, AND, /*Equality */ EQ, NE, /*Relational*/ LT, LE, GT, GE, /*Arithmetic*/ PLUS, MINUS, MUL, DIV, MOD, /*Union */ UNION, }; static Op[] invertOp = { /*INVALID*/ Op.INVALID, /*OR */ Op.INVALID, /*END */ Op.INVALID, /*EQ */ Op.EQ, /*NE */ Op.NE, /*LT */ Op.GT, /*LE */ Op.GE, /*GT */ Op.LT, /*GE */ Op.LE, }; static public Operator.Op InvertOperator(Operator.Op op) { Debug.Assert(Op.EQ <= op && op <= Op.GE); return invertOp[(int)op]; } private Op opType; private AstNode opnd1; private AstNode opnd2; public Operator(Op op, AstNode opnd1, AstNode opnd2) { this.opType = op; this.opnd1 = opnd1; this.opnd2 = opnd2; } public override AstType Type { get {return AstType.Operator;} } public override XPathResultType ReturnType { get { if (opType <= Op.GE) { return XPathResultType.Boolean; } if (opType <= Op.MOD) { return XPathResultType.Number; } return XPathResultType.NodeSet; } } public Op OperatorType { get { return opType; } } public AstNode Operand1 { get { return opnd1; } } public AstNode Operand2 { get { return opnd2; } } } } // 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
- TcpHostedTransportConfiguration.cs
- SqlCommandBuilder.cs
- MeasureItemEvent.cs
- SerialErrors.cs
- BamlResourceSerializer.cs
- InfoCardRSAPKCS1SignatureDeformatter.cs
- BitmapCodecInfoInternal.cs
- RadioButtonRenderer.cs
- BamlCollectionHolder.cs
- Splitter.cs
- AttachedAnnotation.cs
- WebPartMinimizeVerb.cs
- LineServices.cs
- PrefixQName.cs
- Vars.cs
- ColumnReorderedEventArgs.cs
- InputBindingCollection.cs
- loginstatus.cs
- XmlSchemaInfo.cs
- ProcessManager.cs
- StylusShape.cs
- StringResourceManager.cs
- ImmComposition.cs
- NavigationProgressEventArgs.cs
- HitTestWithGeometryDrawingContextWalker.cs
- InfoCardRSAOAEPKeyExchangeFormatter.cs
- AttributeUsageAttribute.cs
- TreeViewItemAutomationPeer.cs
- MemoryRecordBuffer.cs
- LinqDataSourceSelectEventArgs.cs
- PerformanceCounterManager.cs
- OutputCacheModule.cs
- TreeNode.cs
- FileDetails.cs
- QilDataSource.cs
- AssertUtility.cs
- DesignerWidgets.cs
- SystemUdpStatistics.cs
- GAC.cs
- EventEntry.cs
- CaseStatementProjectedSlot.cs
- CellIdBoolean.cs
- XmlTextAttribute.cs
- SQLBytes.cs
- FtpWebRequest.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- WindowsPen.cs
- DataSetMappper.cs
- Literal.cs
- XmlIlVisitor.cs
- UniqueID.cs
- PolyBezierSegment.cs
- WindowsTitleBar.cs
- SqlCommand.cs
- TemplateBindingExpressionConverter.cs
- Policy.cs
- TextStore.cs
- ResizeBehavior.cs
- DispatchWrapper.cs
- DataPagerFieldCollection.cs
- CodeDOMProvider.cs
- TypefaceMap.cs
- Point3DCollectionConverter.cs
- Library.cs
- SignHashRequest.cs
- CellParaClient.cs
- SystemIPGlobalStatistics.cs
- UnauthorizedWebPart.cs
- ClaimComparer.cs
- Material.cs
- BroadcastEventHelper.cs
- InsufficientExecutionStackException.cs
- LabelAutomationPeer.cs
- RoleManagerSection.cs
- ApplicationActivator.cs
- KeyPressEvent.cs
- GridViewDeleteEventArgs.cs
- Timeline.cs
- DecimalMinMaxAggregationOperator.cs
- UnmanagedMarshal.cs
- BookmarkEventArgs.cs
- PropertyDescriptorGridEntry.cs
- TrackingServices.cs
- Utils.cs
- ToolStripOverflowButton.cs
- Certificate.cs
- DrawingVisual.cs
- EtwTrace.cs
- DesignTimeTemplateParser.cs
- TemplateBindingExtensionConverter.cs
- OverflowException.cs
- CompositeKey.cs
- Activator.cs
- DataRowChangeEvent.cs
- TextBoxAutomationPeer.cs
- XamlWriter.cs
- StyleHelper.cs
- SafeUserTokenHandle.cs
- ClientConfigPaths.cs
- XmlnsDictionary.cs