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
- Contracts.cs
- AuthenticationModulesSection.cs
- ConvertersCollection.cs
- ECDiffieHellman.cs
- ControlPropertyNameConverter.cs
- StringTraceRecord.cs
- DispatchProxy.cs
- GlobalEventManager.cs
- XmlSchemaType.cs
- XsltCompileContext.cs
- AttributeUsageAttribute.cs
- KnownTypeDataContractResolver.cs
- Attributes.cs
- _BaseOverlappedAsyncResult.cs
- MasterPageCodeDomTreeGenerator.cs
- FixedSOMImage.cs
- PixelShader.cs
- SpellerInterop.cs
- DataRelationPropertyDescriptor.cs
- RegexWorker.cs
- BitmapPalettes.cs
- ExceptionHelpers.cs
- AssemblyResourceLoader.cs
- XmlNamespaceManager.cs
- EmptyImpersonationContext.cs
- DeploymentExceptionMapper.cs
- ImageBrush.cs
- PlainXmlSerializer.cs
- Rotation3D.cs
- XmlSchemaComplexType.cs
- VirtualizedItemProviderWrapper.cs
- AutomationIdentifier.cs
- FunctionDetailsReader.cs
- AssemblyAttributesGoHere.cs
- KerberosSecurityTokenAuthenticator.cs
- ValidationEventArgs.cs
- TextSearch.cs
- DataGridViewComboBoxColumn.cs
- GridItemPattern.cs
- DbParameterHelper.cs
- XamlVector3DCollectionSerializer.cs
- NetworkCredential.cs
- ServiceOperationWrapper.cs
- XPathNodeList.cs
- DBCommand.cs
- AddIn.cs
- XmlEnumAttribute.cs
- PropertyNames.cs
- SmiConnection.cs
- PropertyKey.cs
- HelpProvider.cs
- CodeTypeParameter.cs
- VirtualDirectoryMappingCollection.cs
- ParseChildrenAsPropertiesAttribute.cs
- Tracking.cs
- VisualBrush.cs
- HttpListener.cs
- WebPartEventArgs.cs
- SafeThemeHandle.cs
- SrgsRuleRef.cs
- recordstatefactory.cs
- XmlNullResolver.cs
- FormsAuthenticationTicket.cs
- EntityUtil.cs
- pingexception.cs
- RedistVersionInfo.cs
- Permission.cs
- COM2Enum.cs
- FtpRequestCacheValidator.cs
- TrustManager.cs
- HashCodeCombiner.cs
- QilXmlWriter.cs
- ConfigurationSettings.cs
- WebPartUserCapability.cs
- SpecularMaterial.cs
- SessionEndedEventArgs.cs
- Command.cs
- UpdatePanelTriggerCollection.cs
- Visual.cs
- FilterQueryOptionExpression.cs
- File.cs
- NumericExpr.cs
- JoinSymbol.cs
- BinaryNode.cs
- XmlSchemaAppInfo.cs
- ObjectComplexPropertyMapping.cs
- BoundsDrawingContextWalker.cs
- XmlSchemaRedefine.cs
- DataRowExtensions.cs
- IgnoreFileBuildProvider.cs
- TextComposition.cs
- ComponentEditorForm.cs
- DispatchWrapper.cs
- BoundingRectTracker.cs
- QueryStringParameter.cs
- PagePropertiesChangingEventArgs.cs
- StatusBarDrawItemEvent.cs
- OleDbWrapper.cs
- Certificate.cs
- PropertyEntry.cs