当前位置: 首页 > 软件库 > 开发工具 > 编译器 >

Bridge

授权协议 Apache-2.0 License
开发语言 JavaScript
所属分类 开发工具、 编译器
软件类型 开源软件
地区 不详
投 递 者 叶健柏
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Build statusNuGet StatusJoin the chat at https://gitter.im/bridgedotnet/Bridge

Bridge.NET is an open source C#-to-JavaScript Compiler. Write your application in C# and run on billions of devices.

Write in C#. Run in a Web Browser.

C# JavaScript
public class Program
{
    public static void Main()
    {
        var msg = "Hello, World!";
        Console.WriteLine(msg);
    }

}

Bridge.define("Demo.Program", {
    main: function Main () {
        var msg = "Hello, World!";
        System.Console.WriteLine(msg);
    }

});

Run the sample above at Deck.NET.

TL;DR

Getting Started

A great place to start if you're new to Bridge is reviewing the Getting Started wiki.

The easiest place to see Bridge in action is Deck.NET.

Video Tutorial

Sample

The following code sample demonstrates a simple App.cs class that will run automatically on page load and write a message to the Bridge Console.

Example (Deck)

public class Program
{
    public static void Main()
    {
        Console.WriteLine("Hello World!");
    }
}

The C# class above will be compiled into JavaScript and added to /Bridge/ouput/demo.js within your project. By default, Bridge will use the Namespace name as the file name. In this case: demo.js. There are many options to control the output of your JavaScript files, and the Attribute Reference is important documentation to review.

Bridge.define("Demo.Program", {
    main: function Main() {
        System.Console.WriteLine("Hello World!");
    }
});

Installation

A full list of installation options available at bridge.net/download/, including full support for Visual Studio and Visual Studio Community on Windows, and Visual Studio Mac.

Bridge for Visual Studio

If you're using Visual Studio for Windows, the easiest way to get started is by adding the Bridge.NET for Visual Studio extension.

From within Visual Studio, go to the Tools > Extensions and Updates....

Bridge for Visual Studio

From the options on the left side, be sure to select Online, then search for Bridge. Clicking Download will install Bridge for Visual Studio. After installation is complete, Visual Studio may require a restart.

Visual Studio Extensions and Updates

Once installation is complete you will have a new Bridge.NET project type. When creating new Bridge enabled projects, select this project type.

NuGet

Another option is installation of Bridge into a new C# Class Library project using NuGet. Within the NuGet Package Manager, search for Bridge and click to install.

Bridge can also be installed using the NuGet Command Line tool by running the following command:

Install-Package Bridge

More information regarding Nuget package installation for Bridge is available in the Documentation.

Contributing

Interested in contributing to Bridge? Please see CONTRIBUTING.md.

We also flag some Issues as up-for-grabs. These are generally easy introductions to the inner workings of Bridge, and are items we just haven't had time to implement. Your help is always appreciated.

Badges

Show your support by adding a built with Bridge.NET badge to your projects README or website.

Built with Bridge.NET

Markdown

