Parsing C# Script into Java [closed] - c#

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm looking for a way to easily read in a C# file and place it into a Java Object for database storage (storing the class name, functions, variables, etc).
I'm making a Hierarchical State Machine AI Building Tool for a game I'm creating and need to be able to import an existing C# file and store it in a database for retrieval in the future.
Does anyone know of any preexisting libraries for parsing C# files? Something similar to JavaParser?
Thanks everyone!
EDIT: This needs to be part of my Java Project. I'll be loading in the C# files through my Java Application and saving it into my db4o database.

You could use Roslyn, but it would be a bit of work: http://msdn.microsoft.com/en-US/roslyn
Roslyn is only in Preview, by the way. Microsoft hasn't said when the actual release will be out.
This is a C# library. You will need to do the actual parsing with a C# program using Roslyn.

This page talks about an IL to Java byte code compiler called grasshopper, but it doesn't seem to be there anymore. Maybe you could have done that and use reflection after loading the compilates, not sure where that leaves the code itself, if you need that as well.

Related

Display formatted content to the user? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm developing a tester-application that will be used to test some of our products. The testing process involves displaying instructions to the tester (who might not be a professionally trained IT expert). These instructions involve formatting and can may also contain pictures. What would be a good way to display these?
I've thought about using a WebBrowser control and pointing it to static some HTML, but after having some issues with it (the webbrowser control is using a different version of the rendering engine then the locally installed IE is, etc...) I feel like this might not be the best option.
An argument for the use of HTML is that I could use one of many templating engines to easily create the instruction-content without hassling with too much formatting.
Do you have any advice on what to use here?
If winforms are not a strict requirement, you could try using XAML in a WPF application.
It should allow you to obtain all the layout you need, and you can also find some tools to convert to/from HTML (with some restrictions, of course).

RSync client in .Net [duplicate]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I need to have a file synchronizing feature in my .NET application. Can I make use of rsync? Is there any API available?
There is a C# implementation of RSync on github with some recent commits:
http://github.com/MatthewSteeples/rsync.net
DeltaCopy is just a wrapper around the rsync executable. However, librsync itself can be built on Windows as well as UNIX and GNU/Linux (see their README and this EE thread). Thus, that's another option to consider. You would still need some kind of unmanaged-managed interop.
You can use the source code that comes with DeltaCopy, which is a "'Windows Friendly' wrapper" to the original RSync.
The source is written in c++, so it's not exactly .Net, but you can write managed C++ wrappers and use them.
It's not a direct solution, I know, but it may be somewhat helpful. (in other words, HTH)
If you are looking for some simple automation you could just write a tiny wrapper that invokes RSync via System.Diagnostic.Process
I did read somewhere that someone circa 2006 created an rsync port in C#, but to be honest with you I would not consider using it cause its far from popular and impossible to find.

Converting from PDF to HTML [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
Is there a .dll I can use which uses a PDF file as an input and HTML file as an output?
I want to convert from PDF to HTML. My colleague says that it's very difficult going step by step, getting text/font/image/margins/links etc. from PDF and then creating new HTML file with the same content. He says it's nearly impossible. So I was thinking - if there's some dll which I can use as a reference to do that?
Writing a program to do it is definitely not trivial. If you don't find any .NET Library to do this (I couldn't, at least not free), I would just download this and invoke it programmatically to get my html.
If you have the time to spare and/or PDFToHtml does not produce acceptable output for you, you could use iText to write the program yourself. It's a very mature free pdf library. I've used it in the past to manipulate PDFs (merge, create, etc).
UPDATE
As noted in the comment by Quandary, the PDFSharp library offers a more relaxed license (MIT) compared to the Commercial or AGPL license offered by iText. Keep this is mind when choosing your library. I have not used the PDFSharp library myself and I don't know how they compare in terms of functionality.
You can download this free tool: PDFToHTML
Then in your program just fork a new process and run the executable passing the PDF file. I just tested it now and it seems to work ok.
If you don't mind paying, Aspose offers a very good solution, this is what we use at my company.
http://www.aspose.com/categories/.net-components/aspose.pdf-for-.net/key-features.aspx

free tool to generate class diagram or method table from a C# assembly or project? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Is there a free, easy and quick tool which can generate class diagrams or maybe even a simple table containing the list of class and methods inside an C# assembly or a project? Basically what I need is just the list of class and methods in a readable format. It would be better if it takes the xml documentation as well, but it's not required.
I guess it should be not too hard to implement using Reflection.
You could use Reflector with autodiagrammer addin.
The demo version is enough for that usage.
This addin generates a class diagram from an assembly :
Doxygen will do it by parsing C# source code but doesn't understand assemblies.
You can use the Architecture tools in Visual Studio 2010 Ultimate. This allows you to generate "Dependency Graph".
In readable way you can peek at your assembly by "Class View" which can be also found in Visual Studio.
Hope this helps

Is there any .NET API using rsync? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I need to have a file synchronizing feature in my .NET application. Can I make use of rsync? Is there any API available?
There is a C# implementation of RSync on github with some recent commits:
http://github.com/MatthewSteeples/rsync.net
DeltaCopy is just a wrapper around the rsync executable. However, librsync itself can be built on Windows as well as UNIX and GNU/Linux (see their README and this EE thread). Thus, that's another option to consider. You would still need some kind of unmanaged-managed interop.
You can use the source code that comes with DeltaCopy, which is a "'Windows Friendly' wrapper" to the original RSync.
The source is written in c++, so it's not exactly .Net, but you can write managed C++ wrappers and use them.
It's not a direct solution, I know, but it may be somewhat helpful. (in other words, HTH)
If you are looking for some simple automation you could just write a tiny wrapper that invokes RSync via System.Diagnostic.Process
I did read somewhere that someone circa 2006 created an rsync port in C#, but to be honest with you I would not consider using it cause its far from popular and impossible to find.

Categories