Skip to content

Commit e83a225

Browse files
authored
Update README.md
1 parent ef3f3a7 commit e83a225

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

README.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,27 +35,24 @@ class Test
3535
- 3 Skip this if using Nuget package. Follow [this](https://learn.microsoft.com/en-us/dotnet/core/tutorials/library-with-visual-studio?pivots=dotnet-7-0#add-a-project-reference) to add reference to the project.
3636
- 4 In the Main method add:
3737
```csharp
38-
Assembly assembly = Assembly.GetExecutingAssembly();
39-
CSTOJS cstojs = new(assembly);
40-
await cstojs.GenerateAsync("FULL PATH TO CSHARP FILE YOU WHAT TO CONVERT");
38+
CSTOJS cstojs = new();
39+
await cstojs.GenerateOneAsync("FULL PATH TO CSHARP FILE YOU WHAT TO CONVERT");
4140
```
4241
- 5 Run program and file will be generated in output path(default is "Directory.GetCurrentDirectory()") with name "main.js"(default)
4342
- 6 See below for simple example "HelloWorld"
4443

4544
## Example "HelloWorld"
4645
Program.cs
4746
```csharp
48-
using System.Reflection;
4947
using CSharpToJavaScript;
5048
namespace ConsoleAppTest;
5149

5250
public class Program
5351
{
5452
public static async Task Main()
5553
{
56-
Assembly executingAssembly = Assembly.GetExecutingAssembly();
57-
CSTOJS cstojs = new(executingAssembly);
58-
await cstojs.GenerateAsync("C:\\GitReps\\ConsoleAppTest\\CSharp\\Test.cs");
54+
CSTOJS cstojs = new();
55+
await cstojs.GenerateOneAsync("C:\\GitReps\\ConsoleAppTest\\CSharp\\Test.cs");
5956

6057
Console.ReadKey();
6158
}
@@ -88,7 +85,7 @@ More examples [here](https://tilied.github.io/CSharpToJavaScript/articles/intro.
8885

8986
## Some Todos
9087
- [x] ~More comments in code, especially in [CSTOJSOptions](https://github.com/TiLied/CSharpToJavaScript/blob/master/CSharpToJavaScript/CSTOJSOptions.cs)~
91-
- [ ] Wiki???
88+
- [ ] Wiki?????
9289
- [x] ~Better and more examples~ [Here](https://tilied.github.io/CSharpToJavaScript/articles/intro.html). WIP!
9390
- [x] ~Figure out how to do docs for [api](https://github.com/TiLied/CSharpToJavaScript/tree/master/CSharpToJavaScript/APIs/JS)~ [Docs](https://tilied.github.io/CSharpToJavaScript/) WIP!
9491

0 commit comments

Comments
 (0)