Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / Xml / System / Xml / XPath / Internal / Operator.cs / 1 / 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 {
LT,
GT,
LE,
GE,
EQ,
NE,
OR,
AND,
PLUS,
MINUS,
MUL,
MOD,
DIV,
UNION,
INVALID
};
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.PLUS) {
return XPathResultType.Boolean;
}
if (opType < Op.UNION) {
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.
//------------------------------------------------------------------------------
//
// 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 {
LT,
GT,
LE,
GE,
EQ,
NE,
OR,
AND,
PLUS,
MINUS,
MUL,
MOD,
DIV,
UNION,
INVALID
};
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.PLUS) {
return XPathResultType.Boolean;
}
if (opType < Op.UNION) {
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
- XPathDocumentBuilder.cs
- SqlErrorCollection.cs
- Model3DCollection.cs
- MobileSysDescriptionAttribute.cs
- PropertyPathConverter.cs
- SqlBulkCopy.cs
- StrongNameMembershipCondition.cs
- WindowsListViewGroupSubsetLink.cs
- OleCmdHelper.cs
- Mouse.cs
- ExceptionRoutedEventArgs.cs
- SafeHandle.cs
- WebPartMinimizeVerb.cs
- HashUtility.cs
- SchemaDeclBase.cs
- VariableQuery.cs
- TrackingWorkflowEventArgs.cs
- EdmConstants.cs
- LocalTransaction.cs
- Literal.cs
- ColorBlend.cs
- ResourcesChangeInfo.cs
- EpmAttributeNameBuilder.cs
- KeysConverter.cs
- BasicViewGenerator.cs
- ClientEventManager.cs
- NativeActivityMetadata.cs
- BaseServiceProvider.cs
- Trigger.cs
- ListViewInsertedEventArgs.cs
- CommandField.cs
- NamespaceEmitter.cs
- ScrollBarRenderer.cs
- HttpApplicationFactory.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- EncoderFallback.cs
- XmlStreamStore.cs
- DocumentationServerProtocol.cs
- AssociationType.cs
- DataBindEngine.cs
- UriScheme.cs
- connectionpool.cs
- BoundConstants.cs
- UnsafeNativeMethodsCLR.cs
- ObjectDataSourceStatusEventArgs.cs
- NumericUpDown.cs
- MenuItemCollection.cs
- DesignerCalendarAdapter.cs
- DesignTimeVisibleAttribute.cs
- AncillaryOps.cs
- Subset.cs
- HotSpot.cs
- UIElement3DAutomationPeer.cs
- DefaultClaimSet.cs
- ShaperBuffers.cs
- GeometryDrawing.cs
- AmbientProperties.cs
- XmlSchemaComplexContentRestriction.cs
- DataSourceXmlTextReader.cs
- _FtpDataStream.cs
- CqlParser.cs
- PrimitiveCodeDomSerializer.cs
- CompositionTarget.cs
- ServiceReflector.cs
- SmtpClient.cs
- DataControlButton.cs
- XmlDataSource.cs
- ActionNotSupportedException.cs
- SubpageParagraph.cs
- BitmapMetadata.cs
- RangeValueProviderWrapper.cs
- JapaneseCalendar.cs
- ByteArrayHelperWithString.cs
- ActivityCollectionMarkupSerializer.cs
- Model3DCollection.cs
- errorpatternmatcher.cs
- UrlParameterReader.cs
- BulletedListDesigner.cs
- SqlUtils.cs
- GlobalizationSection.cs
- LinqDataSourceHelper.cs
- ExceptionValidationRule.cs
- safelinkcollection.cs
- ButtonBase.cs
- OutputScope.cs
- figurelengthconverter.cs
- WindowsRichEdit.cs
- HScrollBar.cs
- SoapInteropTypes.cs
- Delay.cs
- OdbcParameterCollection.cs
- basevalidator.cs
- EntityDataSourceWrapperCollection.cs
- DependencyObjectPropertyDescriptor.cs
- xamlnodes.cs
- VersionedStream.cs
- ProfileService.cs
- __Error.cs
- ConfigurationValues.cs
- SequentialWorkflowHeaderFooter.cs