incubator-etch-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dix...@apache.org
Subject svn commit: r718128 [1/6] - in /incubator/etch/branches/etch-python: ./ binding-csharp/compiler/src/main/java/etch/bindings/csharp/compiler/ binding-csharp/compiler/src/main/resources/etch/bindings/csharp/compiler/ binding-csharp/runtime/ binding-cshar...
Date Sun, 16 Nov 2008 22:35:38 GMT
Author: dixson
Date: Sun Nov 16 14:35:35 2008
New Revision: 718128

URL: http://svn.apache.org/viewvc?rev=718128&view=rev
Log:
synchronizing with trunk

Added:
    incubator/etch/branches/etch-python/ChangeLog.txt
      - copied unchanged from r718069, incubator/etch/trunk/ChangeLog.txt
    incubator/etch/branches/etch-python/DIST_README.txt
      - copied unchanged from r718069, incubator/etch/trunk/DIST_README.txt
    incubator/etch/branches/etch-python/compiler/src/main/java/etch/compiler/AbstractLogHandler.java
      - copied unchanged from r718069, incubator/etch/trunk/compiler/src/main/java/etch/compiler/AbstractLogHandler.java
    incubator/etch/branches/etch-python/compiler/src/main/java/etch/compiler/ConsoleLogHandler.java
      - copied unchanged from r718069, incubator/etch/trunk/compiler/src/main/java/etch/compiler/ConsoleLogHandler.java
    incubator/etch/branches/etch-python/compiler/src/main/java/etch/compiler/FileOutput.java
      - copied unchanged from r718069, incubator/etch/trunk/compiler/src/main/java/etch/compiler/FileOutput.java
    incubator/etch/branches/etch-python/compiler/src/main/java/etch/compiler/ListLogHandler.java
      - copied unchanged from r718069, incubator/etch/trunk/compiler/src/main/java/etch/compiler/ListLogHandler.java
    incubator/etch/branches/etch-python/compiler/src/main/java/etch/compiler/NullCompiler.java
      - copied unchanged from r718069, incubator/etch/trunk/compiler/src/main/java/etch/compiler/NullCompiler.java
    incubator/etch/branches/etch-python/compiler/src/main/java/etch/compiler/NullOutput.java
      - copied unchanged from r718069, incubator/etch/trunk/compiler/src/main/java/etch/compiler/NullOutput.java
    incubator/etch/branches/etch-python/compiler/src/main/java/etch/compiler/Output.java
      - copied unchanged from r718069, incubator/etch/trunk/compiler/src/main/java/etch/compiler/Output.java
    incubator/etch/branches/etch-python/compiler/src/test/java/etch/compiler/TestEtchMain.java
      - copied unchanged from r718069, incubator/etch/trunk/compiler/src/test/java/etch/compiler/TestEtchMain.java
    incubator/etch/branches/etch-python/compiler/src/test/resources/etch/compiler/test.etch
      - copied unchanged from r718069, incubator/etch/trunk/compiler/src/test/resources/etch/compiler/test.etch
    incubator/etch/branches/etch-python/compiler/src/test/resources/etch/compiler/test.txt
      - copied unchanged from r718069, incubator/etch/trunk/compiler/src/test/resources/etch/compiler/test.txt
    incubator/etch/branches/etch-python/examples/chat/dist-README.txt
      - copied unchanged from r718069, incubator/etch/trunk/examples/chat/dist-README.txt
    incubator/etch/branches/etch-python/examples/chat/dist-build.xml
      - copied unchanged from r718069, incubator/etch/trunk/examples/chat/dist-build.xml
    incubator/etch/branches/etch-python/installers/etch-maven-install.bat
      - copied unchanged from r718069, incubator/etch/trunk/installers/etch-maven-install.bat
    incubator/etch/branches/etch-python/plugins/ant/src/main/resources/
      - copied from r718069, incubator/etch/trunk/plugins/ant/src/main/resources/
    incubator/etch/branches/etch-python/plugins/ant/src/main/resources/etch/
      - copied from r718069, incubator/etch/trunk/plugins/ant/src/main/resources/etch/
    incubator/etch/branches/etch-python/plugins/ant/src/main/resources/etch/tools/
      - copied from r718069, incubator/etch/trunk/plugins/ant/src/main/resources/etch/tools/
    incubator/etch/branches/etch-python/plugins/ant/src/main/resources/etch/tools/ant/
      - copied from r718069, incubator/etch/trunk/plugins/ant/src/main/resources/etch/tools/ant/
    incubator/etch/branches/etch-python/plugins/ant/src/main/resources/etch/tools/ant/etch.xml
      - copied unchanged from r718069, incubator/etch/trunk/plugins/ant/src/main/resources/etch/tools/ant/etch.xml
    incubator/etch/branches/etch-python/util/src/test/java/etch/util/TestUrl1.java
      - copied unchanged from r718069, incubator/etch/trunk/util/src/test/java/etch/util/TestUrl1.java
Removed:
    incubator/etch/branches/etch-python/compiler/src/main/java/etch/compiler/CompilerLogHandler.java
    incubator/etch/branches/etch-python/compiler/src/test/java/etch/compiler/TestEtch.java
    incubator/etch/branches/etch-python/util/src/test/java/etch/util/testURL.java
