Esempio n. 1
0
        public GeneralDocumentFuture(MashupParseContext context, string pathBase)
        {
            XMLTagReader xMLTagReader = context.NewTagReader(GeneralDocumentFuture.GetXMLTag());

            while (xMLTagReader.FindNextStartTag())
            {
                if (xMLTagReader.TagIs(FutureDocumentFromFilesystem.GetXMLTag()))
                {
                    if (this._documentFuture != null)
                    {
                        throw new InvalidMashupFile(context, "Too many specs in " + GeneralDocumentFuture.GetXMLTag());
                    }
                    this._documentFuture = new FutureDocumentFromFilesystem(context, pathBase);
                }
                else
                {
                    if (xMLTagReader.TagIs(FutureDocumentFromUri.GetXMLTag()))
                    {
                        if (this._documentFuture != null)
                        {
                            throw new InvalidMashupFile(context, "Too many specs in " + GeneralDocumentFuture.GetXMLTag());
                        }
                        this._documentFuture = new FutureDocumentFromUri(context);
                    }
                }
            }
            if (this._documentFuture == null)
            {
                throw new InvalidMashupFile(context, "No spec in " + GeneralDocumentFuture.GetXMLTag());
            }
        }
Esempio n. 2
0
 public void WriteXML(MashupWriteContext context, string pathBase)
 {
     context.writer.WriteStartElement(GeneralDocumentFuture.GetXMLTag());
     this._documentFuture.WriteXML(context, pathBase);
     context.writer.WriteEndElement();
 }