csharp_rpc 0.0.7 copy "csharp_rpc: ^0.0.7" to clipboard
csharp_rpc: ^0.0.7 copied to clipboard

Execute C# code from Dart (Flutter) application via JSON-RPC protocol.

example/README.md

import 'package:csharp_rpc/csharp_rpc.dart';

// create instance of CsharpRpc
var pathToCsharpExecutableFile = "<path_to_your_csharp_app>/CsharpApp.exe";

CsharpRpc csharpRpc = await CsharpRpc(pathToCsharpExecutableFile).start();

// invoke the C# method 'GetCurrentDateTime'
var currentDateTime = await csharpRpc.invoke(method: "GetCurrentDateTime");

// invoke the C# method 'SumNumbers' with array of parameters
var sum = await csharpRpc.invoke<int>(method: "SumNumbers", params: [2, 3]);

// invoke the C# method 'GetFilesInFolder' with typed request parameter
var filesResult = await csharpRpc.invoke(
   method: "GetFilesInFolder",
   param: GetFilesInFolderRequest(folderPath: Directory.current.path)
);
var files = FilesInFolderResponse.fromJson(filesResult);
12
likes
150
points
58
downloads
screenshot

Publisher

verified publisherkremer.software

Weekly Downloads

Execute C# code from Dart (Flutter) application via JSON-RPC protocol.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

uuid

More

Packages that depend on csharp_rpc