Modified:
    incubator/etch/branches/etch-python/   (props changed)
    incubator/etch/branches/etch-python/.classpath
    incubator/etch/branches/etch-python/Bamboo.bat
    incubator/etch/branches/etch-python/ECLIPSE_USERS_README.txt
    incubator/etch/branches/etch-python/README.txt
    incubator/etch/branches/etch-python/binding-csharp/compiler/src/main/java/etch/bindings/csharp/compiler/Compiler.java
    incubator/etch/branches/etch-python/binding-csharp/compiler/src/main/resources/etch/bindings/csharp/compiler/vf.vm
    incubator/etch/branches/etch-python/binding-csharp/runtime/build.xml
    incubator/etch/branches/etch-python/binding-csharp/runtime/src/main/csharp/Etch/Msg/Validator.cs
    incubator/etch/branches/etch-python/binding-csharp/runtime/src/main/csharp/Etch/Transport/Filter/KeepAlive.cs
    incubator/etch/branches/etch-python/binding-csharp/runtime/src/main/csharp/Etch/Transport/Fmt/Binary/BinaryTaggedDataInput.cs
    incubator/etch/branches/etch-python/binding-csharp/runtime/src/main/csharp/Etch/Transport/Fmt/Binary/BinaryTaggedDataOutput.cs
    incubator/etch/branches/etch-python/binding-csharp/runtime/src/main/csharp/Etch/Util/StringUtil.cs
    incubator/etch/branches/etch-python/binding-csharp/runtime/src/main/csharp/Etch/Util/TcpListener.cs
    incubator/etch/branches/etch-python/binding-csharp/runtime/src/main/csharp/Etch/Util/URL.cs
    incubator/etch/branches/etch-python/binding-csharp/runtime/src/test/csharp/Etch/Transport/Fmt/Binary/TestBinaryTaggedDataInOut.cs
    incubator/etch/branches/etch-python/binding-csharp/runtime/src/test/csharp/Etch/Util/TestURL.cs
    incubator/etch/branches/etch-python/binding-java/compiler/src/main/java/etch/bindings/java/compiler/Compiler.java
    incubator/etch/branches/etch-python/binding-java/compiler/src/main/resources/etch/bindings/java/compiler/remote.vm
    incubator/etch/branches/etch-python/binding-java/compiler/src/main/resources/etch/bindings/java/compiler/vf.vm
    incubator/etch/branches/etch-python/binding-java/runtime/src/main/java/etch/bindings/java/support/DefaultValueFactory.java
    incubator/etch/branches/etch-python/binding-java/runtime/src/main/java/etch/bindings/java/transport/fmt/binary/BinaryTaggedDataInput.java
    incubator/etch/branches/etch-python/binding-java/runtime/src/main/java/etch/bindings/java/transport/fmt/binary/BinaryTaggedDataOutput.java
    incubator/etch/branches/etch-python/binding-java/runtime/src/test/java/etch/bindings/java/transport/filters/TestKeepAlive.java
    incubator/etch/branches/etch-python/binding-java/runtime/src/test/java/etch/bindings/java/transport/fmt/binary/TestBinaryTaggedDataInOut.java
    incubator/etch/branches/etch-python/binding-python/runtime/src/main/python/etch/binding/msg/AsyncMode.py
  (props changed)
    incubator/etch/branches/etch-python/binding-python/runtime/src/main/python/etch/binding/msg/ComboValidator.py
  (props changed)
    incubator/etch/branches/etch-python/binding-python/runtime/src/main/python/etch/binding/msg/FieldMap.py
  (props changed)
    incubator/etch/branches/etch-python/binding-python/runtime/src/main/python/etch/binding/msg/IdNameMap.py
  (props changed)
    incubator/etch/branches/etch-python/binding-python/runtime/src/main/python/etch/binding/msg/TypeMap.py
  (props changed)
    incubator/etch/branches/etch-python/binding-xml/compiler/src/main/java/etch/bindings/xml/compiler/Compiler.java
    incubator/etch/branches/etch-python/build-support/NUnitToJUnit.xsl
    incubator/etch/branches/etch-python/build-support/dependencies.xml
    incubator/etch/branches/etch-python/build-support/etch.common.xml
    incubator/etch/branches/etch-python/build.dependencies
    incubator/etch/branches/etch-python/compiler/build.xml
    incubator/etch/branches/etch-python/compiler/src/main/java/etch/compiler/Backend.java
    incubator/etch/branches/etch-python/compiler/src/main/java/etch/compiler/CmdLineOptions.java
    incubator/etch/branches/etch-python/compiler/src/main/java/etch/compiler/Etch2.java
    incubator/etch/branches/etch-python/compiler/src/main/java/etch/compiler/EtchCompiler.java
    incubator/etch/branches/etch-python/compiler/src/main/java/etch/compiler/EtchHelper.java
    incubator/etch/branches/etch-python/compiler/src/main/java/etch/compiler/EtchMain.java
    incubator/etch/branches/etch-python/compiler/src/main/java/etch/compiler/LogHandler.java
    incubator/etch/branches/etch-python/compiler/src/main/java/etch/compiler/ast/ReservedWordChecker.java
    incubator/etch/branches/etch-python/compiler/src/main/java/etch/compiler/ast/Service.java
    incubator/etch/branches/etch-python/compiler/src/main/scripts/etch.bat
    incubator/etch/branches/etch-python/compiler/src/test/java/etch/compiler/TestMapWords.java
    incubator/etch/branches/etch-python/examples/build.xml
    incubator/etch/branches/etch-python/examples/chat/README.txt
    incubator/etch/branches/etch-python/examples/chat/build.xml
    incubator/etch/branches/etch-python/examples/chat/src/test/csharp/ChatTestProj/ChatTestProj.csproj
    incubator/etch/branches/etch-python/examples/distmap/build.xml
    incubator/etch/branches/etch-python/examples/distmap/src/test/csharp/DistMapTestProj/DistMapTestProj.csproj
    incubator/etch/branches/etch-python/examples/example/build.xml
    incubator/etch/branches/etch-python/examples/example/src/main/java/etch/examples/example/MainExampleClient.java
    incubator/etch/branches/etch-python/examples/example/src/main/java/etch/examples/example/MainExampleListener.java
    incubator/etch/branches/etch-python/examples/example/src/test/csharp/ExampleTestProj/ExampleTestProj.csproj
    incubator/etch/branches/etch-python/examples/perf/build.xml
    incubator/etch/branches/etch-python/examples/perf/src/main/java/etch/examples/perf/MainPerfClient.java
    incubator/etch/branches/etch-python/examples/perf/src/test/csharp/PerfTestProj/PerfTestProj.csproj
    incubator/etch/branches/etch-python/installers/build.xml
    incubator/etch/branches/etch-python/plugins/ant/build.xml
    incubator/etch/branches/etch-python/plugins/ant/src/main/java/etch/tools/ant/EtchCompileTask.java
    incubator/etch/branches/etch-python/plugins/ant/src/test/java/etch/tools/ant/TestEtchCompileTask.java
    incubator/etch/branches/etch-python/tests/build.xml
    incubator/etch/branches/etch-python/tests/src/main/etch/Bar.etch
    incubator/etch/branches/etch-python/util/src/main/java/etch/util/URL.java
    incubator/etch/branches/etch-python/util/src/main/java/etch/util/cmd/CommandParser.java
    incubator/etch/branches/etch-python/util/src/main/java/etch/util/cmd/IntegerOption.java
    incubator/etch/branches/etch-python/util/src/main/java/etch/util/cmd/IntegerParameter.java
    incubator/etch/branches/etch-python/util/src/main/java/etch/util/cmd/Option.java
    incubator/etch/branches/etch-python/util/src/test/java/etch/util/TestCircularQueue.java

Propchange: incubator/etch/branches/etch-python/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Sun Nov 16 14:35:35 2008
@@ -0,0 +1,2 @@
+/incubator/etch/trunk:712746-718069
+incubator/etch/branches/sccomer-compiler-1:712739-712771

