visual怎么添加wcf
Project templates provide the class structure and definition of service contracts, data contracts and other important features in
项目模板提供了服务合同,数据合同和其他重要功能的类结构和定义。
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