31 |
// Nodes for detecting current scope of block-statements |
// Nodes for detecting current scope of block-statements |
32 |
internal abstract class XmlRpcNode |
internal abstract class XmlRpcNode |
33 |
{ |
{ |
34 |
protected string value; |
protected object value; |
35 |
protected string tag; |
protected string tag; |
36 |
protected XmlTextReader reader; |
protected XmlTextReader reader; |
37 |
protected XmlRpcNode parent; |
protected XmlRpcNode parent; |
38 |
|
|
39 |
public string Value |
public object Value |
40 |
{ |
{ |
41 |
get { |
get { |
42 |
return this.value; |
return this.value; |
49 |
public string Tag |
public string Tag |
50 |
{ |
{ |
51 |
get { |
get { |
52 |
return this.reader.Name; |
return this.tag; |
53 |
} |
} |
54 |
} |
} |
55 |
|
|
64 |
{ |
{ |
65 |
this.reader = _reader; |
this.reader = _reader; |
66 |
this.parent = _parent; |
this.parent = _parent; |
67 |
|
this.tag = _reader.Name; |
68 |
} |
} |
69 |
} |
} |
70 |
|
|
140 |
public IntegerNode( XmlTextReader _reader, XmlRpcNode _parent ) : base( _reader, _parent ) |
public IntegerNode( XmlTextReader _reader, XmlRpcNode _parent ) : base( _reader, _parent ) |
141 |
{ |
{ |
142 |
if( parent is ValueNode ) { |
if( parent is ValueNode ) { |
|
//Console.Out.WriteLine( "parent:" + parent); |
|
143 |
} |
} |
144 |
else { |
else { |
145 |
throw new XmlRpcInvalidStateException( "int|i4 has wrong parent node: " + parent.Tag, reader ); |
throw new XmlRpcInvalidStateException( "int|i4 has wrong parent node: " + parent.Tag, reader ); |
161 |
|
|
162 |
public bool GetBoolean() |
public bool GetBoolean() |
163 |
{ |
{ |
164 |
if (Value == "true") { |
if( (Value == "true") || (Value == "1") ) { |
165 |
return true; |
return true; |
166 |
} |
} |
167 |
return false; |
return false; |