App.cs 657 B

123456789101112131415161718192021222324252627
  1. using System;
  2. using Bridge;
  3. using Bridge.Html5;
  4. namespace DataExchange.Tests
  5. {
  6. public class App
  7. {
  8. private const string InterfaceName = "BrApi0";
  9. static App()
  10. {
  11. if (Script.Undefined == (Window.Get(InterfaceName)))
  12. Window.Set(InterfaceName, new DummyDataExchangeApi());
  13. }
  14. public static void Main()
  15. {
  16. var dxs = new DataExchangeService(Window.Get<IDataExchangeApi>(InterfaceName));
  17. var svc = dxs.Create<IInterface1>("Svc1Name");
  18. svc.Op0(DateTime.Now);
  19. svc.Op1(new Op1Input());
  20. svc.Op2(true);
  21. }
  22. }
  23. }