Modified: incubator/etch/branches/etch-python/.classpath
URL: http://svn.apache.org/viewvc/incubator/etch/branches/etch-python/.classpath?rev=718128&r1=718127&r2=718128&view=diff
==============================================================================
--- incubator/etch/branches/etch-python/.classpath (original)
+++ incubator/etch/branches/etch-python/.classpath Sun Nov 16 14:35:35 2008
@@ -8,6 +8,9 @@
 	<classpathentry kind="src" path="compiler/target/generated-sources/main/javacc/java"/>
 	<classpathentry kind="src" path="compiler/src/test/java"/>
 	<classpathentry kind="src" path="compiler/src/test/resources"/>
+	<classpathentry kind="src" path="plugins/ant/src/main/java"/>
+	<classpathentry kind="src" path="plugins/ant/src/main/resources"/>
+	<classpathentry kind="src" path="plugins/ant/src/test/java"/>
 	<classpathentry kind="src" path="binding-java/compiler/src/main/java"/>
 	<classpathentry kind="src" path="binding-java/compiler/src/main/resources"/>
 	<classpathentry kind="src" path="binding-java/runtime/src/main/java"/>

Modified: incubator/etch/branches/etch-python/Bamboo.bat
URL: http://svn.apache.org/viewvc/incubator/etch/branches/etch-python/Bamboo.bat?rev=718128&r1=718127&r2=718128&view=diff
==============================================================================
--- incubator/etch/branches/etch-python/Bamboo.bat (original)
+++ incubator/etch/branches/etch-python/Bamboo.bat Sun Nov 16 14:35:35 2008
@@ -4,6 +4,10 @@
 
 :: Run our env setup script
 call %TOOLS_DIR%\Environment.bat -qnc -p ETCH
+set ETCH_HOME=
+
+:: Hack to get DOTNET defined. Environment.bat should do it.
+set DOTNET_HOME=C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
 
 :: Call ant with the arguments that we pass in
 call ant %*

Modified: incubator/etch/branches/etch-python/ECLIPSE_USERS_README.txt
URL: http://svn.apache.org/viewvc/incubator/etch/branches/etch-python/ECLIPSE_USERS_README.txt?rev=718128&r1=718127&r2=718128&view=diff
==============================================================================
--- incubator/etch/branches/etch-python/ECLIPSE_USERS_README.txt (original)
+++ incubator/etch/branches/etch-python/ECLIPSE_USERS_README.txt Sun Nov 16 14:35:35 2008
@@ -1,8 +1,9 @@
 After you checkout the project in eclipse, you will likely be told that there are
-build path problems. There are two dependent projects you need to get going with
+build path problems. There are three dependent projects you need to get going with
 etch for eclipse, and one plugin:
 
 javacc 4.0
+ant 1.7.0
 junit 4.3.1
 velocity 1.5
 
@@ -18,10 +19,14 @@
 
 http://velocity.apache.org/engine/releases/velocity-1.5/
 
+http://archive.apache.org/dist/ant/binaries/
+
 Once downloaded, you will need to create an environment variable (for example):
 
 ETCH_DEPENDENT_JARS=C:\workspace-etch\tools\velocity\1.5\velocity-dep-1.5.jar
 
+These are the extra jar files required to actually run the compiler.
+
 You will need to restart eclipse if it is running.
 
 Once eclipse is started, you will need to right click on the etch project,
@@ -49,6 +54,8 @@
 
 Navigate to velocity-dep-1.5.jar and select it.
 
+Navigate to ant.jar and select it.
+
 Click Ok.
 
 Click Finish.

Modified: incubator/etch/branches/etch-python/README.txt
URL: http://svn.apache.org/viewvc/incubator/etch/branches/etch-python/README.txt?rev=718128&r1=718127&r2=718128&view=diff
==============================================================================
--- incubator/etch/branches/etch-python/README.txt (original)
+++ incubator/etch/branches/etch-python/README.txt Sun Nov 16 14:35:35 2008
@@ -3,7 +3,6 @@
 
 This is the source tree for Etch. It is organized as follows:
 
-
    build.xml         - top-level ant build script
    build.dependecies - locations for jars this compile depends on
    etch.properties   - static build properties 
@@ -29,12 +28,17 @@
 Etch bindings
 -------------
 
-Each binding is factored into its own structure into the build tree. The intend is to provide
an easy pattern for potential binding authors to emulate. Essentially each binding has two
components:
+Each binding is factored into its own structure into the build tree. The intent
+is to provide an easy pattern for potential binding authors to emulate.
+Essentially each binding has two components:
 
    - compiler/
    - runtime/
    
-The 'compiler' is always implemented in Java and in coded to implement a backend interface
for the target of choice
-
-The 'runtime' is coded in the target language. The most useful language bindings implement
identical functionality as the Java and C# bindings. Non-languages bindings (like binding-xml)
may not have a runtime component at all.
+The 'compiler' is always implemented in Java and is coded to implement a
+backend interface for the target of choice.
 
+The 'runtime' is coded in the target language. The most useful language
+bindings implement identical functionality as the Java and C# bindings.
+Non-languages bindings (like binding-xml) may not have a runtime component
+at all.

Modified: incubator/etch/branches/etch-python/binding-csharp/compiler/src/main/java/etch/bindings/csharp/compiler/Compiler.java
URL: http://svn.apache.org/viewvc/incubator/etch/branches/etch-python/binding-csharp/compiler/src/main/java/etch/bindings/csharp/compiler/Compiler.java?rev=718128&r1=718127&r2=718128&view=diff
==============================================================================
--- incubator/etch/branches/etch-python/binding-csharp/compiler/src/main/java/etch/bindings/csharp/compiler/Compiler.java
(original)
+++ incubator/etch/branches/etch-python/binding-csharp/compiler/src/main/java/etch/bindings/csharp/compiler/Compiler.java
Sun Nov 16 14:35:35 2008
@@ -17,7 +17,6 @@
 
 package etch.bindings.csharp.compiler;
 
-import java.io.File;
 import java.io.IOException;
 import java.io.PrintWriter;
 import java.io.StringReader;
@@ -40,6 +39,7 @@
 import etch.compiler.CmdLineOptions;
 import etch.compiler.EtchGrammarConstants;
 import etch.compiler.LogHandler;
+import etch.compiler.Output;
 import etch.compiler.ParseException;
 import etch.compiler.Token;
 import etch.compiler.Version;
@@ -168,7 +168,7 @@
 				return;
 			
 			if (lh != null)
-				lh.logMessage( level == 2 ? LogHandler.LEVEL_WARNING : LogHandler.LEVEL_ERROR, null,
msg );
+				lh.report( level == 2 ? LogHandler.LEVEL_WARNING : LogHandler.LEVEL_ERROR, null, msg
);
 			else
 				System.out.printf( "Velocity msg (%d): %s\n", level, msg );
 		}
@@ -179,7 +179,7 @@
 				return;
 			
 			if (lh != null)
