このオブジェクトをWCFから利用できるようにする方法を知りたいです。
[DataContract]
public class A : IA
{
[DataMember]
public List<IB> ListOfB { get; set; }
}
public interface IA
{
List<IB> ListOfB { get; set; }
}
IB
クラスのインターフェース付きB
。
生成されるXSDは次のとおりです。
<xs:complexType name="A">
<xs:sequence>
<xs:element xmlns:q1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" minOccurs="0" name="ListOfB" nillable="true" type="q1:ArrayOfanyType"/>
</xs:sequence>
</xs:complexType>
<xs:element name="A" nillable="true" type="tns:A"/>
</xs:schema>
IB
ArrayOfanyType->タグ付けできないため、機能しないと感じています[DataContract]
。