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());
			}
		}
        public GeneralDocumentFuture(MashupParseContext context, string pathBase)
        {
            XMLTagReader xMLTagReader = context.NewTagReader(GetXMLTag());

            while (xMLTagReader.FindNextStartTag())
            {
                if (xMLTagReader.TagIs(FutureDocumentFromFilesystem.GetXMLTag()))
                {
                    if (documentFuture != null)
                    {
                        throw new InvalidMashupFile(context, "Too many specs in " + GetXMLTag());
                    }

                    documentFuture = new FutureDocumentFromFilesystem(context, pathBase);
                }
                else
                {
                    if (xMLTagReader.TagIs(FutureDocumentFromUri.GetXMLTag()))
                    {
                        if (documentFuture != null)
                        {
                            throw new InvalidMashupFile(context, "Too many specs in " + GetXMLTag());
                        }

                        documentFuture = new FutureDocumentFromUri(context);
                    }
                }
            }

            if (documentFuture == null)
            {
                throw new InvalidMashupFile(context, "No spec in " + GetXMLTag());
            }
        }
        public FutureDocumentFromUri(MashupParseContext context)
        {
            XMLTagReader xMLTagReader = context.NewTagReader(FutureDocumentFromUri.GetXMLTag());

            this.documentUri = new Uri(context.GetRequiredAttribute(FutureDocumentFromUri.FetchedDocumentUriAttr));
            this.pageNumber  = context.GetRequiredAttributeInt(FutureDocumentFromUri.FetchedDocumentPageNumberAttr);
            xMLTagReader.SkipAllSubTags();
        }
Example #4
0
        public StrongHash(MashupParseContext context)
        {
            XMLTagReader xMLTagReader = context.NewTagReader("StrongHash");

            this.hashValue = Convert.FromBase64String(context.GetRequiredAttribute("Value"));
            this.ComputeShortHashValue();
            xMLTagReader.SkipAllSubTags();
        }
		public FutureDocumentFromFilesystem(MashupParseContext context, string pathBase)
		{
			XMLTagReader xMLTagReader = context.NewTagReader(FutureDocumentFromFilesystem.GetXMLTag());
			string requiredAttribute = context.GetRequiredAttribute(FutureDocumentFromFilesystem.FilenameAttr);
			this.path = Path.Combine(pathBase, requiredAttribute);
			this.pageNumber = context.GetRequiredAttributeInt(FutureDocumentFromFilesystem.PageNumberAttr);
			xMLTagReader.SkipAllSubTags();
			this.ValidateFilename();
		}
        public FutureDocumentFromFilesystem(MashupParseContext context, string pathBase)
        {
            XMLTagReader xMLTagReader      = context.NewTagReader(FutureDocumentFromFilesystem.GetXMLTag());
            string       requiredAttribute = context.GetRequiredAttribute(FutureDocumentFromFilesystem.FilenameAttr);

            this.path       = Path.Combine(pathBase, requiredAttribute);
            this.pageNumber = context.GetRequiredAttributeInt(FutureDocumentFromFilesystem.PageNumberAttr);
            xMLTagReader.SkipAllSubTags();
            this.ValidateFilename();
        }
Example #7
0
 public InvalidLLZ(MashupParseContext context, string msg) : base(context, msg)
 {
 }
Example #8
0
		public EncodableHash(MashupParseContext ctx) : base(ctx)
		{
		}
		public FutureDocumentFromUri(MashupParseContext context)
		{
			XMLTagReader xMLTagReader = context.NewTagReader(FutureDocumentFromUri.GetXMLTag());
			this.documentUri = new Uri(context.GetRequiredAttribute(FutureDocumentFromUri.FetchedDocumentUriAttr));
			this.pageNumber = context.GetRequiredAttributeInt(FutureDocumentFromUri.FetchedDocumentPageNumberAttr);
			xMLTagReader.SkipAllSubTags();
		}
Example #10
0
		public StrongHash(MashupParseContext context)
		{
			XMLTagReader xMLTagReader = context.NewTagReader("StrongHash");
			this.hashValue = Convert.FromBase64String(context.GetRequiredAttribute("Value"));
			this.ComputeShortHashValue();
			xMLTagReader.SkipAllSubTags();
		}
Example #11
0
 public EncodableHash(MashupParseContext ctx) : base(ctx)
 {
 }