-				lh.logMessage( level == 2 ? LogHandler.LEVEL_WARNING : LogHandler.LEVEL_ERROR, null,
msg );
+				lh.report( level == 2 ? LogHandler.LEVEL_WARNING : LogHandler.LEVEL_ERROR, null, msg
);
 			else
 				System.out.printf( "Velocity msg (%d): %s: %s\n", level, msg, e );
 		}
@@ -224,15 +224,14 @@
 	}
 
 	@Override
-	public void generate( Module module, CmdLineOptions options, LogHandler _lh )
+	public void generate( Module module, CmdLineOptions options )
 		throws Exception
 	{
-		this.lh = _lh;
+		lh = options.lh;
 
-		boolean ignoreGlobal = options.ignoreGlobal;
-		boolean ignoreLocal = options.ignoreLocal;
-		String userWords = options.userWordsList;
-		File dir = options.outputDir;
+		boolean ignoreGlobal = options.ignoreGlobalWordsList;
+		boolean ignoreLocal = options.ignoreLocalWordsList;
+		String userWords = options.userWordsList != null ? options.userWordsList.getPath() : null;
 		Set<String> what = options.what;
 
 		// Load the reserved words lists if any have been provided.
@@ -245,58 +244,54 @@
 			mapWords( userWords, words );
 
 		// check for collisions with the reserved word list.
-		ReservedWordChecker checker = new ReservedWordChecker( words, false,_lh );
+		ReservedWordChecker checker = new ReservedWordChecker( words, false, lh );
 		module.treewalk( checker );
 		if (!checker.ok())
 		{
-			_lh.logMessage( LogHandler.LEVEL_ERROR, null, "Encountered errors during java generation.\n"
);
+			lh.report( LogHandler.LEVEL_ERROR, null, "Encountered errors during java generation."
);
 			return;
 		}
 
 		// ok, we're ready to generate code. make sure the
 		// output directories exist.
 
-		if (dir != null && module.name().name.length() > 0)
-		{
-			String path = !options.noFlattenPackages
-				? module.name().name
-				: module.name().name.replace( '.', '/' );
-			dir = new File( dir, path );
-		}
-		else
+		Output dir = options.output;
+		Output templateDir = options.templateOutput;
+		
+		String m = module.name().name;
+		if (m.length() > 0)
 		{
-			dir = new File( "." );
+			dir = dir.newPackage( m );
+			templateDir = templateDir.newPackage( m );
 		}
-
-		dir.mkdirs();
-
+		
 		// generate code for each service.
 
 		for (Service intf : module)
 		{
+			// TODO flush gIntf
 			gIntf = intf;
-			generate( intf, what, dir );
+			try
+			{
+				generate( intf, what, dir, templateDir );
+			}
+			finally
+			{
+				// TODO flush gIntf
+				gIntf = null;
+			}
 		}
-		gIntf = null;
 	}
 
+	// TODO flush gIntf
+	@Deprecated
 	private Service gIntf;
 
-	private void generate( final Service intf, Set<String> what, File dir )
-		throws Exception
+	private void generate( final Service intf, Set<String> what, Output dir,
+		Output templateDir ) throws Exception
 	{
 		what = populateWhat( what );
 
-		if (what == null)
-		{
-			// lh.logMessage( lh.LEVEL_ERROR, null,
-			// "User has selected invalid option\n" );
-			// return;
-			throw new Exception(
-				"User has selected invalid option. Valid Options are"
-					+ " all,both,server,client,impl,main,helper,none\n" );
-		}
-
 		if (what.isEmpty())
 		{
 			// lh.logMessage( lh.LEVEL_ERROR, null, "User has selected NONE\n" );
@@ -305,182 +300,187 @@
 
 		final MessageDirection msgDir = getMessageDirection( what );
 
-		// Generate the value factory file
-		doFile( dir, getVfName( intf ) + fnSuffix, true, true, new Gen()
+		if (what.contains( WHAT_INTF ))
 		{
-			public void run( PrintWriter pw ) throws Exception
-			{
-				generateVf( pw, intf );
-			}
-		}, lh );
-
-		// Generate the interface, remote, and stub files
-
-//		boolean hasBaseClass = intf.hasMessageDirection( MessageDirection.BOTH );
-
-		generateIntfRemoteStub( intf, dir, msgDir, MessageDirection.BOTH, false, true );
+			// Generate the value factory file.
+			
+			generateVf( intf, dir );
+	
+			// Generate the interface, remote, and stub files.
+	
+			generateIntfRemoteStub( intf, dir, msgDir, MessageDirection.BOTH, false );
+	
+			generateIntfRemoteStub( intf, dir, msgDir, MessageDirection.SERVER, true );
+	
+			generateIntfRemoteStub( intf, dir, msgDir, MessageDirection.CLIENT, true );
+	
+			// Generate helper file.
+	
+			generateHelper( intf, dir, msgDir );
+			
+			// Generate base file.
+			
+			generateBase( intf, dir, msgDir );
+	
+			// Generate readme file.
+			
+			generateReadme( intf, dir, msgDir );
+		}
 
-		generateIntfRemoteStub( intf, dir, msgDir, MessageDirection.SERVER, true, true );
+		// Generate main template file.
 
-		generateIntfRemoteStub( intf, dir, msgDir, MessageDirection.CLIENT, true, true );
+		if (what.contains( WHAT_MAIN ))
+			generateMain( intf, templateDir, msgDir );
 
-		boolean force = what.contains( WHAT_FORCE );
-		// System.out.println( "force = "+force );
+		// Generate impl template file.
 
-		// Always generate helper file.
+		if (what.contains( WHAT_IMPL ))
+			generateImpl( intf, templateDir, msgDir );
+	}
 
-		doFile( dir, getHelperName( intf ) + fnSuffix, true, true, new Gen()
+	private void generateReadme( final Service intf, Output dir,
+		final MessageDirection msgDir ) throws Exception
+	{
+		doFile( dir, "readme-etch-csharp-files.txt", lh, new Gen()
 		{
 			public void run( PrintWriter pw ) throws Exception
 			{
-				generateHelper( pw, intf, msgDir );
+				generateReadme( pw, intf, msgDir );
 			}
-		}, lh );
-		
-		// Always generate Base
-		
-		generateBase( intf, dir, msgDir, true );
-
-		// Always generate readme file.
+		} );
+	}
 
-		doFile( dir, "readme-etch-csharp-files.txt", true, true, new Gen()
+	private void generateVf( final Service intf, Output dir )
+		throws Exception
+	{
+		doFile( dir, getVfName( intf ) + fnSuffix, lh, new Gen()
 		{
 			public void run( PrintWriter pw ) throws Exception
 			{
-				generateReadme( pw, intf, msgDir );
+				generateVf( pw, intf );
 			}
-		}, lh );
-
-		// Generate main file.
-
-		if (what.contains( WHAT_MAIN ))
-			generateMain( intf, dir, msgDir, force );
-
-		// Generate base and impl files.
-
-		if (what.contains( WHAT_IMPL ))
-			generateImpl( intf, dir, msgDir, force );
+		} );
 	}
 
