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
- WebConvert.cs
- SplineQuaternionKeyFrame.cs
- DataGridViewTextBoxCell.cs
- ValidatedControlConverter.cs
- FontFamilyConverter.cs
- ConnectionProviderAttribute.cs
- SafeSecurityHelper.cs
- MimeMultiPart.cs
- XmlException.cs
- TypeBuilderInstantiation.cs
- AvtEvent.cs
- XmlBoundElement.cs
- ConditionalAttribute.cs
- CmsInterop.cs
- QilCloneVisitor.cs
- FtpRequestCacheValidator.cs
- XmlHierarchicalEnumerable.cs
- DataControlCommands.cs
- Marshal.cs
- ChangePassword.cs
- SymLanguageType.cs
- HGlobalSafeHandle.cs
- AbstractExpressions.cs
- RedirectionProxy.cs
- JsonReader.cs
- ResourceExpressionBuilder.cs
- DesignConnectionCollection.cs
- Permission.cs
- Stack.cs
- BuildManager.cs
- TrackingLocationCollection.cs
- XmlSchemaElement.cs
- Row.cs
- IPipelineRuntime.cs
- WindowShowOrOpenTracker.cs
- DragEventArgs.cs
- X509Logo.cs
- TraceHwndHost.cs
- ThreadSafeList.cs
- WebBrowserProgressChangedEventHandler.cs
- TreeViewImageIndexConverter.cs
- StrokeCollectionDefaultValueFactory.cs
- SoapWriter.cs
- StylusSystemGestureEventArgs.cs
- WebConfigurationHost.cs
- Grid.cs
- HwndTarget.cs
- KeyFrames.cs
- RowToParametersTransformer.cs
- dtdvalidator.cs
- PageThemeCodeDomTreeGenerator.cs
- CodeChecksumPragma.cs
- MatrixKeyFrameCollection.cs
- PixelFormat.cs
- ResourceExpression.cs
- ContentDesigner.cs
- ScrollBar.cs
- HandlerFactoryWrapper.cs
- SplitterEvent.cs
- ObjectCacheHost.cs
- BindingExpressionBase.cs
- VectorAnimation.cs
- UserNamePasswordValidationMode.cs
- Columns.cs
- AssociationTypeEmitter.cs
- MemberCollection.cs
- ConsumerConnectionPointCollection.cs
- AutoResetEvent.cs
- RangeBaseAutomationPeer.cs
- DataServiceHostFactory.cs
- NameValueConfigurationElement.cs
- GridViewUpdatedEventArgs.cs
- NonVisualControlAttribute.cs
- ComponentDesigner.cs
- TextCharacters.cs
- TemplateBuilder.cs
- FreezableOperations.cs
- EditorPart.cs
- LoadItemsEventArgs.cs
- IssuanceTokenProviderState.cs
- AnnotationResourceChangedEventArgs.cs
- Delay.cs
- DataGridBoolColumn.cs
- SessionEndingCancelEventArgs.cs
- Misc.cs
- JsonServiceDocumentSerializer.cs
- AutomationPattern.cs
- Transform3DCollection.cs
- TransformProviderWrapper.cs
- RegexEditorDialog.cs
- AuthStoreRoleProvider.cs
- RuleSettingsCollection.cs
- ArraySortHelper.cs
- TypeValidationEventArgs.cs
- HMAC.cs
- DodSequenceMerge.cs
- TableCell.cs
- ProvidersHelper.cs
- HtmlInputButton.cs
- SerializationStore.cs