ServiceDescription.Services 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取包含在 Service 中的 ServiceDescription 实例的集合。
public:
property System::Web::Services::Description::ServiceCollection ^ Services { System::Web::Services::Description::ServiceCollection ^ get(); };
public System.Web.Services.Description.ServiceCollection Services { get; }
member this.Services : System.Web.Services.Description.ServiceCollection
Public ReadOnly Property Services As ServiceCollection
属性值
服务说明包含的服务实例的集合。
示例
// Read a ServiceDescription from existing WSDL.
ServiceDescription^ myServiceDescription = ServiceDescription::Read( "Input_CS.wsdl" );
myServiceDescription->TargetNamespace = "http://tempuri.org/";
// Get the ServiceCollection of the ServiceDescription.
ServiceCollection^ myServiceCollection = myServiceDescription->Services;
// Remove the Service at index 0 of the collection.
myServiceCollection->Remove( myServiceDescription->Services[ 0 ] );
// Read a ServiceDescription from existing WSDL.
ServiceDescription myServiceDescription =
ServiceDescription.Read("Input_CS.wsdl");
myServiceDescription.TargetNamespace = "http://tempuri.org/";
// Get the ServiceCollection of the ServiceDescription.
ServiceCollection myServiceCollection = myServiceDescription.Services;
// Remove the Service at index 0 of the collection.
myServiceCollection.Remove(myServiceDescription.Services[0]);
' Read a ServiceDescription from existing WSDL.
Dim myServiceDescription As ServiceDescription = _
ServiceDescription.Read("Input.vb.wsdl")
myServiceDescription.TargetNamespace = "http://tempuri.org/"
' Get the ServiceCollection of the ServiceDescription.
Dim myServiceCollection As ServiceCollection = _
myServiceDescription.Services
' Remove the Service at index 0 of the collection.
myServiceCollection.Remove(myServiceDescription.Services.Item(0))
注解
ServiceCollection此属性返回的元素对应于 Web 服务说明语言 (WSDL) definitions
根元素所括的元素列表service
。 有关 WSDL 的更多信息,请参阅 WSDL 规范。