Skip to content

Commit dcf8e30

Browse files
author
Jett Jones
committed
Merge branch 'master' of github.com:anodejs/node-sharp
2 parents 6259f88 + d515164 commit dcf8e30

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

README.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,29 @@
22
This is a native nodejs extension which allows us to load dot-net assemblies, create objects and call methods on them.
33

44
## Based upon
5-
[saary's node dotnet](https://github.com/saary/node.net) and [v8sharp](http://v8sharp.codeplex.com/)
5+
[saary's node.net](https://github.com/saary/node.net) and [v8sharp](http://v8sharp.codeplex.com/)
66

77
## The interface
88
Instantiate the module, load a dll and create a class. Currently it searches the active directory of the node process for assemblies.
99

10-
'''javascript
10+
```javascript
1111
var sharp = require('./Sharp').Sharp();
1212
var stub = sharp.load('StubClass.dll');
1313
var oc = stub.new('StubClass.Output');
14-
'''
14+
```
1515

1616
Then the class exposes all methods for synchronous and asynchronous callbacks.
1717

18-
'''javascript
18+
```javascript
1919
var list = oc.call('ReturnList');
2020
// list = [17, 6, 81] // some random set of integers
21-
'''
21+
```
2222

23-
'''javascript
23+
```javascript
2424
oc.async('ReturnObject', function(err, data){
2525
console.dir(data);
2626
});
27-
'''
27+
```
2828

2929
There is also a .methods() call to return a list of callable method names.
3030

@@ -36,17 +36,19 @@ path. It is intended for prototyping, when you already have classes to do what
3636
as native modules apply - if your calls are long and async, then the costs of transforming the data are a smaller fraction.
3737

3838
## Things that work
39-
* Listing Dlls in the current directory
39+
* Listing dlls in the current directory
4040
* Loading managed assemblies (doesn't have to be .dll, loading Sharp.node has all the fun generated internals)
4141
* Call zero argument constructors
4242
* Calling methods where types can be converted
4343

4444
Speaking of - type conversion (mostly inherited from v8sharp)
45-
** string
46-
** int
47-
** date -> datetime
48-
** arrays -> typed arrays and lists
49-
** object -> dictionary of string and objects, and objects with public properties.
45+
46+
* string
47+
* int
48+
* date -> datetime
49+
* arrays -> typed arrays and lists
50+
* object -> dictionary of string and objects, and objects with public properties.
51+
* returned objects are returned
5052

5153
## What's next?
5254
From the previous list, there are many things which could be added to make the process a little more seamless.

0 commit comments

Comments
 (0)