同じ名前空間に次のリクエストクラスとレスポンスクラスを持つサービススタックサービスがあります
public class GetContactMasterData
{
}
public class GetContactMasterDataResponse
{
public IdDescription[] EntityTypes { get; set; }
public IdDescription[] NameTypes { get; set; }
public IdDescription[] AddressTypes { get; set; }
public ResponseStatus MyResponseStatus { get; set; }
}
私はsoapUIを使用してサービスを正常にテストしました。これが応答です
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope">
<s:Body>
<GetContactMasterDataResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
<AddressTypes>
<IdDescription>
<Description>Home</Description>
<Id>1</Id>
</IdDescription>
...
</AddressTypes>
<EntityTypes>
<IdDescription>
<Description>Corporation</Description>
<Id>1</Id>
</IdDescription>
...
</EntityTypes>
<MyResponseStatus i:nil="true" />
<NameTypes>
<IdDescription>
<Id>4</Id>
<Description>Other</Description>
</IdDescription>
...
</NameTypes>
</GetContactMasterDataResponse>
</s:Body>
</s:Envelope>
このサービスをテストするためのコンソールアプリを作成すると、サービス参照によってプロキシオブジェクトが生成されます。これは、インテリセンスがGetContactMasterDataメソッドを呼び出すためのガイドです。
GetContactMasterData(out IdDescription []、out ResponseStatus myResponseStatus、out IdDescription [] NameTypes):IdDescription [] addressTypes
私の質問は、EntityTypesとNameTypesがoutパラメーターになるのに対し、addressTypesがメソッドの戻り型になるのはなぜですか?