Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Please make sure nobody else is working on porting it already. We would like to avoid doing redundant work. We ask that you communicate clearly in this list in dev@lucenenet.apahce.org that you are going to work on some part of the project. A PMC member  will committer will then either approve or alert you someone else is working on that part already.

Use automated tools to do the basic porting work, and then start a manual clean-up process. For automatic conversion we are using http://www.tangiblesoftwaresolutions.com/Product_Details/Java_to_CSharp_Converter.html (we have licenses to give to committers) and it proved to work quite nicely, but I We also hear good things on Sharpen. Check this version out: https://github.com/imazen/sharpen. Pick the tool you are more comfortable with.

...

  • PascalCase and not camelCase for method names
  • Properties instead of Getters / Setters of fields
  • etc.
  • Coding Guidelines

For reference have a look at Lucene.Net.Core, while not perfect it is starting to shape up the way we want it.


In general, prefer .NETified code over code resembling Java. Enumerators over Iterators, yields when possible, Linq, BCL data structures and so on. We are targeting .NET 4.5.1, use this fact. Sometimes you will have to resort to Java-like code to ensure compatibility; it's ok. We would rather ship fast and then iterate on improving later. Common Java to .NET type conversion


While porting tests, we don't care about all those conventions and .NETification. Porting tests should be reduced to a copy-paste procedure with minimal cleaning up procedure. We are working on tools and code helpers to help with that, see for examples see: https://github.com/apache/lucenenet/tree/master/src/Lucene.Net.TestFramework/JavaCompatibility (Java style methods to avoid many search-replace in porting tests), and a R# plugin that will help making some stuff auto-port when pasting https://resharper-plugins.jetbrains.com/packages/ReSharper.ExJava/ 

...