将代码从C#翻译为VB.NET

将代码从C#翻译为VB.NET,c#,vb.net,translation,C#,Vb.net,Translation,我把它从C#翻译成VB.NET C#: VB.NET: 公共共享子注册表项(路由为RouteCollection) routes.IgnoreRoute(“{resource}.axd/{*pathInfo}”) Dim config=带有{_ Key.EnableTestClient=True_ } 添加(新的ServiceRoute(“api/contacts”),新的HttpServiceHostFactory(),带有{_ Key.Configuration=config\up>删除键

我把它从C#翻译成VB.NET

C#:

VB.NET:

公共共享子注册表项(路由为RouteCollection)
routes.IgnoreRoute(“{resource}.axd/{*pathInfo}”)
Dim config=带有{_
Key.EnableTestClient=True_
}
添加(新的ServiceRoute(“api/contacts”),新的HttpServiceHostFactory(),带有{_

Key.Configuration=config\up>删除

公共共享子注册表项(路由为RouteCollection)
routes.IgnoreRoute(“{resource}.axd/{*pathInfo}”)
Dim config=带有{_
.EnableTestClient=True_
}
添加(新的ServiceRoute(“api/contacts”),新的HttpServiceHostFactory(),带有{_
.Configuration=config_
public static void RegisterRoutes(RouteCollection routes)
    {
        routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

        var config = new HttpConfiguration() { EnableTestClient = true };
        routes.Add(new ServiceRoute("api/contacts", new HttpServiceHostFactory() { Configuration = config }, typeof(ContactsApi)));

        routes.MapRoute(
            "Default", // Route name
            "{controller}/{action}/{id}", // URL with parameters
            new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
        );
    }