-	private void generateIntfRemoteStub( final Service intf, File dir,
-		final MessageDirection what, final MessageDirection mc,
-		final boolean hasBaseClass, boolean makeFile ) throws Exception
+	private void generateHelper( final Service intf, Output dir,
+		final MessageDirection msgDir ) throws Exception
 	{
-		// Generate interface file
-
-		doFile( dir, getIntfName( intf, mc ) + fnSuffix, makeFile, true,
-			new Gen()
+		doFile( dir, getHelperName( intf ) + fnSuffix, lh, new Gen()
+		{
+			public void run( PrintWriter pw ) throws Exception
 			{
-				public void run( PrintWriter pw ) throws Exception
-				{
-					generateIntf( pw, intf, mc, hasBaseClass );
-				}
-			}, lh );
-
-		// Generate remote file
-
-		if (mc == MessageDirection.BOTH || what == MessageDirection.BOTH
-			|| mc != what)
-			doFile( dir, getRemoteName( intf, mc ) + fnSuffix, makeFile, true,
-				new Gen()
-				{
-					public void run( PrintWriter pw ) throws Exception
-					{
-						generateRemote( pw, intf, mc, hasBaseClass );
-					}
-				}, lh );
-
-		// Generate stub file
-
-		if (mc == MessageDirection.BOTH || what == MessageDirection.BOTH
-			|| mc == what)
-			doFile( dir, getStubName( intf, mc ) + fnSuffix, makeFile, true,
-				new Gen()
-				{
-					public void run( PrintWriter pw ) throws Exception
-					{
-						generateStub( pw, intf, mc, hasBaseClass );
-					}
-				}, lh );
-
+				generateHelper( pw, intf, msgDir );
+			}
+		} );
 	}
 
-	private void generateMain( final Service intf, File dir,
-		MessageDirection msgDir, boolean force ) throws Exception
+	private void generateMain( final Service intf, Output dir,
+		MessageDirection msgDir ) throws Exception
 	{
 		if (msgDir == MessageDirection.BOTH
-			|| msgDir == MessageDirection.CLIENT)
-			doFile( dir, getMainName( intf, MessageDirection.CLIENT )
-				+ fnSuffix, true, force, new Gen()
+				|| msgDir == MessageDirection.CLIENT)
+			doFile( dir, getMainName( intf, MessageDirection.CLIENT ) + fnSuffix, lh, new Gen()
 			{
 				public void run( PrintWriter pw ) throws Exception
 				{
 					generateMain( pw, intf, MessageDirection.CLIENT, false );
 				}
-			}, lh );
+			} );
 
 		if (msgDir == MessageDirection.BOTH
-			|| msgDir == MessageDirection.SERVER)
-			doFile( dir, getMainName( intf, MessageDirection.SERVER )
-				+ fnSuffix, true, force, new Gen()
+				|| msgDir == MessageDirection.SERVER)
+			doFile( dir, getMainName( intf, MessageDirection.SERVER ) + fnSuffix, lh, new Gen()
 			{
 				public void run( PrintWriter pw ) throws Exception
 				{
 					generateMain( pw, intf, MessageDirection.SERVER, false );
 				}
-			}, lh );
+			} );
 	}
 
-	private void generateBase( final Service intf, File dir,
-		MessageDirection msgDir, boolean force ) throws Exception
+	private void generateBase( final Service intf, Output dir,
+		MessageDirection msgDir ) throws Exception
 	{
 		if (msgDir == MessageDirection.BOTH || msgDir == MessageDirection.CLIENT)
-			doFile( dir, getBaseName( intf, MessageDirection.CLIENT ) + fnSuffix, true, force,
-				new Gen()
+			doFile( dir, getBaseName( intf, MessageDirection.CLIENT ) + fnSuffix, lh, new Gen()
+			{
+				public void run( PrintWriter pw ) throws Exception
 				{
-					public void run( PrintWriter pw ) throws Exception
-					{
-						generateBase (pw, intf, MessageDirection.CLIENT, false );
-					}
-				}, lh
-			);
+					generateBase (pw, intf, MessageDirection.CLIENT, false );
+				}
+			} );
 
 		if (msgDir == MessageDirection.BOTH || msgDir == MessageDirection.SERVER)
-			doFile( dir, getBaseName( intf, MessageDirection.SERVER ) + fnSuffix, true, force,
-				new Gen()
+			doFile( dir, getBaseName( intf, MessageDirection.SERVER ) + fnSuffix, lh, new Gen()
+			{
+				public void run( PrintWriter pw ) throws Exception
 				{
-					public void run( PrintWriter pw ) throws Exception
-					{
-						generateBase (pw, intf, MessageDirection.SERVER, false );
-					}
-				}, lh
-			);
+					generateBase (pw, intf, MessageDirection.SERVER, false );
+				}
+			} );
 	}
 
-	private void generateImpl( final Service intf, File dir,
-		MessageDirection msgDir, boolean force ) throws Exception
+	private void generateImpl( final Service intf, Output dir,
+		MessageDirection msgDir ) throws Exception
 	{
 		if (msgDir == MessageDirection.BOTH
-			|| msgDir == MessageDirection.CLIENT)
-			doFile( dir, getImplName( intf, MessageDirection.CLIENT )
-				+ fnSuffix, true, force, new Gen()
+				|| msgDir == MessageDirection.CLIENT)
+			doFile( dir, getImplName( intf, MessageDirection.CLIENT ) + fnSuffix, lh, new Gen()
 			{
 				public void run( PrintWriter pw ) throws Exception
 				{
 					generateImpl( pw, intf, MessageDirection.CLIENT, false );
 				}
-			}, lh );
+			} );
 
 		if (msgDir == MessageDirection.BOTH
-			|| msgDir == MessageDirection.SERVER)
-			doFile( dir, getImplName( intf, MessageDirection.SERVER )
-				+ fnSuffix, true, force, new Gen()
+				|| msgDir == MessageDirection.SERVER)
+			doFile( dir, getImplName( intf, MessageDirection.SERVER ) + fnSuffix, lh, new Gen()
 			{
 				public void run( PrintWriter pw ) throws Exception
 				{
 					generateImpl( pw, intf, MessageDirection.SERVER, false );
 				}
-			}, lh );
+			} );
+	}
+
+	private void generateIntfRemoteStub( final Service intf, Output dir,
+		final MessageDirection what, final MessageDirection mc,
+		final boolean hasBaseClass ) throws Exception
+	{
+		// Generate interface file
+
+		doFile( dir, getIntfName( intf, mc ) + fnSuffix, lh, new Gen()
+		{
+			public void run( PrintWriter pw ) throws Exception
+			{
+				generateIntf( pw, intf, mc, hasBaseClass );
+			}
+		} );
+
+		// Generate remote file
+
+		if (mc == MessageDirection.BOTH || what == MessageDirection.BOTH
+				|| mc != what)
+			doFile( dir, getRemoteName( intf, mc ) + fnSuffix, lh, new Gen()
+			{
+				public void run( PrintWriter pw ) throws Exception
+				{
+					generateRemote( pw, intf, mc, hasBaseClass );
+				}
+			} );
+
+		// Generate stub file
+
+		if (mc == MessageDirection.BOTH || what == MessageDirection.BOTH
+				|| mc == what)
+			doFile( dir, getStubName( intf, mc ) + fnSuffix, lh, new Gen()
+			{
+				public void run( PrintWriter pw ) throws Exception
+				{
+					generateStub( pw, intf, mc, hasBaseClass );
+				}
+			} );
 	}
 
 	/**
@@ -589,7 +589,8 @@
 	 * @param mc
 	 * @throws Exception
 	 */
