Updates referencesource to .NET 4.7
[mono.git] / mcs / class / referencesource / System.Xml / System / Xml / XPath / Internal / Operand.cs
1 //------------------------------------------------------------------------------
2 // <copyright file="Operand.cs" company="Microsoft">
3 //     Copyright (c) Microsoft Corporation.  All rights reserved.
4 // </copyright>                                                                
5 // <owner current="true" primary="true">Microsoft</owner>
6 //------------------------------------------------------------------------------
7
8 namespace MS.Internal.Xml.XPath {
9     using System;
10     using System.Xml;
11     using System.Xml.XPath;
12     using System.Diagnostics;
13     using System.Globalization;
14
15     internal class Operand : AstNode {
16         private XPathResultType type;
17         private object val;
18
19         public Operand(string val) {
20             this.type = XPathResultType.String;
21             this.val = val;
22         }
23
24         public Operand(double val) {
25             this.type = XPathResultType.Number;
26             this.val = val;
27         }
28
29         public Operand(bool val) {
30             this.type = XPathResultType.Boolean;
31             this.val = val;
32         }
33
34         public override AstType         Type       { get { return AstType.ConstantOperand; } }
35         public override XPathResultType ReturnType { get { return type;                    } }
36
37         public object OperandValue { get { return val; } }
38     }
39 }