Beispiel #1
0
		public void SelectAllNodes()
		{
			// Generate simple objects
			var objects = new List<SimpleObject>();
			int totalIterations = 100000;
			for( int i=0; i<totalIterations; i++ )
			{
				SimpleObject o = new SimpleObject();
				o.Attr2 = i.ToString();
				o.Elem1 = "Elem1" + i;
				o.Elem2 = "Elem2" + i;
				objects.Add( o );
			}

			// Create navigator
			var context = new ObjectXPathContext();
			context.NamespaceManager.AddNamespace( "sdf", Namespaces.SDF );
			XPathNavigator nav = context.CreateNavigator( objects );

			// Select nodes
			var nodes = nav.Select( "//* | //@*" );
			int j = 0;
			while( nodes.MoveNext() )
			{
				var val = nodes.Current.Value;
				j++;
			}

			Assert.AreEqual( totalIterations * 5 + 1, j );
		}
Beispiel #2
0
		public CollectionOfSimple( bool init )
		{
			_dic = new ListDictionary();
			SimpleObject o;
			o = new SimpleObject( true );
			o.attr1 = 11;
			_dic.Add( "1", o );
			o = new SimpleObject( true );
			o.attr1 = 12;
			_dic.Add( "2", o );
			o = new SimpleObject( true );
			o.attr1 = 13;
			_dic.Add( "3", o );
		}
Beispiel #3
0
		public ObjListProperty( bool init )
		{
			Child = "child value";

			_list = new ArrayList();
			_list.Add( "string1" );
			SimpleObject o;
			o = new SimpleObject( true );
			o.attr1 = 11;
			_list.Add( o );
			o = new SimpleObject( true );
			o.attr1 = 12;
			_list.Add( o );
			_list.Add( new ObjChildrenNSInherit( true ) );
		}
Beispiel #4
0
		public void SerializeSimple()
		{
			SimpleObject o = new SimpleObject( true );
			SerializeAndCompare( o );
		}
		public ObjCustomProxyAtProperty( bool init )
		{
			a = "attribute";
			o = new SimpleObject( true );
		}
 public ObjTransparentAttribute(bool init)
 {
     Name      = "Joe";
     TheSimple = new SimpleObject(true);
 }
 public ObjCustomProxyAtProperty(bool init)
 {
     a = "attribute";
     o = new SimpleObject(true);
 }
		public ObjTransparentAttribute( bool init )
		{
			Name = "Joe";
			TheSimple = new SimpleObject( true );
		}