-	void generateHelper( PrintWriter pw, Service intf, MessageDirection mc ) throws Exception
+	void generateHelper( PrintWriter pw, Service intf, MessageDirection mc )
+		throws Exception
 	{
 		VelocityContext context = new VelocityContext();
 		context.put( "now", new Date() );
@@ -622,7 +623,7 @@
 	}
 
 	/**
-	 * Generate the example main program.
+	 * Generate the template main program.
 	 *
 	 * @param pw
 	 * @param intf
@@ -670,7 +671,7 @@
 		}
 
 	/**
-	 * Generate the example user implemention class which extends the base
+	 * Generate the template user implemention class which extends the base
 	 * implementation generated above. This class will only have the appropriate
 	 * constructor and reference to the appropriate remote, and a comment inviting
 	 * the user to override methods.
@@ -731,7 +732,7 @@
 	{
 		return intf.name() + "Helper";
 	}
-
+	
 	private String getBaseName( Service intf, MessageDirection mc )
 	{
 		return "Base" + getIntfName( intf, mc );
@@ -922,12 +923,14 @@
 			list = ts.getFormat();
 			n.checkFormatList( ts.lineno(), list );
 		}
-		else if (isExcept) {
+		else if (isExcept)
+		{
 			list = n.mkFormatList( true, ((Except)n).hasExtends() );
 			// Temp Fix :remove once Scott fixes the ParamList code
 			modifyFormatList(list,true);
 		}
-		else {
+		else
+		{
 			list = n.mkFormatList( false, ((Struct)n).hasExtends() );
 //			 Temp Fix :remove once Scott fixes the ParamList code
 			modifyFormatList(list,false);
@@ -1079,6 +1082,7 @@
 				String cn = b.className();
 				if (cn.endsWith( "?" ))
 					cn = cn.substring( 0, cn.length()-1 );
+				
 				return String.format( "Validator_custom.Get( typeof(%s), %d, %s )",
 					cn, type.dim(), b.allowSubclass() );
 			}
@@ -1095,8 +1099,6 @@
 				Assertion.check( n.isExtern() || n.isEnumx(),
 					"n.isExtern() || n.isEnumx(): "+n );
 
-
-
 			return "Validator_custom.Get( typeof ( "
 				+ n.efqname( this )  + " ), " + type.dim()
 				+ ", false )";
@@ -1116,7 +1118,6 @@
 		return "null";
 	}
 
-
 	/**
 	 * @param name
 	 * @return the appropriate name for a getter method.

Modified: incubator/etch/branches/etch-python/binding-csharp/compiler/src/main/resources/etch/bindings/csharp/compiler/vf.vm
URL: http://svn.apache.org/viewvc/incubator/etch/branches/etch-python/binding-csharp/compiler/src/main/resources/etch/bindings/csharp/compiler/vf.vm?rev=718128&r1=718127&r2=718128&view=diff
==============================================================================
--- incubator/etch/branches/etch-python/binding-csharp/compiler/src/main/resources/etch/bindings/csharp/compiler/vf.vm
(original)
+++ incubator/etch/branches/etch-python/binding-csharp/compiler/src/main/resources/etch/bindings/csharp/compiler/vf.vm
Sun Nov 16 14:35:35 2008
@@ -214,15 +214,20 @@
 					}, 
 					delegate( StructValue sv ) 
 					{
-						// there should only be a single key, so take the first one
+						// there should only be a single key, so take the first
+						// one. if there is no key, means they sent null or the
+						// key they sent was unknown.
 						Field key = null;
 						IEnumerator<Field> myEnum = sv.Keys.GetEnumerator();
 						if (myEnum.MoveNext())
 							key = myEnum.Current;
-				
+						else
+							return null;
+						
 #foreach ($p in $n.iterator())
 						if (key == $p.vname( $helper )) return ${tname}.$p.name();
 #end
+						
 						return null;
 					} 
 				)

Modified: incubator/etch/branches/etch-python/binding-csharp/runtime/build.xml
URL: http://svn.apache.org/viewvc/incubator/etch/branches/etch-python/binding-csharp/runtime/build.xml?rev=718128&r1=718127&r2=718128&view=diff
==============================================================================
--- incubator/etch/branches/etch-python/binding-csharp/runtime/build.xml (original)
+++ incubator/etch/branches/etch-python/binding-csharp/runtime/build.xml Sun Nov 16 14:35:35
2008
@@ -19,6 +19,7 @@
         <delete dir="${target}" failonerror="false" quiet="true" />
 
         <mkdir dir="${target}" />
+        <mkdir dir="${rawNUnitResults}" />
         <mkdir dir="${testResultsDirectory}" />
     </target>
 
@@ -26,9 +27,9 @@
     <target name="do-clean">
         <delete dir="${target}" />
         <delete dir="${src}/main/csharp/bin" />
-    <delete dir="${src}/main/csharp/obj" />
-    <delete dir="${src}/test/csharp/bin" />
-    <delete dir="${src}/test/csharp/obj" />
+        <delete dir="${src}/main/csharp/obj" />
+        <delete dir="${src}/test/csharp/bin" />
+        <delete dir="${src}/test/csharp/obj" />
     </target>
 
     <!-- BUILD TARGET -->
@@ -66,6 +67,7 @@
 
         <copy todir="${Etch.dist}/lib" >
             <fileset dir="${src}/main/csharp/bin/${Etch.build.target}">
+                <include name="*.pdb" />
                 <include name="*.dll" />
             </fileset>
         </copy>
@@ -86,7 +88,6 @@
     <target name="build-test-csharp" depends="build-test-with-mono,build-test-with-dotnet"
/>
 
     <target name="do-test" depends="build-test-csharp" if="USE.dotnet" >
-
         <mkdir dir="${rawNUnitResults}" />
 
         <nunit xmlout="${rawNUnitResults}/NUnitResults.xml">
@@ -95,7 +96,6 @@
 
         <xslt style="${Etch.buildSupportDirectory}/NUnitToJUnit.xsl"
                 in="${rawNUnitResults}/NUnitResults.xml" out="${testResultsDirectory}/TEST-NUnitResults.xml"
/>
-
     </target>
 
     <!-- POSTBUILD TARGET -->

Modified: incubator/etch/branches/etch-python/binding-csharp/runtime/src/main/csharp/Etch/Msg/Validator.cs
URL: http://svn.apache.org/viewvc/incubator/etch/branches/etch-python/binding-csharp/runtime/src/main/csharp/Etch/Msg/Validator.cs?rev=718128&r1=718127&r2=718128&view=diff
==============================================================================
--- incubator/etch/branches/etch-python/binding-csharp/runtime/src/main/csharp/Etch/Msg/Validator.cs
(original)
+++ incubator/etch/branches/etch-python/binding-csharp/runtime/src/main/csharp/Etch/Msg/Validator.cs
Sun Nov 16 14:35:35 2008
@@ -35,7 +35,7 @@
             /// <summary>
             /// Validation on put or output if validator defined.
             /// </summary>
-            MISSIN_OK,
+            MISSING_OK,
             /// <summary>
             /// Like MISSING_OK, but fail if no validator defined.
             /// </summary>

Modified: incubator/etch/branches/etch-python/binding-csharp/runtime/src/main/csharp/Etch/Transport/Filter/KeepAlive.cs
URL: http://svn.apache.org/viewvc/incubator/etch/branches/etch-python/binding-csharp/runtime/src/main/csharp/Etch/Transport/Filter/KeepAlive.cs?rev=718128&r1=718127&r2=718128&view=diff
==============================================================================
--- incubator/etch/branches/etch-python/binding-csharp/runtime/src/main/csharp/Etch/Transport/Filter/KeepAlive.cs
(original)
+++ incubator/etch/branches/etch-python/binding-csharp/runtime/src/main/csharp/Etch/Transport/Filter/KeepAlive.cs
Sun Nov 16 14:35:35 2008
@@ -34,11 +34,11 @@
             : base(transport, uri, resources)
         {
 
-            delay = uri.GetIntegerTerm(DELAY, 15).Value;
+            delay = uri.GetIntegerTerm(DELAY, 15);
             if (delay <= 0)
                 throw new ArgumentException("delay <= 0");
 
-            count = uri.GetIntegerTerm(COUNT, 4).Value;
+            count = uri.GetIntegerTerm(COUNT, 4);
             if (count <= 0)
                 throw new ArgumentException("count <= 0");
 

Modified: incubator/etch/branches/etch-python/binding-csharp/runtime/src/main/csharp/Etch/Transport/Fmt/Binary/BinaryTaggedDataInput.cs
URL: http://svn.apache.org/viewvc/incubator/etch/branches/etch-python/binding-csharp/runtime/src/main/csharp/Etch/Transport/Fmt/Binary/BinaryTaggedDataInput.cs?rev=718128&r1=718127&r2=718128&view=diff
==============================================================================
--- incubator/etch/branches/etch-python/binding-csharp/runtime/src/main/csharp/Etch/Transport/Fmt/Binary/BinaryTaggedDataInput.cs
(original)
+++ incubator/etch/branches/etch-python/binding-csharp/runtime/src/main/csharp/Etch/Transport/Fmt/Binary/BinaryTaggedDataInput.cs
Sun Nov 16 14:35:35 2008
@@ -46,9 +46,9 @@
         /////////////////////////////
 
 
-        public Message ReadMessage(FlexBuffer buf)
+        public Message ReadMessage(FlexBuffer buf1)
         {
-            this.buf = buf;
+            buf = buf1;
             
             // lengthBudget is how many array elements total are reasonable to
             // allocate while parsing this message. the largest value comes as each
@@ -70,7 +70,7 @@
             }
             finally
             {
-                this.buf = null;
+                buf = null;
                 lengthBudget = 0;
             }
         }
@@ -103,24 +103,30 @@
 
             while ( true )
             {
-                Object obj = ReadValue( intValidator, true );
-                if ( obj == NONE )
+                Field key = ReadField( t );
+                if (key == null)
                     break;
 
-                int id = ( int ) obj;
-                Field key = t.GetField( id );
-                if (key == null)
-                    key = new Field(id, id.ToString());
+                //Object obj = ReadValue( intValidator, true );
+                //if ( obj == NONE )
+                //    break;
+
+                //int id = ( int ) obj;
+                //Field key = t.GetField( id );
+                //if (key == null)
+                //    key = new Field(id, id.ToString());
 
                 Validator v = t.GetValidator( key );
-                if (v == null)
+                if (v != null)
                 {
-                    // read the value but ignore it.
-                    ReadValue(Validator_object.Get(0));
+                    sv.Add(key, ReadValue(v));
                 }
                 else
                 {
-                    sv.Add(key, ReadValue(v));
+                    // read the value but ignore it.
+                    Object obj = ReadValue(Validator_object.Get(0));
+                    if (false)
+                        sv.Add( key, obj );
                 }
             }
         }
@@ -144,7 +150,7 @@
 
         private Message StartMessage()
         {
-            sbyte version = ( sbyte ) buf.GetByte();
+            sbyte version = buf.GetByte();
 			
 			if (version != VERSION)
 				throw new IOException(
@@ -176,7 +182,7 @@
 
         private ArrayValue StartArray()
         {
-            sbyte type = ( sbyte ) buf.GetByte();
+            sbyte type = buf.GetByte();
 
             XType customStructType;
             if(type == TypeCode.CUSTOM || type == TypeCode.STRUCT)
@@ -202,12 +208,56 @@
 
         private XType ReadType()
         {
-            int id = ReadIntegerValue();
-            XType t = vf.GetType(id);
-            if (t == null)
-                t = new XType(id, id.ToString());
-            return t;
+            Object obj = ReadValue(intOrStrValidator, false);
+            if (obj is int)
+            {
+                int id = (int)obj;
+                XType type = vf.GetType(id);
+
+                if (type == null)
+                    type = new XType(id, id.ToString());
+
+                return type;
+            }
+
+            String name = (String)obj;
+            XType ntype = vf.GetType(name);
+
+            if (ntype == null)
+                ntype = new XType(name);
+
+            return ntype;
+        }
+
+        private Field ReadField( XType type )
+        {
+            Object obj = ReadValue(intOrStrValidator, true);
+
+            if (obj == NONE)
+                return null;
+
+            if (obj is int)
+            {
+                int id = (int)obj;
+                Field field = type.GetField(id);
+
+                if (field == null)
+                    field = new Field(id, id.ToString());
+
+                return field;
+            }
+
+            String name = (String)obj;
+            Field nfield = type.GetField(name);
+
+            if (nfield == null)
+                nfield = new Field(name);
+
+            return nfield;
         }
+        
+        private readonly Validator intOrStrValidator =
+		    new ComboValidator( Validator_int.Get( 0 ), Validator_string.Get( 0 ) );
 
         private int ReadLength()
         {
@@ -263,7 +313,7 @@
 
         private Object ReadValue( Validator v, Boolean noneOk )
         {
-            sbyte type = ( sbyte ) buf.GetByte();
+            sbyte type = buf.GetByte();
 
             switch ( type )
             {

Modified: incubator/etch/branches/etch-python/binding-csharp/runtime/src/main/csharp/Etch/Transport/Fmt/Binary/BinaryTaggedDataOutput.cs
URL: http://svn.apache.org/viewvc/incubator/etch/branches/etch-python/binding-csharp/runtime/src/main/csharp/Etch/Transport/Fmt/Binary/BinaryTaggedDataOutput.cs?rev=718128&r1=718127&r2=718128&view=diff
==============================================================================
--- incubator/etch/branches/etch-python/binding-csharp/runtime/src/main/csharp/Etch/Transport/Fmt/Binary/BinaryTaggedDataOutput.cs
(original)
+++ incubator/etch/branches/etch-python/binding-csharp/runtime/src/main/csharp/Etch/Transport/Fmt/Binary/BinaryTaggedDataOutput.cs
Sun Nov 16 14:35:35 2008
@@ -24,11 +24,18 @@
 namespace Etch.Transport.Fmt.Binary
 {
     /// <summary>
-    /// Description of TaggedDataOutputStream.
+    /// An implementation of TaggedDataOutput which uses a binary encoding.
     /// </summary>
     public sealed class BinaryTaggedDataOutput : BinaryTaggedData, TaggedDataOutput
     {
         /// <summary>
+        /// Name of uri parameter which controls whether we write ints or strings
+        /// for types and fields.
+        /// </summary>
+        public const String STRING_TYPE_AND_FIELD =
+		    "BinaryTaggedDataOutput.stringTypeAndField";
+
+        /// <summary>
         /// Constructs the BinaryTaggedDataOutput with a null buffer.
         /// </summary>
         /// <param name="vf">the value factory for the service.</param>
@@ -37,10 +44,14 @@
             : base(vf)
         {
             this.level = vf.GetLevel();
+            URL u = new URL(uri);
+            stringTypeAndField = u.GetBooleanTerm(STRING_TYPE_AND_FIELD, false);
         }
 
         private readonly Validator.Level level;
 
+        private readonly bool stringTypeAndField;
+
         //////////////////////////////
         // TaggedDataOutput methods //
         //////////////////////////////
@@ -84,7 +95,7 @@
             foreach (KeyValuePair<Field, Object> me in sv)
             {
                 Field f = me.Key;
-                WriteIntValue(f.Id);
+                WriteField(f);
                 WriteValue(t.GetValidator(f), me.Value);
             }
         }
@@ -171,7 +182,18 @@
 
         private void WriteType(XType type)
         {
-            WriteIntValue(type.Id);
+            if (stringTypeAndField)
+                WriteStringValue(type.Name);
+            else
+                WriteIntValue(type.Id);
+        }
+
+        private void WriteField(Field field)
+        {
+            if (stringTypeAndField)
+                WriteStringValue(field.Name);
+            else
+                WriteIntValue(field.Id);
         }
 
         /// <summary>
@@ -192,6 +214,13 @@
 
         private readonly Validator intValidator = Validator_int.Get(0);
 
+        private void WriteStringValue(String value)
+        {
+            WriteValue(stringValidator, value);
+        }
+
+        private readonly Validator stringValidator = Validator_string.Get(0);
+
         private void WriteNoneValue()
         {
             WriteValue(noneValidator, NONE);

Modified: incubator/etch/branches/etch-python/binding-csharp/runtime/src/main/csharp/Etch/Util/StringUtil.cs
URL: http://svn.apache.org/viewvc/incubator/etch/branches/etch-python/binding-csharp/runtime/src/main/csharp/Etch/Util/StringUtil.cs?rev=718128&r1=718127&r2=718128&view=diff
==============================================================================
--- incubator/etch/branches/etch-python/binding-csharp/runtime/src/main/csharp/Etch/Util/StringUtil.cs
(original)
+++ incubator/etch/branches/etch-python/binding-csharp/runtime/src/main/csharp/Etch/Util/StringUtil.cs
Sun Nov 16 14:35:35 2008
@@ -96,5 +96,23 @@
                 return c - 'a' + 10;
             throw new ArgumentException( "bad hex char "+c );
         }
+
+        public static bool Eq(string a, string b)
+        {
+            if (ReferenceEquals(a, b))
+                return true;
+            if (a == null || b == null)
+                return false;
+            return a.Equals(b);
+        }
+
+        public static bool EqIgnoreCase(string a, string b)
+        {
+            if (ReferenceEquals(a, b))
+                return true;
+            if (a == null || b == null)
+                return false;
+            return a.Equals(b, StringComparison.CurrentCultureIgnoreCase);
+        }
     }
 }

Modified: incubator/etch/branches/etch-python/binding-csharp/runtime/src/main/csharp/Etch/Util/TcpListener.cs
URL: http://svn.apache.org/viewvc/incubator/etch/branches/etch-python/binding-csharp/runtime/src/main/csharp/Etch/Util/TcpListener.cs?rev=718128&r1=718127&r2=718128&view=diff
==============================================================================
--- incubator/etch/branches/etch-python/binding-csharp/runtime/src/main/csharp/Etch/Util/TcpListener.cs
(original)
+++ incubator/etch/branches/etch-python/binding-csharp/runtime/src/main/csharp/Etch/Util/TcpListener.cs
Sun Nov 16 14:35:35 2008
@@ -62,7 +62,7 @@
 
 
         public TcpListener(URL uri, Resources resources)
-            : this((int)uri.GetIntegerTerm(BACKLOG, 0), TranslateHost(uri.Host), uri.Port,
0)
+            : this((int)uri.GetIntegerTerm(BACKLOG, 0), TranslateHost(uri.Host), uri.Port
!= null ? uri.Port.Value : 0, 0)
         {
             // nothing else.
         }



Mime
View raw message