【发布时间】:2017-08-15 20:17:41
【问题描述】:
这是我尝试生成的代码文件的 sn-p。这是一个比较老的WCF项目,所以不太熟悉。对于新的服务项目,我只需右键单击并选择更新服务引用。
using System;
`//-------------------------------------------------------------------------
-----
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.269
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//--------------------------------------------------------------------------
----
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel",
"4.0.0.0")]
[System.ServiceModel.ServiceContractAttribute(ConfigurationName =
"IBusinessService")]
[CLSCompliant(false)]
public interface IBusinessService
{
[System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IBusinessService/Receive_Replenishment_Request", ReplyAction = "http://tempuri.org/IBusinessService/Receive_Replenishment_RequestResponse")]
int Receive_Replenishment_Request(System.Nullable<int> Module, System.Nullable<int> Level, System.Nullable<int> Side, System.Nullable<int> Row, string User);
此文件与具有 [ServiceContract] 属性的 BusinessService.cs 和 IBuesinessService.cs 位于单独的项目中。
是否有我必须运行的工具来生成服务引用类?我需要更新此服务参考。
【问题讨论】:
-
不清楚你想做什么。你想生成定义服务的接口吗?还是要生成消费者代码?
标签: c# visual-studio wcf