CookComputing.XmlRpc.XmlRpcSerializer.ParseString C# (CSharp) Method

ParseString() private method

private ParseString ( XmlNode node, Type ValueType, ParseStack parseStack, MappingAction mappingAction ) : Object
node System.Xml.XmlNode
ValueType System.Type
parseStack ParseStack
mappingAction MappingAction
return Object
        Object ParseString(
            XmlNode node,
            Type ValueType,
            ParseStack parseStack,
            MappingAction mappingAction)
        {
            if (ValueType != null && ValueType != typeof(System.String)
            && ValueType != typeof(Object))
              {
            throw new XmlRpcTypeMismatchException(parseStack.ParseType
              + " contains string value where "
              + XmlRpcServiceInfo.GetXmlRpcTypeString(ValueType)
              + " expected " + StackDump(parseStack));
              }
              string ret;
              parseStack.Push("string");
              try
              {
            if (node.FirstChild == null)
              ret = "";
            else
              ret = node.FirstChild.Value;
              }
              finally
              {
            parseStack.Pop();
              }
              return ret;
        }