Ejemplo n.º 1
0
 /// <summary>
 /// Parse from <paramref name="s"/>
 /// </summary>
 public object Parse(System.Xml.XmlReader s, DatatypeR2FormatterParseResult result)
 {
     // Shouldn't really be here, but call the 
     result.AddResultDetail(new NotImplementedResultDetail(ResultDetailType.Warning, "SXPR cannot be parsed by the R2 formatter directly, processing as QSET", s.ToString(), null));
     QSETFormatter formatter = new QSETFormatter();
     formatter.Host = this.Host;
     formatter.GenericArguments = this.GenericArguments;
     object retval = formatter.Parse(s, result);
     return retval;
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Parse from <paramref name="s"/>
        /// </summary>
        public object Parse(System.Xml.XmlReader s, DatatypeR2FormatterParseResult result)
        {
            // Shouldn't really be here, but call the
            result.AddResultDetail(new NotImplementedResultDetail(ResultDetailType.Warning, "SXPR cannot be parsed by the R2 formatter directly, processing as QSET", s.ToString(), null));
            QSETFormatter formatter = new QSETFormatter();

            formatter.Host             = this.Host;
            formatter.GenericArguments = this.GenericArguments;
            object retval = formatter.Parse(s, result);

            return(retval);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Parse an instance of GTS from <paramref name="s"/>
        /// </summary>
        public object Parse(System.Xml.XmlReader s, DatatypeR2FormatterParseResult result)
        {
            // Now determine the type of GTS
            string             typeName = s.GetAttribute("type", DatatypeR2Formatter.NS_XSI);
            IDatatypeFormatter formatter;

            object value = null;

            // Parse the type
            switch (typeName)
            {
            case "IVL_TS":
                formatter = new IVLFormatter();
                break;

            case "PIVL_TS":
                formatter = new PIVLFormatter();
                break;

            case "EIVL_TS":
                formatter = new EIVLFormatter();
                break;

            case "QSP_TS":
            case "QSS_TS":
            case "QSD_TS":
            case "QSU_TS":
            case "QSI_TS":
                formatter = new QSETFormatter();
                break;

            default:
                result.AddResultDetail(new ResultDetail(ResultDetailType.Error, String.Format("Cannot parse a GTS Hull of type '{0}'", typeName), s.ToString()));
                return(null);
            }

            // Graph the Hull
            // Fix: EV-876
            formatter.Host             = this.Host;
            formatter.GenericArguments = new Type[] { typeof(TS) };
            return(Util.Convert <GTS>(formatter.Parse(s, result)));
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Parse an instance of GTS from <paramref name="s"/>
        /// </summary>
        public object Parse(System.Xml.XmlReader s, DatatypeR2FormatterParseResult result)
        {
            // Now determine the type of GTS
            string typeName = s.GetAttribute("type", DatatypeR2Formatter.NS_XSI);
            IDatatypeFormatter formatter;

            object value = null;

            // Parse the type
            switch (typeName)
            {
                case "IVL_TS":
                    formatter = new IVLFormatter();
                    break;
                case "PIVL_TS":
                    formatter = new PIVLFormatter();
                    break;
                case "EIVL_TS":
                    formatter = new EIVLFormatter();
                    break;
                case "QSP_TS":
                case "QSS_TS":
                case "QSD_TS":
                case "QSU_TS":
                case "QSI_TS":
                    formatter = new QSETFormatter();
                    break;
                default:
                    result.AddResultDetail(new ResultDetail(ResultDetailType.Error, String.Format("Cannot parse a GTS Hull of type '{0}'", typeName), s.ToString()));
                    return null;
            }

            // Graph the Hull 
            // Fix: EV-876
            formatter.Host = this.Host;
            formatter.GenericArguments = new Type[] { typeof(TS) };
            return Util.Convert<GTS>(formatter.Parse(s, result));

        }