Esempio n. 1
0
 private static NameTable GetNameTable(XmlContextBase parent)
 {
     return(parent.NameTable as NameTable ?? new NameTable());
 }
Esempio n. 2
0
 protected XmlContextBase(XmlContextBase parent)
     : base(GetNameTable(parent))
 {
     this.parent = parent;
 }
			public void SetUp()
			{
				OriginalXml = GetXmlText();
				Document    = Xml(OriginalXml);
				OriginalXml = Document.OuterXml;
				Namespaces  = new XmlContextBase();
				Node        = new SysXmlNode(Document.DocumentElement, typeof(object), Namespaces);
				Manager     = new XmlReferenceManager(Node, DefaultXmlReferenceFormat.Instance);
			}
Esempio n. 4
0
		private static NameTable GetNameTable(XmlContextBase parent)
		{
			return parent.NameTable as NameTable ?? new NameTable();
		}
Esempio n. 5
0
		protected XmlContextBase(XmlContextBase parent)
		    : base(GetNameTable(parent))
		{
			this.parent = parent;
		}
Esempio n. 6
0
#pragma warning restore 618
		public void OneTimeSetUp()
		{
			if (IncludedTypes == null)
			{
				IncludedTypes = new MockXmlIncludedTypeMap();
				IncludedTypes.DefaultClrType = TypeA.ClrType;
				IncludedTypes.InnerSet.Add(TypeA);
				IncludedTypes.InnerSet.Add(TypeB);
			}

			if (Context == null)
			{
				Context = new XmlContextBase();
				Context.AddNamespace("p", "ns");
				Context.AddVariable("test", "v", new MockXPathVariable("VariableValue"));
				Context.AddFunction("test", "f", new MockXPathFunction("FunctionValue"));
			}
		}