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
- PeerNeighborManager.cs
- SelectionItemPattern.cs
- XamlPointCollectionSerializer.cs
- assemblycache.cs
- PackWebResponse.cs
- WinInet.cs
- OleDbConnection.cs
- SQLDateTimeStorage.cs
- MetadataArtifactLoaderResource.cs
- ObjectItemCachedAssemblyLoader.cs
- InternalDispatchObject.cs
- httpserverutility.cs
- ArraySegment.cs
- StringExpressionSet.cs
- BitStream.cs
- COM2IPerPropertyBrowsingHandler.cs
- TTSEngineProxy.cs
- ExpressionCopier.cs
- Relationship.cs
- ZoneIdentityPermission.cs
- XmlDownloadManager.cs
- RealizationDrawingContextWalker.cs
- EncodingDataItem.cs
- StateInitialization.cs
- RouteUrlExpressionBuilder.cs
- MarshalDirectiveException.cs
- securitycriticaldataClass.cs
- OneOfScalarConst.cs
- TabControlEvent.cs
- formatter.cs
- XpsResourceDictionary.cs
- StorageMappingItemLoader.cs
- HebrewNumber.cs
- _Events.cs
- Delegate.cs
- DataGridColumnsPage.cs
- SEHException.cs
- PhysicalAddress.cs
- MasterPageBuildProvider.cs
- UInt16Converter.cs
- EventWaitHandle.cs
- NameTable.cs
- AsymmetricAlgorithm.cs
- MultiSelectRootGridEntry.cs
- EventSinkHelperWriter.cs
- MediaEntryAttribute.cs
- DataKeyPropertyAttribute.cs
- EventMappingSettings.cs
- DbParameterCollectionHelper.cs
- WindowsPrincipal.cs
- _LoggingObject.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- ActivityPreviewDesigner.cs
- MsmqProcessProtocolHandler.cs
- AvTraceDetails.cs
- RenderContext.cs
- PanelStyle.cs
- InternalControlCollection.cs
- Column.cs
- Filter.cs
- RawContentTypeMapper.cs
- ConfigXmlSignificantWhitespace.cs
- ProjectionRewriter.cs
- DecoderFallbackWithFailureFlag.cs
- ProfessionalColors.cs
- ReadOnlyState.cs
- MissingSatelliteAssemblyException.cs
- DataServiceRequest.cs
- ManagementOperationWatcher.cs
- ResourceSetExpression.cs
- WSDualHttpSecurityMode.cs
- Exceptions.cs
- Effect.cs
- DataGridPagerStyle.cs
- AddInAdapter.cs
- SimpleLine.cs
- DataGridPagingPage.cs
- SQLBinary.cs
- PerspectiveCamera.cs
- XmlStreamNodeWriter.cs
- EventProviderWriter.cs
- AttachedPropertyMethodSelector.cs
- DocumentReferenceCollection.cs
- ConfigurationCollectionAttribute.cs
- InfoCardConstants.cs
- __ConsoleStream.cs
- DependsOnAttribute.cs
- MetadataReference.cs
- TreeView.cs
- CompressedStack.cs
- MonthCalendarDesigner.cs
- ToolBarOverflowPanel.cs
- GradientStop.cs
- XmlReader.cs
- MaskedTextProvider.cs
- HttpGetProtocolReflector.cs
- ServiceModelReg.cs
- AssemblyAttributes.cs
- JsonObjectDataContract.cs
- PenThread.cs