Update reference documentation generation tools to get source highlighting [SPRNET-1045]

This commit is contained in:
bbaia
2008-10-05 17:25:10 +00:00
parent 26cb75d4e0
commit 5dfa039603
125 changed files with 4487 additions and 7338 deletions

View File

@@ -1,6 +1,24 @@
<chapter id="navigation">
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
* Copyright 2002-2008 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<chapter xml:id="navigation" xmlns="http://docbook.org/ns/docbook" version="5">
<title>Object Navigation</title>
<sect1 id="navigation-introduction">
<sect1 xml:id="navigation-introduction">
<title>Introduction</title>
<para><emphasis>(Available in 1.0)</emphasis></para>
<para>Spring provides an expression language that allows for the easy setting
@@ -19,11 +37,11 @@
contained in the <literal>Spring.Web</literal> library uses this expression language.
</para>
</sect1>
<sect1 id="navigation-simpleexprssions">
<sect1 xml:id="navigation-simpleexprssions">
<title>Simple Expressions</title>
<para>
Consider the simple class shown below with the
public field <literal>Name</literal><programlisting>
public field <literal>Name</literal><programlisting language="csharp">
public class Inventor
{
public string Name;
@@ -37,21 +55,21 @@ public class Inventor
}
</programlisting>
which may have been instantiated in code somewhere and had its Name
and DOB set to particular values<programlisting>Inventor inventor = new Inventor();
and DOB set to particular values<programlisting language="csharp">Inventor inventor = new Inventor();
inventor.Name = "Nikola Tesla";
inventor.DOB = new DateTime(1854, 10, 9);
</programlisting>
The <classname>ObjectNavigator</classname> is the central
The <literal>ObjectNavigator</literal> is the central
class used to set or retrieve the value of an object, and contains
the following static methods
<programlisting>
<programlisting language="csharp">
object GetValue(object root, string expression)
object GetValue(object root, NavigationExpression expression)
void SetValue(object root, string expression, object newValue)
void SetValue(object root, NavigationExpression expression, object newValue)
</programlisting>
To retrieve the name and year of birth we can use the following code<programlisting>
To retrieve the name and year of birth we can use the following code<programlisting language="csharp">
string name = (string) ObjectNavigator.GetValue(inventor, "Name");
int year = (int) ObjectNavigator.GetValue(inventor, "DOB.Year");
</programlisting>
@@ -61,13 +79,13 @@ int year = (int) ObjectNavigator.GetValue(inventor, "DOB.Year");
evaluate a complex expression frequently, creating a
<literal>NavigationExpression</literal>
and reusing it will increase performance. To set the property values of this
object instance to that of another famous inventor we would write<programlisting>
object instance to that of another famous inventor we would write<programlisting language="csharp">
ObjectNavigator.SetValue(inventor, "Name", "Michael Pupin");
ObjectNavigator.SetValue(inventor, "DOB", new DateTime(1854, 10, 9));
</programlisting>
</para>
</sect1>
<sect1 id="navigation-collections">
<sect1 xml:id="navigation-collections">
<title>Navigating Collections</title>
<para>TODO. TestCase shows some example usage. Please check the Spring.NET <ulink url="http://www.springframework.net/doc/reference/navigation.html">website</ulink> for the latest updates to this document.
</para>