[![Built with Bridge.NET](https://img.shields.io/badge/built%20with-Bridge.NET-blue.svg)](http://bridge.net/)

HTML

<a href="http://bridge.net/">
    <img src="https://img.shields.io/badge/built%20with-Bridge.NET-blue.svg" title="Built with Bridge.NET" />
</a>

How to Help

We need your help spreading the word about Bridge. Any of the following items will help:

  1. Star the Bridge project on GitHub
  2. Add a Badge
  3. Leave a review at Visual Studio Gallery
  4. Blog about Bridge.NET
  5. Tweet about @bridgedotnet
  6. Start a discussion on Reddit or Hacker News
  7. Answer Bridge related questions on StackOverflow
  8. Give a local usergroup presentation on Bridge
  9. Give a conference talk on Bridge
  10. Provide feedback (forums, GitHub or email)

Testing

Bridge is continually tested with the full test runner available at http://testing.bridge.net/.

Credits

Bridge is developed by the team at Object.NET. Frameworks and Tools for .NET Developers.

License

Apache License, Version 2.0

Please see LICENSE for details.

  • 什么是bridge? 首先,bridge是一个虚拟网络设备,所以具有网络设备的特征,可以配置IP、MAC地址等;其次,bridge是一个虚拟交换机,和物理交换机有类似的功能。 对于普通的网络设备来说,只有两端,从一端进来的数据会从另一端出去,如物理网卡从外面网络中收到的数据会转发给内核协议栈,而从协议栈过来的数据会转发到外面的物理网络中。 而bridge不同,bridge有多个端口,数据可以从任何

 相关资料
  • 问题内容: 曾经有一个JavaBeans ActiveX Bridge, 但是AFAIK在Java 8中不再受支持。 我想从Excel调用JavaBeans,那么Java 8的处理方式是什么? 问题是我在Excel VBA中使用的dll中打包了一些旧版JavaBean。我没有此bean的源代码。但是我仍然想在Java 8/9中使用它。这可能吗? 问题答案: 我使用Obba解决了问题:我使用Java

  • 问题内容: 我在Xcode 6 Beta 4中使用了带有完成处理程序的代码,而该处理程序在Xcode 6 Beta 5中不再起作用。 完整的方法… 错误是“ [UIView]”没有名为“ bridgeToObjectiveC”的成员 请注意,该方法中的CGFloat和Uint强制转换是针对beta 4的解决方法,我只是尚未更新该部分。 我认为处理完成处理程序的解决方案可能是将数组视为NSArray

  • 本文向大家介绍Linux bridge桥接两个VirtualBox虚拟网络的方法步骤,包括了Linux bridge桥接两个VirtualBox虚拟网络的方法步骤的使用技巧和注意事项,需要的朋友参考一下 这篇文章缘起于这段时间我对拆东墙补西墙这种工作方式的抱怨。 先是磁盘空间不够用,配发的电脑仅仅剩余12G的空间,不能外接硬盘,暂时也不能上传备份,相当于一台离线的机器吧。我却要完整编译一个4.19

  • 本文向大家介绍java设计模式之桥接模式(Bridge),包括了java设计模式之桥接模式(Bridge)的使用技巧和注意事项,需要的朋友参考一下 概述 桥接模式一种结构型模式,它主要应对的是:由于实际的需要,某个类具有两个或以上的维度变化,如果只是用继承将无法实现这种需要,或者使得设计变得相当臃肿。 桥接模式的做法是把变化的部分抽象出来,使变化部分与主类分离开来,从而将多个维度的变化彻底分离。最

  • 这对社区来说是一个非常普遍的问题,尤其是Kafka·斯特里姆齐桥的人,如果他们正在读这本书的话。 我正在尝试将他们的Apache Kafka HTTP Bridge作为POC来实现。文档非常糟糕,无法提供任何帮助。我真的只需要知道如何使用桥发布和使用来自Kafka主题的消息。我已经开始了这座桥,但由于文档缺乏基本示例,我不知道除此之外的任何事情。

  • 设计模式之Bridge Bridge定义 : 将抽象和行为划分开来,各自独立,但能动态的结合. 为什么使用? 通常,当一个抽象类或接口有多个具体实现(concrete subclass),这些concrete之间关系可能有以下两种: 1. 这多个具体实现之间恰好是并列的,如前面举例,打桩,有两个concrete class:方形桩和圆形桩;这两个形状上的桩是并列的,没有概念上的重复,那么我们只要使

  • 使用键盘快捷键可以迅速选择工具和执行命令,而无需使用菜单。键盘快捷键(如果可用)显示在菜单中的命令名称的右侧。 注意: 除了使用键盘快捷键以外,您还可以使用上下文相关菜单访问很多命令。上下文相关菜单显示与现用工具、所选对象或面板相关的命令。要显示上下文相关菜单,请右键单击 (Windows) 或按住 Ctrl 键单击 (Mac OS) 一个区域。 这不是完整的键盘快捷键列表。该表主要仅列出了菜单命

  • 使用 Adobe Bridge 中的“发布”面板,可以在 Adobe Portfolio 上作为项目轻松上传图像、音频文件和视频。上传了资源后,您可以前往 Adobe Portfolio 编辑项目的布局,然后发布您的网站。 将资源上传到 Adobe Portfolio 要在任何工作区中查看发布面板,请选择窗口 >“发布”面板。 在发布面板中,单击 Adobe Portfolio。 注意: 如果您还