visual怎么添加wcf_Visual Studio中的WCF项目模板

visual怎么添加wcf

Project templates provide the class structure and definition of service contracts, data contracts and other important features in 

项目模板提供了服务合同,数据合同和其他重要功能的类结构和定义。

Visual Studio for Windows Communication Foundation
. Using these predefined template helps you to write a service with minimal code interaction and it will lead you to build more advanced services for your projects.
Visual Studio for Windows Communication Foundation
。 使用这些预定义的模板可以帮助您以最少的代码交互编写服务,并且可以引导您为项目构建更高级的服务。

There are four different types of templates present in Visual Studio. The first two are the most commonly used to build, test and deploy SOA architectural applications.

Visual Studio中存在四种不同类型的模板。 前两个是最常用于构建,测试和部署SOA体系结构应用程序的。

1. WCF Service Library:

1. WCF服务库:

The WCF Service Library project (C#) consists of three files; IService1.cs, Service1.cs and App.config. The WCF Service Library project (VB.Net) is consists of three files; IService1.vb, Service1.vb and App.config.

WCF服务库项目(C#)包含三个文件。 IService1.cs,Service1.cs和App.config。 WCF服务库项目(VB.Net)由三个文件组成; IService1.vb,Service1.vb和App.config。

This type of project is suitable when we are focused on building the services first and deployment later.

当我们专注于先构建服务然后再部署时,这种类型的项目是合适的。

  • IService File: This is the interface where the WCF service attributes are applied. In this file you place the definitions of data contract methods/operations.

    IService文件:这是应用WCF服务属性的接口。 在此文件中,放置数据协定方法/操作的定义。
  • Service File: This file is inherited from IService interface file and includes the implementations of defined interface's data contract methods/operations. 

    服务文件:此文件继承自IService接口文件,并且包括已定义接口的数据协定方法/操作的实现。
  • Application Configuration File: In this file, you place the definitions of secure HTTP binding, endpoints of services and other important features.

    应用程序配置文件:在此文件中,放置安全HTTP绑定的定义,服务的终结点和其他重要功能。

2. WCF Service Application:

2. WCF服务应用程序:

The WCF Service Application project (C#) is consists of four files; IService1.cs, Service1.svc, Service1.svc.cs and Web.config. The WCF Service Application project (VB.Net) is consists of four files; IService1.vb, Service1.svc, Service1.svc.vb and Web.config. 

WCF服务应用程序项目(C#)包含四个文件。 IService1.cs,Service1.svc,Service1.svc.cs和Web.config。 WCF服务应用程序项目(VB.Net)包含四个文件。 IService1.vb,Service1.svc,Service1.svc.vb和Web.config。

This type of project template creates a web site to be deployed to a virtual directory and hosts a service in that website.

这种类型的项目模板会创建一个要部署到虚拟目录的网站,并在该网站中托管服务。

  • Service Contract File (IService): The service contract interface file where you place the definitions of data contract operations.

    服务合同文件(IService):服务合同接口文件,用于放置数据合同操作的定义。
  • Service Host File (Service1.svc) and Service Implemnetation File (Service1.svc.cs): This file is inherited from the service contract file and implements the data contract operations.

    服务主机文件(Service1.svc)和服务象征文件(Service1.svc.cs):此文件继承自服务合同文件并实现数据合同操作。
  • Web Configuration File: In this file, you place the definitions of secure HTTP binding, endpoints of services and other important features.

    Web配置文件:在此文件中,放置安全HTTP绑定的定义,服务的端点和其他重要功能。

3. WCF Workflow Service Application:

3. WCF工作流服务应用程序:

The workflow (WF) service application can be accessed like a web service. It defines distinguish templates for XAML and other imperative programming models. We can create sequential and state machine workfow projects using these templates.

可以像Web服务一样访问工作流(WF)服务应用程序。 它为XAML和其他命令式编程模型定义了不同的模板。 我们可以使用这些模板创建顺序和状态机工作流项目。

4. Syndication Service Application:

4. 联合服务应用程序:

This type of project template provides the syndication functionality in an application in which you can easily work with feeds in ATOM, RSS and other custom formats as a WCF service. These are allowed you to read and create them and also expose them on service endpoints.

这种类型的项目模板在应用程序中提供联合功能,您可以在其中轻松地将ATOM,RSS和其他自定义格式的提要作为WCF服务来使用。 这些允许您阅读和创建它们,也可以在服务端点上公开它们。

翻译自: https://www.experts-exchange.com/articles/17517/WCF-Project-Templates-in-Visual-Studio.html

visual怎么添加wcf

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值